Add production bathymetric sonar slice

This commit is contained in:
chindit committed 2026-10-02 15:52:11 +02:00
1 parent a18e82eb44
commit 7613daee84
28 files changed
+1825 -87

No files matched your search

@@ -15,6 +15,10 @@ const COLOR_CRITICAL := Color(1.0, 0.42, 0.31, 1.0)
@onready var _integrity_label: Label3D = %IntegrityLabel
@onready var _return_label: Label3D = %ReturnLabel
@onready var _status_label: Label3D = %StatusLabel
@onready var _sonar_screen: MeshInstance3D = %SonarScreen
@onready var _sonar_placeholder: Label3D = %SonarPlaceholder
var _sonar_texture: Texture2D
func present(update: DiveUpdate, telemetry: VehicleTelemetry) -> void:
@@ -79,6 +83,22 @@ func return_text() -> String:
return _return_label.text
func attach_sonar_texture(texture: Texture2D) -> void:
_sonar_texture = texture
var material := StandardMaterial3D.new()
material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
material.albedo_texture = texture
material.emission_enabled = true
material.emission_texture = texture
material.emission_energy_multiplier = 1.7
_sonar_screen.material_override = material
_sonar_placeholder.visible = false
func sonar_texture() -> Texture2D:
return _sonar_texture
func _return_text(estimate: ReturnEstimate) -> String:
match estimate.status:
ReturnEstimate.Status.SAFE: