Refactor production logic to use state amounts; update calculate_max_producible function to accept default desired amount

This commit is contained in:
Kirill
2026-09-01 21:29:07 +03:00
parent d90f8693c9
commit 2f4b6a98d8
2 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -240,7 +240,13 @@ func _set_active_page_actions() -> void:
if !g_active_items.has(pa): continue
var item_id: String = g_active_items[pa].item_id
var amount = owniverse.get_available_to_produce(item_id)
var entity: OwniverseEntity = owniverse.entities[item_id]
#var amount = owniverse.get_available_to_produce(item_id)
#var amount = owniverse.get_available_to_produce(entity)
var amount = owniverse.calculate_max_producible(entity)
print(item_id, " : ", amount)
page_actions[pa].set_actions(item_id, amount)