diff --git a/BuildingLevel.gd b/BuildingLevel.gd index f7a10d4..e38c421 100644 --- a/BuildingLevel.gd +++ b/BuildingLevel.gd @@ -78,7 +78,7 @@ func _process(delta: float) -> void: rand = randi_range(0, 1) - if not Persister.get_value("building_mode"): + if not Persister.get_value("building_mode") and Persister.get_value("flood_level", PersisterEnums.Scope.UNKNOWN, 0) < level: if rock_spots.has(tile): last_text = NAME_ICON.instantiate() last_text.text = "[center]Rock" diff --git a/parts/globals.txt b/parts/globals.txt index 13f8a63..3add872 100644 --- a/parts/globals.txt +++ b/parts/globals.txt @@ -17,3 +17,4 @@ flood_levels[] 1 0 5 + 0 diff --git a/storm/storm_manager.gd b/storm/storm_manager.gd index f888fbb..1d0292b 100644 --- a/storm/storm_manager.gd +++ b/storm/storm_manager.gd @@ -21,7 +21,7 @@ func _process(delta: float) -> void: Persister.change_value("days", 1) - if current_flood_state > globals.flood_levels.size(): + if current_flood_state >= globals.flood_levels.size() + 1: Persister.persist_data("win", true) return