diff --git a/docs/signs.rst b/docs/signs.rst index 1a2177f..62bc42e 100644 --- a/docs/signs.rst +++ b/docs/signs.rst @@ -42,7 +42,7 @@ A more advanced filter may also look at other entity fields, such as the sign te def goldFilter(poi): "Gold" return poi['id'] == 'Sign' and (\ - 'gold' in poi['Text1] or + 'gold' in poi['Text1'] or 'gold' in poi['Text2']) This looks for the word 'gold' in either the first or second line of the signtext. @@ -66,6 +66,32 @@ rendered map. For example:: + +Generating the POI Markers +========================== + +genPOI.py +--------- + +In order to actually generate the markers and add them to your map, the script +genPOI.py must be run. For example:: + + genpoi.py --config=/path/to/your/config.file + +.. note:: + Markers will not be updated or added during a regular overviewer.py + map render! + +This will generate the necessary JavaScript files needed in your config file's +outputdir. + +Options +------- + +genPOI.py has a single option:: --config. You should use the same configfile as +used for your normal renders. + + .. _predefined_filter_functions: Predefined Filter Functions diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index db0a2ce..36f7d4f 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -290,7 +290,7 @@ class Textures(object): if hasattr(self, "lightcolor"): return self.lightcolor try: - lightcolor = list(_load_image("light_normal.png").getdata()) + lightcolor = list(self.load_image("light_normal.png").getdata()) except Exception: logging.warning("Light color image could not be found.") lightcolor = None @@ -759,8 +759,18 @@ def grass(self, blockid, data): block(blockid=3, top_index=2) # cobblestone block(blockid=4, top_index=16) -# wooden plank -block(blockid=5, top_index=4) + +# wooden planks +@material(blockid=5, data=range(4), solid=True) +def wooden_planks(self, blockid, data): + if data == 0: # normal + return self.build_block(self.terrain_images[4],self.terrain_images[4]) + if data == 1: # pine + return self.build_block(self.terrain_images[198],self.terrain_images[198]) + if data == 2: # birch + return self.build_block(self.terrain_images[214],self.terrain_images[214]) + if data == 3: # jungle wood + return self.build_block(self.terrain_images[199],self.terrain_images[199]) @material(blockid=6, data=range(16), transparent=True) def saplings(self, blockid, data): @@ -910,7 +920,16 @@ def furnaces(self, blockid, data): return self.build_full_block(top, None, None, side, side) # sandstone -block(blockid=24, top_index=176, side_index=192) +@material(blockid=24, data=range(3), solid=True) +def wood(self, blockid, data): + top = self.terrain_images[176] + if data == 0: # normal + return self.build_block(top, self.terrain_images[192]) + if data == 1: # hieroglyphic + return self.build_block(top, self.terrain_images[229]) + if data == 2: # soft + return self.build_block(top, self.terrain_images[230]) + # note block block(blockid=25, top_index=74)