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:
OlivierandClaude Sonnet 5.5 committed 2026-10-06 20:16:45 +02:00
1 parent bbf1dc9990
commit 51634820bd
12 files changed
+154 -258

No files matched your search

+18
View File
@@ -5,9 +5,12 @@ const DiveUpdate = preload("res://game/domain/dive/dive_update.gd")
const DiveAlertLevel = preload("res://game/domain/dive/dive_alert_level.gd")
const DiveTerminalReason = preload("res://game/domain/dive/dive_terminal_reason.gd")
const VehicleTelemetry = preload("res://game/application/dive/vehicle_telemetry.gd")
const PlayableBoundsStatus = preload("res://game/application/sites/playable_bounds_status.gd")
@onready var _alert_panel: PanelContainer = %AlertPanel
@onready var _alert_label: Label = %AlertLabel
@onready var _bounds_panel: PanelContainer = %BoundsPanel
@onready var _bounds_label: Label = %BoundsLabel
@onready var _ejection_panel: PanelContainer = %EjectionPanel
@onready var _ejection_label: Label = %EjectionLabel
@onready var _terminal_panel: PanelContainer = %TerminalPanel
@@ -29,6 +32,21 @@ func present(update: DiveUpdate, telemetry: VehicleTelemetry) -> void:
]
func present_bounds(status: PlayableBoundsStatus) -> void:
if status == null or not status.requires_warning():
_bounds_panel.visible = false
return
_bounds_panel.visible = true
if status.state == PlayableBoundsStatus.State.OUTSIDE:
_bounds_label.text = tr("HORS ZONE · FAITES DEMI-TOUR")
else:
_bounds_label.text = "%s · %d m" % [tr("LIMITE DE ZONE"), int(status.distance_to_edge_m)]
func bounds_warning_visible() -> bool:
return _bounds_panel.visible
func alert_overlay_visible() -> bool:
return _alert_panel.visible
@@ -57,6 +57,27 @@ theme_override_font_sizes/font_size = 20
text = "ALERTE · ATTENTION"
horizontal_alignment = 1
[node name="BoundsPanel" type="PanelContainer" parent="."]
unique_name_in_owner = true
visible = false
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_left = 560.0
offset_top = 88.0
offset_right = -560.0
offset_bottom = 136.0
grow_horizontal = 2
theme_override_styles/panel = SubResource("AlertStyle")
[node name="BoundsLabel" type="Label" parent="BoundsPanel"]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(1, 0.82, 0.42, 1)
theme_override_font_sizes/font_size = 18
text = "LIMITE DE ZONE"
horizontal_alignment = 1
[node name="EjectionPanel" type="PanelContainer" parent="."]
unique_name_in_owner = true
visible = false