Files
seeding-planets/common/steam_connection/steam_connection.gd
2026-06-08 12:17:37 +02:00

18 lines
700 B
GDScript

extends Node
const ACH_SPIN_PLANET="STW_SPIN_PLANET"
const ACH_FINISH_TUTORIAL="STW_FINISH_TUTORIAL"
const ACH_MEET_DEMETER="STW_MEET_DEMETER"
const ACH_UNLOCK_ALL_MUTATION="STW_UNLOCK_ALL_MUTATIONS"
const ACH_KICK_YOUR_OLD_BODY="STW_KICK_YOUR_OLD_BODY"
const ACH_MERCURY_BASE="STW_REACH_MERCURY_BASE"
const ACH_REACH_VENUS_BASE="STW_REACH_VENUS_BASE"
func unlock_achievement(achivement_name : String):
if Steam.isSteamRunning():
var status = Steam.getAchievement(achivement_name)
print("Steam Achievement %s" %achivement_name)
if status.has("ret") and status.ret and not status.achieved:
Steam.setAchievement(achivement_name)
Steam.storeStats()