feat(composition): dive world assembled from a selected site definition
The calibration site spawn sat 16 m from the south bounds edge, inside the 40 m warning margin. The vehicle_test recipe now extends the terrain and playable bounds 42 m to the south so the spawn is inside the zone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bbf1dc9990
commit
51634820bd
12 files changed
+154
-258
No files matched your search
@@ -5,6 +5,7 @@ const VerticalSliceRoot = preload(
|
||||
)
|
||||
const MainMenuScreen = preload("res://game/presentation/main_menu/main_menu_screen.gd")
|
||||
const CockpitHud = preload("res://game/presentation/cockpit/cockpit_hud.gd")
|
||||
const PlayableBoundsStatus = preload("res://game/application/sites/playable_bounds_status.gd")
|
||||
const CockpitDetailing = preload(
|
||||
"res://game/presentation/cockpit/cockpit_detailing.gd"
|
||||
)
|
||||
@@ -19,7 +20,7 @@ const ProductionInputAdapter = preload(
|
||||
"res://game/infrastructure/input/production_input_adapter.gd"
|
||||
)
|
||||
|
||||
const TEST_COUNT := 78
|
||||
const TEST_COUNT := 83
|
||||
|
||||
var _failures: Array[String] = []
|
||||
|
||||
@@ -75,6 +76,7 @@ func _test_vehicle_slice(composition: VerticalSliceRoot) -> void:
|
||||
var continue_button := menu.get_node("%ContinueButton") as Button
|
||||
_expect(continue_button.disabled, "continue is disabled without save")
|
||||
var new_game_button := menu.get_node("%NewGameButton") as Button
|
||||
composition.select_dive_site("res://content/sites/vehicle_test.tres")
|
||||
new_game_button.pressed.emit()
|
||||
await process_frame
|
||||
await physics_frame
|
||||
@@ -110,6 +112,22 @@ func _test_vehicle_slice(composition: VerticalSliceRoot) -> void:
|
||||
_expect(sonar_service != null, "production sonar service is assembled")
|
||||
_expect(sonar_display != null, "shared sonar presentation is assembled")
|
||||
_expect(composition.latest_update() != null, "dive session starts with a typed update")
|
||||
_expect(composition.dive_site() != null, "composition instantiates the selected dive site")
|
||||
_expect(
|
||||
composition.dive_site() != null
|
||||
and composition.dive_site().definition().site_id == &"vehicle_test",
|
||||
"selected site definition drives the world"
|
||||
)
|
||||
_expect(
|
||||
actor != null and actor.global_position.is_equal_approx(Vector3(0.0, -12.0, 12.0)),
|
||||
"submarine spawns at the site spawn point"
|
||||
)
|
||||
_expect(
|
||||
composition.latest_bounds_status() != null
|
||||
and composition.latest_bounds_status().state == PlayableBoundsStatus.State.INSIDE,
|
||||
"spawn is inside the playable bounds"
|
||||
)
|
||||
_expect(hud != null and not hud.bounds_warning_visible(), "no bounds warning inside the zone")
|
||||
if (
|
||||
actor == null
|
||||
or camera == null
|
||||
|
||||
Reference in new issue
Block a user