From 08019c5db36623ec08053dc56476b4371149dc47 Mon Sep 17 00:00:00 2001 From: "Marcus Str." Date: Fri, 4 Oct 2024 22:59:24 +0200 Subject: [PATCH] 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 --- defines.py | 4 ++-- layergen.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defines.py b/defines.py index 9aee7fc..838c94f 100644 --- a/defines.py +++ b/defines.py @@ -119,7 +119,6 @@ mstr_zl_19 = 0.008 # most likely crash. mstr_ortho_layers = [ # Z-Order 0 - ("landuse", "residential", "landuse", "residential-boundary"), ("boundary", "administrative", "admin_level", ["8", "9", "10", "12"], "landuse", "residential-boundary"), # Z-Order 1 ("landuse", "grass", "landuse", "grass"), @@ -201,7 +200,8 @@ mstr_ortho_layers = [ ("building", "commercial", "building", "commercial"), ("building", "yes", "building", "common"), ("place", "sea", "natural", "sea"), - ("place", "ocean", "natural", "sea") + ("place", "ocean", "natural", "sea"), + ("landuse", "residential", "landuse", "residential-boundary") ] diff --git a/layergen.py b/layergen.py index 80d29f7..2bb5f13 100644 --- a/layergen.py +++ b/layergen.py @@ -405,7 +405,7 @@ class mstr_layergen: # 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._is_completion == False: - amt = randrange(1,251) + amt = randrange(2, 9) for i in range(1, amt+1): ptc = randrange(1, 14) img = Image.open(mstr_datafolder + "textures/tile/completion/p" + str(ptc)+".png") -- 2.30.2