Files
cosmoteer-pressure-relief-r…/components/overclock_overflow_signal.rules
T
TotenKnopfandClaude Opus 5 3ad03d7964 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
2026-08-28 23:37:21 +02:00

49 lines
1.6 KiB
Plaintext

// ABOUT ME
// Components merged into base_part_overclock, the shared base for every
// overclockable part. They form the mod's safety net.
//
// Why it exists: the threshold band on the thermal battery is a prediction. It
// can be wrong -- if the ship generates heat faster than its radiators can
// clear it, or if heat pipe topology cannot deliver to the batteries quickly
// enough, heat overflows regardless of what percentage the band is set to.
//
// OverflowHeatStorage is the engine's own ground truth for that: heat only ever
// reaches it when the network has already refused the heat, which is the exact
// moment the part starts cooking itself. Any part in that state forces every
// radiator on the network to vent, ignoring the band entirely.
//
// The timer holds the signal for a few seconds so a stream of per-tick overflow
// events becomes one steady "vent now" rather than a flicker.
//
// 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.
AutoRad_OverflowTimer
{
Type = Timer
Duration = 3
StartExpired = true
StartTrigger = OverflowHeatStorage
ResetTrigger = OverflowHeatStorage
}
AutoRad_One { Type = StaticValue; Value = 1 }
AutoRad_Zero { Type = StaticValue; Value = 0 }
AutoRad_OverflowValue
{
Type = ToggleValueSelector
Toggle = AutoRad_OverflowTimer
ToggleOnValue = AutoRad_One
ToggleOffValue = AutoRad_Zero
}
AutoRad_NetworkedForceVent
{
Type = NetworkValue
ValueSource = AutoRad_OverflowValue
Categories = [ auto_radiator_force_vent ]
IncludeInBlueprints = false
}