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,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
|
||||
|
||||
|
||||
Reference in new issue
Block a user