Add timed craft queue and hangar
This commit is contained in:
parent
b6427b080d
commit
82552464d2
14 changed files with 660 additions and 191 deletions
|
|
@ -52,7 +52,8 @@ func _initialize() -> void:
|
|||
game_state.extractors.clear()
|
||||
game_state.rocks = 40
|
||||
game_state.fleet_cargo = 0
|
||||
game_state.vessels_owed.clear()
|
||||
game_state.stored_vessels.clear()
|
||||
game_state.build_time_scale = 0.02
|
||||
game_state.unlocked = ["shipyards", "coordination", "wing", "squadron", "armada"]
|
||||
scene = load("res://Main.tscn").instantiate()
|
||||
root.add_child(scene)
|
||||
|
|
@ -161,20 +162,21 @@ func _process(delta: float) -> bool:
|
|||
stage = 6
|
||||
return false
|
||||
6:
|
||||
if elapsed < 0.5:
|
||||
# Long enough for the build itself, which #23 made take time.
|
||||
if elapsed < game_state.build_time(GameState.PRODUCT_SHIP) * 3.0:
|
||||
return false
|
||||
# --- 5. the queued order completed off the fleet's own ore ---
|
||||
if game_state.pending_orders(crafter_id) != 0:
|
||||
print("TEST_MANUAL_SUPPLY_ROUTE: FAIL (order still queued after a hand delivery)")
|
||||
quit(1)
|
||||
return true
|
||||
if fleet.ships.size() != ships_before + 1:
|
||||
print("TEST_MANUAL_SUPPLY_ROUTE: FAIL (no vessel: %d -> %d)" % [ships_before, fleet.ships.size()])
|
||||
# Since #23 a finished vessel waits in the hangar rather than
|
||||
# crewing itself, so this is where it lands.
|
||||
if game_state.stored_vessels.size() != 1:
|
||||
print("TEST_MANUAL_SUPPLY_ROUTE: FAIL (no vessel built: %d in the hangar)" % game_state.stored_vessels.size())
|
||||
quit(1)
|
||||
return true
|
||||
print("queued order fulfilled by hand, no transport hub: ships %d->%d" % [
|
||||
ships_before, fleet.ships.size()
|
||||
])
|
||||
print("queued order fulfilled by hand, no transport hub: %d vessel in the hangar" % game_state.stored_vessels.size())
|
||||
|
||||
# --- 6. conservation ----------------------------------------
|
||||
var expected: int = total_before - GameState.SHIP_COST
|
||||
|
|
|
|||
Loading…
Reference in a new issue