feat: auto-gate radiators on heat network surplus

Radiators and Thermal Canister Missile launchers pull from the same heat
pool with identical NetworkResourceOutput settings, and priorities.rules
defines no ordering for heat. A constantly-running radiator therefore
spends missile ammunition to make steam.

Gate radiator dissipation on three network signals instead of the raw
PowerToggle: a 98%/94% hysteresis band on the thermal battery, whether
any launcher is actually set to thermal ammo, and an override driven by
the engine's own OverflowHeatStorage as a safety net.

Storage fullness causes no damage on its own -- only overflow does, and
only above 350 status per tile -- so the band sits high deliberately to
keep the network full as a missile reserve.

Signal polarity is "hold", not "vent", so any ship missing a broadcaster
falls back to vanilla behaviour.

Includes an offline validation suite that resolves every patch target,
component reference and component Type against the installed game data,
since all three otherwise fail only as a crash on game load.

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:24:32 +02:00
co-authored by Claude Opus 5
commit 831a628b53
10 changed files with 1049 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
// ABOUT ME
// Components merged into the Radiator. They combine the three network signals
// this mod broadcasts into a single gate, AutoPowerToggle, which mod.rules then
// substitutes for the radiator's vanilla PowerToggle on the parts of the
// radiator that actually dissipate heat.
//
// The player's manual on/off switch (PowerToggle) is preserved and still wins:
// a radiator the player has switched off stays off. The automation can only
// idle a radiator the player has left on.
//
// A radiator vents when ANY of these hold:
// - the heat network is not asking it to hold (no battery, or battery full)
// - no launcher on the network is using thermal ammunition
// - some part is overflowing heat right now (safety net, overrides all)
HoldVentReceiver
{
Type = NetworkToggleReceiver
Categories = [ auto_radiator_hold ]
Mode = Any
AllowUncategorized = false
}
ThermalAmmoReceiver
{
Type = NetworkToggleReceiver
Categories = [ auto_radiator_ammo_user ]
Mode = Any
AllowUncategorized = false
}
ForceVentReceiver
{
Type = NetworkToggleReceiver
Categories = [ auto_radiator_force_vent ]
Mode = Any
AllowUncategorized = false
}
NotHolding
{
Type = MultiToggle
Toggles = [ HoldVentReceiver ]
Mode = None
}
NoThermalAmmo
{
Type = MultiToggle
Toggles = [ ThermalAmmoReceiver ]
Mode = None
}
VentAllowed
{
Type = MultiToggle
Toggles = [ NotHolding, NoThermalAmmo, ForceVentReceiver ]
Mode = Any
}
// The replacement gate. PowerToggle is the radiator's vanilla UIToggle, so the
// player's switch remains the master control.
AutoPowerToggle
{
Type = MultiToggle
Toggles = [ PowerToggle, VentAllowed ]
Mode = All
}