fix: carry signals as NetworkValue, not NetworkToggle

v1.0.0 loaded cleanly and did nothing in game. Every vanilla use of
NetworkToggle and NetworkToggleReceiver -- all three of them -- sets
IncludeInPhysical = false. They are blueprint stat-display plumbing and
carry no signal on a real ship, so the receivers always read off, the
vent gate stayed open, and radiators behaved exactly as in vanilla.

Broadcast 1/0 through NetworkValue and threshold it back into a toggle
on the receiving side. That is what the thermal amplification pump uses
to drive physical behaviour, and vanilla never sets IncludeInPhysical on
it anywhere.

Also repoint the radiator's power indicator at the gate, so an auto-idled
radiator is visibly idle instead of looking identical to a working one.

Tests grow a guard against the blueprint-only types, plus a check that
re-verifies that premise against the installed game data so the guard
cannot go stale, and a name-collision check against vanilla components.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oLWY1G6S8U35bi2FxVWni
This commit is contained in:
2026-08-28 23:37:21 +02:00
co-authored by Claude Opus 5
parent 831a628b53
commit 3ad03d7964
7 changed files with 250 additions and 73 deletions
+22 -9
View File
@@ -1,23 +1,36 @@
// ABOUT ME
// A single component merged into the Missile Launcher. It broadcasts, over the
// heat network, whether this launcher is currently set to Thermal Canister
// Missiles.
// Components merged into the Missile Launcher. They broadcast, over the heat
// network, whether this launcher is currently set to Thermal Canister Missiles.
//
// Why it exists: banking heat is only worth anything if something on the ship
// actually spends heat as ammunition. On a ship with no thermal launchers,
// holding the heat network near full buys nothing, so the radiators should just
// behave as they do in vanilla. Radiators treat the absence of this broadcast
// as permission to vent freely.
// behave as they do in vanilla. Radiators treat a received 0 as permission to
// vent freely.
//
// ThermalMissilesToggle is the launcher's own vanilla mode toggle
// (ModeToggle, Mode = MissileType, OnMode = 4), so this signal follows the
// player's ammunition selection live, including mid-battle switches.
//
// Carried as a NetworkValue rather than a NetworkToggle: vanilla marks every
// NetworkToggle IncludeInPhysical = false, so they do not carry a signal on a
// real ship.
NetworkedThermalAmmoUser
AutoRad_One { Type = StaticValue; Value = 1 }
AutoRad_Zero { Type = StaticValue; Value = 0 }
AutoRad_ThermalAmmoValue
{
Type = NetworkToggle
ToggleSource = ThermalMissilesToggle
Type = ToggleValueSelector
Toggle = ThermalMissilesToggle
ToggleOnValue = AutoRad_One
ToggleOffValue = AutoRad_Zero
}
AutoRad_NetworkedThermalAmmo
{
Type = NetworkValue
ValueSource = AutoRad_ThermalAmmoValue
Categories = [ auto_radiator_ammo_user ]
IncludeInPhysical = true
IncludeInBlueprints = false
}