Add planet conquest state and gate extractor placement (#41)
Planets now need every capture point held before an extractor can go up there: GameState tracks per-planet capture progress keyed by the same stable planet_id as extractors, and BuildController's four extractor placement checks (menu enable, status text, info popup, confirm) all re-check conquest, not just proximity/duplication. Part of the #40 conquest-mechanic breakdown.
This commit is contained in:
parent
7da4531f25
commit
a1ad6cc844
5 changed files with 238 additions and 4 deletions
|
|
@ -42,6 +42,12 @@ func _initialize() -> void:
|
|||
game_state.rocks = 200
|
||||
game_state.buildings.clear()
|
||||
game_state.extractors.clear()
|
||||
game_state.planet_capture.clear()
|
||||
# This test is about the planet-proximity/duplicate rules, not conquest
|
||||
# (see test_planet_conquest_gate), so pre-conquer the target planet.
|
||||
var target_planet_id: String = "chunk:%d:%d" % [target_chunk.x, target_chunk.y]
|
||||
game_state.register_capture_points(target_planet_id, 1)
|
||||
game_state.mark_point_captured(target_planet_id, 0)
|
||||
# Extractors are gated behind research (see test_skill_tree). This test
|
||||
# is about the planet-proximity rule, so grant the research up front.
|
||||
game_state.reset_progression()
|
||||
|
|
|
|||
Loading…
Reference in a new issue