Compose buildings from definitions and capabilities

This commit is contained in:
Loïc Wisniewski 2026-08-14 21:44:28 +02:00
commit 0504b24d8d
46 changed files with 1091 additions and 878 deletions

View file

@ -61,11 +61,11 @@ func _process(delta: float) -> bool:
continue
match b.building_type:
GameState.BUILDING_SHIP_CRAFTER:
crafter = b
crafter = b.visual
GameState.BUILDING_MOTHERSHIP:
mothership = b
mothership = b.visual
GameState.BUILDING_COMMAND_CENTER:
command = b
command = b.visual
if crafter == null or mothership == null or command == null:
print("TEST_BUILDING_REDRAW_COST: FAIL (buildings never spawned)")
quit(1)
@ -88,7 +88,7 @@ func _process(delta: float) -> bool:
for b in [crafter, mothership, command]:
if b.draw_count != 1:
print("TEST_BUILDING_REDRAW_COST: FAIL (%s redrew its geometry %d times)" % [
b.building_type, b.draw_count
b.name, b.draw_count
])
quit(1)
return true