From 0089b3284ff0fcfa8bb960ac6d329a30c6be6abe Mon Sep 17 00:00:00 2001 From: Joe DiPrima Date: Mon, 3 Aug 2026 14:10:43 -0500 Subject: [PATCH] Eject firsthand prep: G = coolant Flush binding + BT_FLUSH_HOLD scalpel The Flush ACTION existed in the input engine but no key was bound in the shipped CONTROLS.MAP -- desktop players could never hold the flush. G (free) now maps to it. BT_FLUSH_HOLD= extends the BT_FLUSH_TEST scalpel past its 60-frame edge test for tank-dry benches. Dry-run finding (fl.log): a full flush drains the tank to 0/14 in ~30 s, but does NOT arm eject by itself -- InjectCoolant moves tank coolant INTO the loops (the bank RISES), and idle heat draw is too slow to burn the loops down to the 5% arm threshold in minutes. Firsthand arming needs sustained fire after tank-dry (or coolant-loop leak damage / generator loss). Matches the binary's intent: eject arms when LEAKED nearly dry. Co-Authored-By: Claude Fable 5 --- content/CONTROLS.MAP | 6 ++++++ game/reconstructed/mech4.cpp | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/content/CONTROLS.MAP b/content/CONTROLS.MAP index 57a8e91..3c9ebad 100644 --- a/content/CONTROLS.MAP +++ b/content/CONTROLS.MAP @@ -165,6 +165,12 @@ pad Start action ModeCycle pad RightThumb action DisplayCycle pad Back action Valve +# COOLANT FLUSH -- HELD key dumps reservoir coolant into the loops +# (Reservoir InjectCoolant, msg 4). The tank drains while held; with the +# tank empty the loops burn coolant with no refill -- run hot long enough +# and the bank drops below 5%, which ARMS the eject (Panic lights). +key G action Flush + # PANIC / EJECT -- the punch-out (Mech msg 0x19). Only fires on a CRIPPLED # mech (no generators, coolant leaked below 5%, or leg-gimped novice) -- a # healthy mech refuses the button, so a stray press is a no-op. diff --git a/game/reconstructed/mech4.cpp b/game/reconstructed/mech4.cpp index 1b47a3b..a38e070 100644 --- a/game/reconstructed/mech4.cpp +++ b/game/reconstructed/mech4.cpp @@ -6724,7 +6724,15 @@ void ++s_ftFrame; int t0 = atoi(getenv("BT_FLUSH_TEST")); if (t0 < 1) t0 = 600; - gBTFlushKey = (s_ftFrame >= t0 && s_ftFrame < t0 + 60) ? 1 : 0; + // BT_FLUSH_HOLD= (default 60): the eject firsthand recipe + // needs a tank-dry hold, not just the 1 s edge test. + static int s_ftHold = 0; + if (s_ftHold == 0) + { + const char *h = getenv("BT_FLUSH_HOLD"); + s_ftHold = (h && atoi(h) > 0) ? atoi(h) : 60; + } + gBTFlushKey = (s_ftFrame >= t0 && s_ftFrame < t0 + s_ftHold) ? 1 : 0; } // Gitea #46 scripted verify (BT_BAYTEST=): at the given sim frame