From d0b21de34c2d10e50912add18694be7fc7b039fc Mon Sep 17 00:00:00 2001 From: bgkillas Date: Sat, 16 Nov 2024 15:55:09 -0500 Subject: [PATCH] add '/' to spectate self --- noita-proxy/assets/lang/en-US/main.ftl | 2 +- quant.ew/files/system/spectate/spectate.lua | 5 ++++- quant.ew/settings.lua | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/noita-proxy/assets/lang/en-US/main.ftl b/noita-proxy/assets/lang/en-US/main.ftl index 7bca890e..f37a69ce 100644 --- a/noita-proxy/assets/lang/en-US/main.ftl +++ b/noita-proxy/assets/lang/en-US/main.ftl @@ -135,7 +135,7 @@ Shift-hue = Shift hue ## Connected Show-debug-info = Show debug/connection info -hint_spectate = Use [',' or d-pad-left] and ['.' or d-pad-right] keys to spectate over other players. +hint_spectate = Use [',' or d-pad-left] and ['.' or d-pad-right] keys to spectate over other players. '/' for self hint_ping = [Middle mouse button or right thumb stick] spawns a ping Show-debug-plot = Show debug plot Record-everything-sent-to-noita = Record EVERYTHING sent to noita. diff --git a/quant.ew/files/system/spectate/spectate.lua b/quant.ew/files/system/spectate/spectate.lua index 65de3689..631278ed 100644 --- a/quant.ew/files/system/spectate/spectate.lua +++ b/quant.ew/files/system/spectate/spectate.lua @@ -334,6 +334,9 @@ function spectate.on_world_update() has_switched = true re_cam = true + elseif InputIsKeyJustDown(tonumber(ModSettingGet("quant.ew.rebind_sspectate"))) then + camera_player_id, camera_player = get_me() + re_cam = true end set_camera_pos() ctx.spectating_over_peer_id = camera_player_id @@ -346,7 +349,7 @@ function spectate.on_world_update() if GameGetIsGamepadConnected() then text = "Use d-pad-left and d-pad-right keys to spectate over other players." else - text = "Use ',' and '.' keys to spectate over other players." + text = "Use ',' and '.' keys to spectate over other players. '/' for self" end local tw, th = GuiGetTextDimensions(gui, text) GuiText(gui, w-2-tw, h-1-th, text) diff --git a/quant.ew/settings.lua b/quant.ew/settings.lua index e30c98a8..55a50646 100755 --- a/quant.ew/settings.lua +++ b/quant.ew/settings.lua @@ -126,6 +126,15 @@ local function build_settings() is_waiting_for_input = false, scope = MOD_SETTING_SCOPE_RUNTIME, }, + { + id = "rebind_sspectate", + ui_name = "spectate self Button", + ui_description = "self.", + value_default = "56", + ui_fn = ui_get_input, + is_waiting_for_input = false, + scope = MOD_SETTING_SCOPE_RUNTIME, + }, }, }, }