Store resources in generic inventories

This commit is contained in:
Loïc Wisniewski 2026-08-14 20:32:58 +02:00
commit 1721edd123
24 changed files with 385 additions and 172 deletions

View file

@ -43,7 +43,8 @@ const CRAFTER_AT: Vector2 = Vector2(900.0, -300.0)
func _total() -> int:
var sum: int = game_state.rocks + game_state.fleet_cargo
for b in game_state.buildings:
sum += int(b.get("stock", 0))
if b.type != GameState.BUILDING_MOTHERSHIP:
sum += game_state.building_resource(int(b.id), GameState.RESOURCE_ORE)
for t in game_state.transporters:
sum += int(t.get("carrying", 0))
# Ore inside a build that has STARTED but not finished (#23). It has left