Improve production cockpit realism
This commit is contained in:
1 parent
7613daee84
commit
5455ae7928
9 files changed
+668
-21
No files matched your search
@@ -5,6 +5,9 @@ const DiveUpdate = preload("res://game/domain/dive/dive_update.gd")
|
||||
const DiveAlertLevel = preload("res://game/domain/dive/dive_alert_level.gd")
|
||||
const ReturnEstimate = preload("res://game/domain/dive/return_estimate.gd")
|
||||
const VehicleTelemetry = preload("res://game/application/dive/vehicle_telemetry.gd")
|
||||
const CockpitDetailing = preload(
|
||||
"res://game/presentation/cockpit/cockpit_detailing.gd"
|
||||
)
|
||||
|
||||
const COLOR_NORMAL := Color(0.45, 0.89, 0.90, 1.0)
|
||||
const COLOR_ATTENTION := Color(1.0, 0.75, 0.20, 1.0)
|
||||
@@ -17,6 +20,7 @@ const COLOR_CRITICAL := Color(1.0, 0.42, 0.31, 1.0)
|
||||
@onready var _status_label: Label3D = %StatusLabel
|
||||
@onready var _sonar_screen: MeshInstance3D = %SonarScreen
|
||||
@onready var _sonar_placeholder: Label3D = %SonarPlaceholder
|
||||
@onready var _detailing: CockpitDetailing = %CockpitDetailing
|
||||
|
||||
var _sonar_texture: Texture2D
|
||||
|
||||
@@ -65,6 +69,7 @@ func present(update: DiveUpdate, telemetry: VehicleTelemetry) -> void:
|
||||
maxi(snapshot.alerts.hull, snapshot.alerts.depth)
|
||||
)
|
||||
_status_label.modulate = _alert_color(snapshot.alerts.maximum)
|
||||
_detailing.present(update, telemetry)
|
||||
|
||||
|
||||
func resources_text() -> String:
|
||||
@@ -99,6 +104,10 @@ func sonar_texture() -> Texture2D:
|
||||
return _sonar_texture
|
||||
|
||||
|
||||
func detailing() -> CockpitDetailing:
|
||||
return _detailing
|
||||
|
||||
|
||||
func _return_text(estimate: ReturnEstimate) -> String:
|
||||
match estimate.status:
|
||||
ReturnEstimate.Status.SAFE:
|
||||
|
||||
Reference in new issue
Block a user