Add 'textured' option for Flat - matches color scheme tone better

This commit is contained in:
Mike Primm 2011-06-17 00:08:13 -05:00
parent ffc08173b4
commit e18ab1a880
2 changed files with 19 additions and 1 deletions

View File

@ -136,6 +136,8 @@ templates:
title: "Flat" title: "Flat"
prefix: flat prefix: flat
colorscheme: default colorscheme: default
# The textured setting makes the flat render toning much more consistent with the other maps: set to 'false' for the original flat texture
textured: true
# # To render a world as a "night view", set shadowstrength and ambientlight # # To render a world as a "night view", set shadowstrength and ambientlight
# shadowstrength: 1.0 # shadowstrength: 1.0
# ambientlight: 4 # ambientlight: 4
@ -204,6 +206,8 @@ templates:
colorscheme: default colorscheme: default
# Map background color (day or night) # Map background color (day or night)
background: "#300806" background: "#300806"
# The textured setting makes the flat render toning much more consistent with the other maps: set to 'false' for the original flat texture
textured: true
- class: org.dynmap.kzedmap.KzedMap - class: org.dynmap.kzedmap.KzedMap
renderers: renderers:
- class: org.dynmap.kzedmap.DefaultTileRenderer - class: org.dynmap.kzedmap.DefaultTileRenderer
@ -233,6 +237,8 @@ templates:
backgroundday: "#153E7E" backgroundday: "#153E7E"
# Background color for map during the night # Background color for map during the night
backgroundnight: "#000000" backgroundnight: "#000000"
# The textured setting makes the flat render toning much more consistent with the other maps: set to 'false' for the original flat texture
textured: true
- class: org.dynmap.kzedmap.KzedMap - class: org.dynmap.kzedmap.KzedMap
renderers: renderers:
- class: org.dynmap.kzedmap.DefaultTileRenderer - class: org.dynmap.kzedmap.DefaultTileRenderer
@ -297,6 +303,8 @@ worlds:
# title: "Flat" # title: "Flat"
# prefix: flat # prefix: flat
# colorscheme: default # colorscheme: default
# # The textured setting makes the flat render toning much more consistent with the other maps: set to 'false' for the original flat texture
# textured: true
# # To render a world as a "night view", set shadowstrength and ambientlight # # To render a world as a "night view", set shadowstrength and ambientlight
# shadowstrength: 1.0 # shadowstrength: 1.0
# ambientlight: 4 # ambientlight: 4
@ -364,6 +372,8 @@ worlds:
# title: "Flat" # title: "Flat"
# prefix: flat # prefix: flat
# colorscheme: default # colorscheme: default
# # The textured setting makes the flat render toning much more consistent with the other maps: set to 'false' for the original flat texture
# textured: true
# - class: org.dynmap.kzedmap.KzedMap # - class: org.dynmap.kzedmap.KzedMap
# renderers: # renderers:
# - class: org.dynmap.kzedmap.DefaultTileRenderer # - class: org.dynmap.kzedmap.DefaultTileRenderer

View File

@ -37,6 +37,7 @@ public class FlatMap extends MapType {
private int shadowscale[] = null; private int shadowscale[] = null;
private boolean night_and_day; /* If true, render both day (prefix+'-day') and night (prefix) tiles */ private boolean night_and_day; /* If true, render both day (prefix+'-day') and night (prefix) tiles */
protected boolean transparency; protected boolean transparency;
private boolean textured = false;
public FlatMap(ConfigurationNode configuration) { public FlatMap(ConfigurationNode configuration) {
this.configuration = configuration; this.configuration = configuration;
@ -69,6 +70,7 @@ public class FlatMap extends MapType {
} }
night_and_day = configuration.getBoolean("night-and-day", false); night_and_day = configuration.getBoolean("night-and-day", false);
transparency = configuration.getBoolean("transparency", false); /* Default off */ transparency = configuration.getBoolean("transparency", false); /* Default off */
textured = configuration.getBoolean("textured", false);
} }
@Override @Override
@ -173,7 +175,13 @@ public class FlatMap extends MapType {
} }
if (colors == null) if (colors == null)
continue; continue;
Color c = colors[0]; Color c;
if(textured && (((x+y) & 0x01) == 1)) {
c = colors[2];
}
else {
c = colors[0];
}
if (c == null) if (c == null)
continue; continue;