Fix win screen bug

This commit is contained in:
Ategon 2024-09-15 05:40:28 -04:00
parent 444bacb717
commit 24aa4aea4b
3 changed files with 3 additions and 2 deletions

View file

@ -78,7 +78,7 @@ func _process(delta: float) -> void:
rand = randi_range(0, 1) 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): if rock_spots.has(tile):
last_text = NAME_ICON.instantiate() last_text = NAME_ICON.instantiate()
last_text.text = "[center]Rock" last_text.text = "[center]Rock"

View file

@ -17,3 +17,4 @@ flood_levels[]
1 1
0 0
5 5
0

View file

@ -21,7 +21,7 @@ func _process(delta: float) -> void:
Persister.change_value("days", 1) 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) Persister.persist_data("win", true)
return return