Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add 'showspawn' render option

Allow users to hide the spawn marker that is normally generated for
overworld levels
  • Loading branch information...
commit 36aa6ed011ce0de896c15e5106d700de00d75e94 1 parent b2ce4fa
@tswsl1989 tswsl1989 authored
View
4 docs/config.rst
@@ -480,6 +480,10 @@ values. The valid configuration keys are listed below.
**Default:** ``[]`` (an empty list)
+``showspawn``
+ This is a boolean, and defaults to ``True``. If set to ``False``, then the spawn
+ icon will not be displayed on the rendered map.
+
.. _customrendermodes:
Custom Rendermodes and Rendermode Primitives
View
2  overviewer.py
@@ -401,7 +401,7 @@ def main():
# only pass to the TileSet the options it really cares about
render['name'] = render_name # perhaps a hack. This is stored here for the asset manager
- tileSetOpts = util.dict_subset(render, ["name", "imgformat", "renderchecks", "rerenderprob", "bgcolor", "imgquality", "optimizeimg", "rendermode", "worldname_orig", "title", "dimension", "changelist"])
+ tileSetOpts = util.dict_subset(render, ["name", "imgformat", "renderchecks", "rerenderprob", "bgcolor", "imgquality", "optimizeimg", "rendermode", "worldname_orig", "title", "dimension", "changelist","showspawn"])
tileSetOpts.update({"spawn": w.find_true_spawn()}) # TODO find a better way to do this
tset = tileset.TileSet(rset, assetMrg, tex, tileSetOpts, tileset_dir)
tilesets.append(tset)
View
1  overviewer_core/settingsDefinition.py
@@ -79,6 +79,7 @@
"crop": Setting(required=False, validator=validateCrop, default=None),
"changelist": Setting(required=False, validator=validateStr, default=None),
"markers": Setting(required=False, validator=validateMarkers, default=[]),
+ "showspawn": Setting(required=False, validator=validateBool, default=True),
# Remove this eventually (once people update their configs)
"worldname": Setting(required=False, default=None,
View
5 overviewer_core/tileset.py
@@ -520,8 +520,11 @@ def bgcolorformat(color):
last_rendertime = self.max_chunk_mtime,
imgextension = self.imgextension,
)
- if (self.regionset.get_type() == "overworld"):
+ if (self.regionset.get_type() == "overworld" and self.options.get("showspawn", True)):
d.update({"spawn": self.options.get("spawn")})
+ else:
+ d.update({"spawn": "false"});
+
try:
d['north_direction'] = self.regionset.north_dir
except AttributeError:
Please sign in to comment.
Something went wrong with that request. Please try again.