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

@ -42,7 +42,8 @@ const CRAFTER_AT: Vector2 = Vector2(3000.0, 0.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)
return sum