refactor: introduce full floor state model

This commit is contained in:
goose
2026-10-02 18:09:22 -04:00
parent 5a4047fa4c
commit 6ce2b9c9c5
12 changed files with 289 additions and 2 deletions
+7
View File
@@ -6,6 +6,7 @@ var settings: RunSettings
var player_name := "Sans-Nom"
var base_archetype: StringName = &"vanguard"
var current_floor := 0
var floors: Dictionary[int, FloorState] = {}
var current_turn := 0
var log: Array[GameEvent] = []
@@ -13,6 +14,12 @@ func _init(new_seed: String, new_settings: RunSettings = null) -> void:
settings = new_settings if new_settings != null else RunSettings.new(new_seed)
seed = settings.seed
func set_floor_state(floor: FloorState) -> void:
floors[floor.floor_number] = floor
func current_floor_state() -> FloorState:
return floors.get(current_floor)
func next_turn() -> int:
current_turn += 1
return current_turn