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"
prefix: flat
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
# shadowstrength: 1.0
# ambientlight: 4
@ -204,6 +206,8 @@ templates:
colorscheme: default
# Map background color (day or night)
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
renderers:
- class: org.dynmap.kzedmap.DefaultTileRenderer
@ -233,6 +237,8 @@ templates:
backgroundday: "#153E7E"
# Background color for map during the night
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
renderers:
- class: org.dynmap.kzedmap.DefaultTileRenderer
@ -297,6 +303,8 @@ worlds:
# title: "Flat"
# prefix: flat
# 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
# shadowstrength: 1.0
# ambientlight: 4
@ -364,6 +372,8 @@ worlds:
# title: "Flat"
# prefix: flat
# 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
# renderers:
# - class: org.dynmap.kzedmap.DefaultTileRenderer

View File

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