Add production bathymetric sonar slice
This commit is contained in:
1 parent
a18e82eb44
commit
7613daee84
28 files changed
+1825
-87
No files matched your search
@@ -3,6 +3,8 @@ extends Node
|
||||
|
||||
signal pause_requested
|
||||
signal rebind_result_available(result: RebindResult)
|
||||
signal sonar_scan_requested
|
||||
signal sonar_view_toggle_requested
|
||||
|
||||
const VehicleCommand = preload("res://game/application/vehicle/vehicle_command.gd")
|
||||
const CameraLookCommand = preload("res://game/application/vehicle/camera_look_command.gd")
|
||||
@@ -20,6 +22,8 @@ const ACTION_DESCEND := &"vehicle_descend"
|
||||
const ACTION_HIGH_THRUST := &"vehicle_high_thrust"
|
||||
const ACTION_EJECT := &"dive_eject"
|
||||
const ACTION_RECENTER_CAMERA := &"camera_recenter"
|
||||
const ACTION_SONAR_SCAN := &"sonar_scan"
|
||||
const ACTION_SONAR_VIEW_TOGGLE := &"sonar_view_toggle"
|
||||
const ACTION_PAUSE := &"pause_game"
|
||||
|
||||
const BINDABLE_ACTIONS: Array[StringName] = [
|
||||
@@ -32,6 +36,8 @@ const BINDABLE_ACTIONS: Array[StringName] = [
|
||||
ACTION_HIGH_THRUST,
|
||||
ACTION_EJECT,
|
||||
ACTION_RECENTER_CAMERA,
|
||||
ACTION_SONAR_SCAN,
|
||||
ACTION_SONAR_VIEW_TOGGLE,
|
||||
]
|
||||
|
||||
const ACTION_LABELS := {
|
||||
@@ -44,6 +50,8 @@ const ACTION_LABELS := {
|
||||
ACTION_HIGH_THRUST: "Forte poussée",
|
||||
ACTION_EJECT: "Éjection maintenue",
|
||||
ACTION_RECENTER_CAMERA: "Recentrer le regard",
|
||||
ACTION_SONAR_SCAN: "Émettre un relevé sonar",
|
||||
ACTION_SONAR_VIEW_TOGGLE: "Agrandir le sonar",
|
||||
}
|
||||
|
||||
const DEFAULT_KEYS := {
|
||||
@@ -56,6 +64,8 @@ const DEFAULT_KEYS := {
|
||||
ACTION_HIGH_THRUST: KEY_SHIFT,
|
||||
ACTION_EJECT: KEY_X,
|
||||
ACTION_RECENTER_CAMERA: KEY_R,
|
||||
ACTION_SONAR_SCAN: KEY_F,
|
||||
ACTION_SONAR_VIEW_TOGGLE: KEY_TAB,
|
||||
ACTION_PAUSE: KEY_ESCAPE,
|
||||
}
|
||||
|
||||
@@ -175,6 +185,15 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
pause_requested.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
return
|
||||
if _gameplay_enabled and not get_tree().paused:
|
||||
if event.is_action_pressed(ACTION_SONAR_SCAN):
|
||||
sonar_scan_requested.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
return
|
||||
if event.is_action_pressed(ACTION_SONAR_VIEW_TOGGLE):
|
||||
sonar_view_toggle_requested.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
return
|
||||
if (
|
||||
_gameplay_enabled
|
||||
and not get_tree().paused
|
||||
|
||||
Reference in new issue
Block a user