Implement asynchronous save manager with UI update optimizations and add tests for save functionality

This commit is contained in:
Kirill
2026-09-20 22:14:47 +03:00
parent a09e3df220
commit f25b77b605
12 changed files with 385 additions and 34 deletions
+7 -1
View File
@@ -14,6 +14,8 @@ var _group_members: Dictionary = {}
var _indexed_entity_count: int = -1
var items_to_update: Dictionary[String, float] = {}
var defer_item_updates: bool = false
var item_amounts_dirty: bool = true
var auto_production: Array = []
var locked_entities: Array = []
@@ -146,8 +148,12 @@ func get_item_amounts(total_produced: bool = false) -> Dictionary[String, float]
return result
func refresh_item_amounts() -> void:
func refresh_item_amounts(force: bool = false) -> void:
item_amounts_dirty = true
if defer_item_updates and not force:
return
items_to_update = get_item_amounts()
item_amounts_dirty = false
func _add_time_delta(delta: float) -> Dictionary: