diff --git a/src/entities/system_entities.py b/src/entities/system_entities.py index 576e13dba58d00f6f8d7595afd4752742fe00ebd..a366c9d1835b04f1a6b35d01261ba3c8b33fe772 100644 --- a/src/entities/system_entities.py +++ b/src/entities/system_entities.py @@ -1164,7 +1164,11 @@ class TrashPile: # Default with trash on roughly 10% of all tiles. total_tiles = data_manager.tile_data['tile_w_count'] * data_manager.tile_data['tile_h_count'] - if random.randint(0, (total_tiles % 10)) < 1: + upper_limit = total_tiles + if upper_limit > 100: + upper_limit = 100 + upper_limit = int(upper_limit / 10) + if random.randint(0, upper_limit) < 1: self.place() def place(self):