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
93 lines
2.7 KiB
Plaintext
93 lines
2.7 KiB
Plaintext
// ABOUT ME
|
|
// Components merged into the Thermal Battery. The battery is the ship's heat
|
|
// gauge, so it is what decides whether the heat network has surplus worth
|
|
// venting, and broadcasts that decision to every radiator on the network.
|
|
//
|
|
// The broadcast is a NetworkValue carrying 1 (hold) or 0 (vent), not a
|
|
// NetworkToggle. Every NetworkToggle in vanilla sets IncludeInPhysical = false
|
|
// -- they exist only for blueprint stat display and do not carry a signal on a
|
|
// real ship. NetworkValue has no such restriction and is what the thermal
|
|
// amplification pump uses to drive actual physical behaviour.
|
|
//
|
|
// Polarity is deliberate: the battery broadcasts "HOLD", not "vent". A ship
|
|
// with no thermal battery has no broadcaster, every radiator reads 0, and
|
|
// radiators behave exactly as in vanilla.
|
|
//
|
|
// Heat storage fullness causes no damage on its own -- damage only occurs when
|
|
// the network refuses heat and it overflows onto the producing part
|
|
// (base_part_overclock.rules: HeatDistributionStorage adds InOrder, network
|
|
// first, OverflowHeatStorage second). So the band sits high on purpose, keeping
|
|
// the network full as a deep ammunition reserve for Thermal Canister Missiles.
|
|
//
|
|
// All names are prefixed to avoid colliding with vanilla component names.
|
|
|
|
// Vent when the battery is essentially full.
|
|
AutoRad_VentCeiling
|
|
{
|
|
Type = ThresholdToggle
|
|
ValueFrom = HeatStorage
|
|
MinAmount = 98%
|
|
}
|
|
|
|
// Stop venting once there is real headroom again.
|
|
AutoRad_VentFloor
|
|
{
|
|
Type = ThresholdToggle
|
|
ValueFrom = HeatStorage
|
|
MaxAmount = 94%
|
|
}
|
|
|
|
AutoRad_CeilingTrigger
|
|
{
|
|
Type = ToggleTrigger
|
|
Toggle = AutoRad_VentCeiling
|
|
TriggerWhenOn = true
|
|
TriggerWhenOff = false
|
|
}
|
|
|
|
AutoRad_FloorTrigger
|
|
{
|
|
Type = ToggleTrigger
|
|
Toggle = AutoRad_VentFloor
|
|
TriggerWhenOn = true
|
|
TriggerWhenOff = false
|
|
}
|
|
|
|
// The deadband: latches on at the ceiling, stays on until the floor is reached.
|
|
// Without this the radiators would chatter on and off at the threshold.
|
|
AutoRad_VentLatch
|
|
{
|
|
Type = TriggeredToggle
|
|
OnTrigger = AutoRad_CeilingTrigger
|
|
OffTrigger = AutoRad_FloorTrigger
|
|
}
|
|
|
|
// OR the raw ceiling back in, so a ship that loads already above the ceiling
|
|
// vents immediately instead of waiting for a threshold crossing that never comes.
|
|
AutoRad_VentActive
|
|
{
|
|
Type = MultiToggle
|
|
Toggles = [ AutoRad_VentLatch, AutoRad_VentCeiling ]
|
|
Mode = Any
|
|
}
|
|
|
|
AutoRad_One { Type = StaticValue; Value = 1 }
|
|
AutoRad_Zero { Type = StaticValue; Value = 0 }
|
|
|
|
// 1 while the network should hold its heat, 0 while it should vent.
|
|
AutoRad_HoldValue
|
|
{
|
|
Type = ToggleValueSelector
|
|
Toggle = AutoRad_VentActive
|
|
ToggleOnValue = AutoRad_Zero
|
|
ToggleOffValue = AutoRad_One
|
|
}
|
|
|
|
AutoRad_NetworkedHold
|
|
{
|
|
Type = NetworkValue
|
|
ValueSource = AutoRad_HoldValue
|
|
Categories = [ auto_radiator_hold ]
|
|
IncludeInBlueprints = false
|
|
}
|