// 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 } // A network component is only actually attached to the network if a route // reaches it. The part's NetworkPort anchors on one component -- here // NetworkedHeatStorage -- and a NetworkRouter bridges that anchor to every // other network component on the part. The thermal battery ships no router, // because vanilla has nothing else to reach, so the broadcast above needs one // or it is never connected to anything and reads as absent. AutoRad_Router { Type = NetworkRouter RouteGenerators [ { Type = Bidirectional Routes [ [NetworkedHeatStorage, AutoRad_NetworkedHold, 0] ] } ] }