Add initial implementation of StateMachine and Inventory system with SignalBus integration

This commit is contained in:
Kirill
2026-07-30 22:06:18 +03:00
parent d8a4019ce1
commit 6d846ec813
+5 -1
View File
@@ -164,12 +164,15 @@ func load_data() -> bool:
if game_data == {}:
return false
if !game_data.has_all(["cumulative_amount", "current_amount", "entity_batches"]):
if !game_data.has_all(["cumulative_amount", "current_amount",
"entity_batches", "year",
]):
return false
entity_batches = game_data["entity_batches"]
cumulative_amount = game_data["cumulative_amount"]
current_amount = game_data["current_amount"]
current_year = game_data["year"]
for item in current_amount:
items_to_update[item] = current_amount[item]
@@ -179,6 +182,7 @@ func load_data() -> bool:
func save_data() -> void:
var game_data: Dictionary = {}
game_data["year"] = current_year
game_data["cumulative_amount"] = cumulative_amount
game_data["current_amount"] = current_amount
game_data["entity_batches"] = entity_batches