class_name GameState
extends Resource

# state
@export var player_inventory := PlayerInventory.new()
@export var town: Town = preload("res://data/towns/goldthorn.tres")
@export var day := 1
@export var day_progress := 0 # 0 to 100

# overworld
@export var is_player_input_disabled := false

# trade
@export var trade_npc_data: Script

static var instance := GameState.new()


static func save() -> void:
	ResourceSaver.save(instance, "user://game_state.tres")


static func fetch() -> GameState:
	return instance
