From dcdd7dd0a7077e95629263a423a8b81b88c4530d Mon Sep 17 00:00:00 2001 From: arcattack Date: Wed, 15 Jul 2026 21:44:42 -0500 Subject: [PATCH] Audio: register Generator.GeneratorOn -> generatorOn (@0x1D4) (task #50) The last cleanly-backed subsystem audio attr: GeneratorOn (AudioLogicalTrigger) now resolves to the real generatorOn member instead of the inert pad. Static for now (init 1, no shutdown writer drives it to 0 yet), but bound correctly. Remaining inert attrs (ReportLeak/ConfigureActivePress/MotionState/ SpeedOfTorsoHorizontal/TargetRangeExponent) have no modeled backing member in their size-locked subsystem layouts -- they read the inert pad (silent, no crash) until those members are reconstructed. Co-Authored-By: Claude Opus 4.8 (1M context) --- game/reconstructed/powersub.cpp | 3 ++- game/reconstructed/powersub.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/game/reconstructed/powersub.cpp b/game/reconstructed/powersub.cpp index b16eb41..fdf9041 100644 --- a/game/reconstructed/powersub.cpp +++ b/game/reconstructed/powersub.cpp @@ -886,7 +886,8 @@ const Generator::IndexEntry Generator::AttributePointers[]= { ATTRIBUTE_ENTRY(Generator, OutputVoltage, outputVoltage), // @0x1DC - ATTRIBUTE_ENTRY(Generator, GeneratorState, stateAlarm) // @0x1FC (0x54 StateIndicator-compatible alarm; SetLevel fires audio) + ATTRIBUTE_ENTRY(Generator, GeneratorState, stateAlarm), // @0x1FC (0x54 StateIndicator-compatible alarm; SetLevel fires audio) + ATTRIBUTE_ENTRY(Generator, GeneratorOn, generatorOn) // @0x1D4 (AudioLogicalTrigger; init 1 -- static until a shutdown writer drives it to 0) }; Generator::AttributeIndexSet& diff --git a/game/reconstructed/powersub.hpp b/game/reconstructed/powersub.hpp index 9c56f86..0d73758 100644 --- a/game/reconstructed/powersub.hpp +++ b/game/reconstructed/powersub.hpp @@ -343,6 +343,7 @@ class Generator; enum { OutputVoltageAttributeID = HeatSink::NextAttributeID, GeneratorStateAttributeID, // audio binds an AudioStateWatcher -> stateAlarm (0x54 StateIndicator) + GeneratorOnAttributeID, // audio binds an AudioLogicalTrigger -> generatorOn (@0x1D4) NextAttributeID }; private: