add whistle to train

This commit is contained in:
2026-06-29 08:35:14 +02:00
parent d09a975578
commit 6a2a2d2e8a
24 changed files with 881 additions and 38 deletions

View File

@@ -7,7 +7,7 @@ extends Node
#if you have an error setting achievements or stats in debug mode remember to open your steam client
#with jmp games account or another account who bought this game. If error persist try to clos and reopen steam client.
const KNOWN := [
"stat_games_played",
"stat_time_played",
"stat_distance_km",
"stat_stop_number",
"stat_photo_number",
@@ -16,11 +16,11 @@ const KNOWN := [
#how it works:
#func _on_match_finished(score: int) -> void:
# Stats.add_int("stat_games_played", 1)
# Stats.set_int("stat_total_score", Stats.get_int("stat_total_score") + score)
# Stats.store() #only one push at the end of the game
# if Stats.get_int("stat_games_played") >= 10:
# Achievements.unlock("ACH_PLAY_10_GAMES") #it call storeStats()
# StatsManager.add_int("stat_time_played", 1)
# StatsManager.set_int("stat_total_score", StatsManager.get_int("stat_total_score") + score)
# StatsManager.store() #only one push at the end of the game
# if StatsManager.get_int("stat_time_played") >= 10:
# AchievementManager.unlock("ACH_PLAY_10_HOURS") #it call storeStats()
func _ready() -> void:
@@ -64,8 +64,8 @@ func store() -> void:
#Development only: reset stats
func reset_all(include_achievements: bool = false) -> void:
Steam.resetAllStats(include_achievements)
Steam.storeStats()
if !Steam.resetAllStats(include_achievements):
push_error("resetAllStats failed")
func _on_stats_stored(_game: int, result: int) -> void:
if !result: