Refactor production logic to use state amounts; update calculate_max_producible function to accept default desired amount
This commit is contained in:
+7
-1
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user