# No-op unless the GodotSteam extension is present, so web exports never break.
# Every Steamworks call in the game goes through here. See do.md.
extends Node

const ACHIEVEMENT_FIRST_ORIGINAL := "FIRST_ORIGINAL"
const ACHIEVEMENT_FLAWLESS_RUN := "FLAWLESS_RUN"
const ACHIEVEMENT_WIN := "WIN"

var available := false

func _ready() -> void:
	available = Engine.has_singleton("Steam")

func unlock_achievement(id: String) -> void:
	if not available:
		return
	var steam := Engine.get_singleton("Steam")
	steam.setAchievement(id)
	steam.storeStats()
