Changes to layer generation, namely meadow generation to make it more realistic, completion of a tile changed, moved residential layer to be the last one in the generation to combat an issue of houses "floating" in forests

This commit is contained in:
Marcus Str. 2024-10-04 22:59:24 +02:00
parent db5fb30787
commit 08019c5db3
2 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,6 @@ mstr_zl_19 = 0.008
# most likely crash. # most likely crash.
mstr_ortho_layers = [ mstr_ortho_layers = [
# Z-Order 0 # Z-Order 0
("landuse", "residential", "landuse", "residential-boundary"),
("boundary", "administrative", "admin_level", ["8", "9", "10", "12"], "landuse", "residential-boundary"), ("boundary", "administrative", "admin_level", ["8", "9", "10", "12"], "landuse", "residential-boundary"),
# Z-Order 1 # Z-Order 1
("landuse", "grass", "landuse", "grass"), ("landuse", "grass", "landuse", "grass"),
@ -201,7 +200,8 @@ mstr_ortho_layers = [
("building", "commercial", "building", "commercial"), ("building", "commercial", "building", "commercial"),
("building", "yes", "building", "common"), ("building", "yes", "building", "common"),
("place", "sea", "natural", "sea"), ("place", "sea", "natural", "sea"),
("place", "ocean", "natural", "sea") ("place", "ocean", "natural", "sea"),
("landuse", "residential", "landuse", "residential-boundary")
] ]

View File

@ -405,7 +405,7 @@ class mstr_layergen:
# Here we need to do some magic to make some features look more natural # Here we need to do some magic to make some features look more natural
if (self._tag == "landuse" and self._value == "meadow") or (self._tag == "natural" and self._value == "grassland") or (self._tag == "natural" and self._value == "heath") or (self._tag == "landuse" and self._value == "cemetery") or (self._tag == "landuse" and self._value == "residential"): if (self._tag == "landuse" and self._value == "meadow") or (self._tag == "natural" and self._value == "grassland") or (self._tag == "natural" and self._value == "heath") or (self._tag == "landuse" and self._value == "cemetery") or (self._tag == "landuse" and self._value == "residential"):
if self._is_completion == False: if self._is_completion == False:
amt = randrange(1,251) amt = randrange(2, 9)
for i in range(1, amt+1): for i in range(1, amt+1):
ptc = randrange(1, 14) ptc = randrange(1, 14)
img = Image.open(mstr_datafolder + "textures/tile/completion/p" + str(ptc)+".png") img = Image.open(mstr_datafolder + "textures/tile/completion/p" + str(ptc)+".png")