manage stats and achievements

This commit is contained in:
2026-07-07 10:03:12 +02:00
parent b87be91521
commit 6da7021a58
6 changed files with 68 additions and 32 deletions

View File

@@ -113,6 +113,7 @@ func _on_time_of_day_row_on_option_changed(data: String) -> void:
pass
func _on_weather_row_on_option_changed(data: String) -> void:
var weather_changed: bool = true
match data:
"Snow":
_snow = !_snow
@@ -129,9 +130,10 @@ func _on_weather_row_on_option_changed(data: String) -> void:
"Random":
pick_random_weather()
_:
pass
weather_changed = false
AchievementManager.is_unlocked("ACH_CHANGE_METEO")
if weather_changed:
AchievementManager.unlock("ACH_CHANGE_METEO")
func pick_random_weather() -> void:
var valid_buttons = []
@@ -214,7 +216,6 @@ func _on_photo_taken_finished() -> void:
func _on_choo_choo_button_pressed() -> void:
UIEvents.toot_toot.emit(true)
AchievementManager.is_unlocked("ACH_CHANGE_TRAIN_COLOR")
func _set_buttons_mouse_filter(ignore: bool) -> void:
var filter = Control.MOUSE_FILTER_IGNORE if ignore else Control.MOUSE_FILTER_STOP