diff --git a/context/decomp-reference.md b/context/decomp-reference.md index 5568adf..d06c4ce 100644 --- a/context/decomp-reference.md +++ b/context/decomp-reference.md @@ -363,6 +363,30 @@ From the weapon `.SUB` records + the charge-curve `.data` constants (PE-parsed a (master-gated) + `GetEjectPermitted()` accessor; `BT_EJECT_LOG=1` logs the arm edges. Adjacent table fact: id 0x1a `DuckRequest@0049fa00` latches mech+0x398 = 1 — that latch has NO reader anywhere in the image (vestigial). +- **THE TECHSTATUS / GAUGE-ALARM MODEL decoded 2026-08-04 [T1]:** the gauge-alarm + "condition" = a **STATUS-FLAG BIT INDEX** (0..6, TechStatusTypeCount). MechTech's + `TechnicalAssistance` edge-scans every monitored subsystem's `GetStatusFlags()` + (vtable +0x30) and on a bit flip calls `ReportStatusSet/Cleared(sink, owner, sub, + bitIndex, alarmModel)` → `GaugeAlarmManager::Activate(condition=bitIndex)` → the + SHARED 'mechalrm' stream's items matching that condition flash their lamps + (SetAlertState → RIO flashFast). The bit table, all byte-grounded overrides: + **bit 0** structure ≥ StatusThreshold (@004ac18c) | **bit 1** structure > + StatusFloor | **bit 2** coolantActive && HeatModelActive (CoolantLeaking) | + **bit 3** heatAlarm ≠ 0 | **bit 4** linked AmmoBin cookOffArmed (**AmmoBurning**) + | **bit 5** weaponAlarm == 5 (**Jammed**) | **bit 6** !HasVoltage (no usable + voltage; `HasVoltage` = source stateAlarm==2 Ready && |outputVoltage| > ε, + @004b0b5c). **Invite semantics:** conds 4/5 → gotoEngineering 0x80 + engEject + 0x85 = the AMMO purge/unjam invite (flashes the very key whose streamed function + is EjectAmmo msg 0xB) — NEVER pilot eject; cond 6 → 0x80 + engBusMode 0x86 = + the bus-switch invite; cond 2 → the coolant loop/placement lamps (#98). The + PANIC LAMP (mode-linked, solid) is the SOLE pilot-eject indicator. **Electrical + subtlety [T1, @0049c9a8 + FUN_004b1f7c]:** the crit distributor touches nothing + electrical, and the generator sim has NO Ready-case recompute — a generator + destroyed IN PLACE keeps stale Ready voltage (no bit-6 invite) until any + transition (thermal trip → stateAlarm 4 GeneratorOut, short, switch-off) + recomputes output via `(1 − damage) × rated` and zeroes it. stateAlarm 4's + producer = the THERMAL BREAKER in GeneratorSimulation itself; a 2026-08-03 + destruction→state-4 bridge was removed as unfounded. - **DEATH SCORE COST decoded 2026-08-02 (#118 tail) [T1]:** the death handler tail `@004c07cd-0x4c0828` (inside the @004c05c4 export gap — missing from the #52 reconstruction) gates on `advancedDamageOn`(+0x264) and hands the ENGINE base diff --git a/game/reconstructed/mechsub.cpp b/game/reconstructed/mechsub.cpp index 3c35a44..ee50252 100644 --- a/game/reconstructed/mechsub.cpp +++ b/game/reconstructed/mechsub.cpp @@ -287,13 +287,14 @@ void MechSubsystem::ForceCriticalFailure() { ((DamageZone *)damageZone)->SetDamageZoneState(1); // zone+0x10 } - // Generator: also reach the OUT display state (stateAlarm 4) so the - // authored gotoEngineering + engEject FLASH invite fires (alarm stream - // conditions 4/5). [T3 inferred link -- see Generator::MarkGeneratorOut.] - { - extern void BTGeneratorMarkOut(::Subsystem *sub); // powersub.cpp - BTGeneratorMarkOut(this); - } + // (A MarkGeneratorOut call lived here 2026-08-03 for a few hours -- + // REMOVED same night when the alarm dig completed: the gauge-alarm + // conditions are STATUS-FLAG BITS scanned by MechTech, not stateAlarm + // levels. Generator death raises bit 6 (!HasVoltage) AUTHENTICALLY -> + // the gotoEngineering + engBusMode invite; conditions 4/5 (engEject) + // are the WEAPON's AmmoBurning/Jammed bits -- the ammo-purge invite, + // never a pilot-eject one. stateAlarm 4's real producer remains + // unfound (export holes) and nothing observable needs it.) } // issue #22 (PORT): the fresh-mech respawn repair -- the exact inverse of the diff --git a/game/reconstructed/powersub.hpp b/game/reconstructed/powersub.hpp index bd6f354..1f2a741 100644 --- a/game/reconstructed/powersub.hpp +++ b/game/reconstructed/powersub.hpp @@ -468,15 +468,17 @@ class Generator; int GeneratorStateOf() { return stateAlarm.GetLevel(); } // source+0x210 - // DESTRUCTION -> the OUT display state (stateAlarm 4). [T3 inferred - // link, 2026-08-03]: both endpoints are byte-verified -- the eject - // evaluator treats stateAlarm==4 as generator-dead (@0049fa1c) and the - // authored alarm streams flash the gotoEngineering + engEject invite on - // conditions 4/5 -- but the binary's destroyed->SetLevel(4) call site - // sits in unexported code (no FUN_0041bbd8(+0x1fc,4) in the flat - // export). Called from MechSubsystem::ForceCriticalFailure via the - // BTGeneratorMarkOut bridge; replace with the exact site when the - // MechSubsystem::TakeDamage / OnAlarmChanged cluster is reconstructed. + // UNUSED -- and now PROVEN unnecessary (2026-08-04 dig): stateAlarm 4 + // (GeneratorOut) is the THERMAL BREAKER state, produced by + // GeneratorSimulation itself (heatAlarm==FailureHeat -> SetLevel 4, + // byte-matched vs FUN_004b1f7c) -- never by destruction. The gauge + // alarms scan STATUS-FLAG BITS via MechTech (bit 6 = !HasVoltage); + // a generator destroyed IN PLACE keeps its stale Ready voltage in + // the BINARY TOO (the crit distributor @0049c9a8 touches nothing + // electrical) until any transition recomputes output through the + // (1 - damage) formula. A short-lived ForceCriticalFailure bridge + // to this method was removed as unfounded; keep the method only as + // documentation of the state's meaning. void MarkGeneratorOut() { stateAlarm.SetLevel(GeneratorOut); } Scalar