diff --git a/Assets/_Project/Scripts/Client/Input/DebugInputInjectionSystem.cs b/Assets/_Project/Scripts/Client/Input/DebugInputInjectionSystem.cs index d65578a4a..d8ee1fd7f 100644 --- a/Assets/_Project/Scripts/Client/Input/DebugInputInjectionSystem.cs +++ b/Assets/_Project/Scripts/Client/Input/DebugInputInjectionSystem.cs @@ -53,6 +53,12 @@ namespace ProjectM.Client /// override). The ability cooldown still gates how many shots actually result. public static void Fire(int frames = 10) { Active = true; FireFrames = math.max(FireFrames, frames); } + /// Per-socket fire holds (LANTERN 4-socket kit). Each held frame raises that socket's fire event. + public static readonly int[] SocketFrames = new int[SocketId.Count]; + + /// Hold socket 's fire for the next frames (also enables override). + public static void FireSocket(int i, int frames = 10) { Active = true; if ((uint)i < (uint)SocketId.Count) SocketFrames[i] = math.max(SocketFrames[i], frames); } + /// Convenience: hold a planar move heading (also enables override). public static void SetMove(float x, float z) { Active = true; Move = new float2(x, z); } @@ -60,7 +66,7 @@ namespace ProjectM.Client public static void SetAim(float x, float z) { Active = true; Aim = new float2(x, z); } /// Convenience: stop overriding and clear all injected input. - public static void Stop() { Active = false; Move = default; Aim = default; FireFrames = 0; } + public static void Stop() { Active = false; Move = default; Aim = default; FireFrames = 0; for (int i = 0; i < SocketId.Count; i++) SocketFrames[i] = 0; } protected override void OnCreate() { @@ -74,6 +80,11 @@ namespace ProjectM.Client bool fire = FireFrames > 0; if (FireFrames > 0) FireFrames--; + // LANTERN 4-socket kit: per-socket fire holds, decremented once per frame. + bool s0 = SocketFrames[0] > 0; if (SocketFrames[0] > 0) SocketFrames[0]--; + bool s1 = SocketFrames[1] > 0; if (SocketFrames[1] > 0) SocketFrames[1]--; + bool s2 = SocketFrames[2] > 0; if (SocketFrames[2] > 0) SocketFrames[2]--; + bool s3 = SocketFrames[3] > 0; if (SocketFrames[3] > 0) SocketFrames[3]--; float2 move = Move; float2 aim = Aim; @@ -88,6 +99,10 @@ namespace ProjectM.Client input.ValueRW.Scheme = Scheme; if (fire) input.ValueRW.Fire.Set(); + if (s0) input.ValueRW.Socket0.Set(); + if (s1) input.ValueRW.Socket1.Set(); + if (s2) input.ValueRW.Socket2.Set(); + if (s3) input.ValueRW.Socket3.Set(); } } }