Quality Gate / Quality Gate (pull_request) Successful in 7m6s
Instance twelve Blender-scripted glTF models in the cockpit scene and rebuild the cabin around them: gauge panel, sonar, switch panel, alert box, speaker, porthole, hull wall, caged lamps, gas bottle, handrails and side consoles. Presentation only; no domain, application or world rule changes beyond enabling glow in the test environment. - Needles, alert lamps and sonar screen are driven by the existing snapshots; the alert box now carries SYS/ATTN/ALRM. - Depth dial reads percent of certified depth. - Sonar display restyled as a turquoise holographic relief with a shader grid and height scale; SubViewport matches the glass (960x604). - Cabin lighting retuned: warm pooled lamp light, cool porthole rim, lamp shadows, dial backlight. - Procedural stand-ins removed (bulkhead, tanks, consoles, levers, indicator columns, placeholder pipe run, dial face PNGs). - Tests adapted where nodes disappeared; one assertion removed (pipe_segment_count) until the pipe kit is placed. - Model .glb files are committed without LFS; textures Godot extracts next to them at import are ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.1 KiB
GDScript
37 lines
1.1 KiB
GDScript
class_name CockpitSonarConsole
|
|
extends Node3D
|
|
|
|
## Imported sonar monitor. Exposes its glass as the cockpit's `%SonarScreen` so
|
|
## the instrument panel can put the shared sonar texture on it.
|
|
|
|
## Lamps and knobs are modelled into the housing mesh, not separate nodes:
|
|
## three amber push-buttons and two knurled knobs (model contract).
|
|
const HOUSING_CONTROL_COUNT := 5
|
|
|
|
var _housing: MeshInstance3D
|
|
var _screen: MeshInstance3D
|
|
|
|
|
|
func _ready() -> void:
|
|
_housing = find_child("Sonar", true, false) as MeshInstance3D
|
|
_screen = find_child("SonarScreen", true, false) as MeshInstance3D
|
|
if _housing == null or _screen == null:
|
|
push_error("Sonar model is missing its Sonar or SonarScreen node")
|
|
return
|
|
# The glass belongs to the imported scene; adopt it so the cockpit scene
|
|
# can address it by unique name like any other instrument.
|
|
_screen.owner = owner
|
|
_screen.unique_name_in_owner = true
|
|
|
|
|
|
func housing() -> MeshInstance3D:
|
|
return _housing
|
|
|
|
|
|
func screen() -> MeshInstance3D:
|
|
return _screen
|
|
|
|
|
|
func control_count() -> int:
|
|
return 0 if _housing == null else HOUSING_CONTROL_COUNT
|