BT410 5.3.36: the cooling-loop lamp goes live (OFF -> the loop digit)
CoolingLoopConnection::Update wrote a constant 0 -- the documented inert stub -- because HeatSink::coolantAvailable, HeatSink::linkedSinks and Condenser::condenserNumber are protected with no accessor, so every MFD panel showed OFF where the shipped cockpit shows the loop number. heat.hpp now publishes GetCoolantAvailable(), ResolveCoolingMaster() and GetCondenserNumber(), and the connection follows the binary: a sink with coolant reports the loop number of the Condenser it is plumbed to, otherwise frame 0. Same shape as PowerSourceConnection beside it, which was already live and already matched. The box now reads 4 / A against the shipped binary's 4 / A, pixel for pixel. head missing extra Mfd1 1331 -> 1107 1776 -> 1646 Mfd2 1908 -> 1616 2196 -> 1981 Mfd3 730 -> 584 1119 -> 1014 Cockpit: 96.6% identical / 96% coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -362,6 +362,16 @@
|
||||
|
||||
~HeatSink();
|
||||
|
||||
//
|
||||
// The cockpit's cooling-loop lamp needs both of these from BT_L4:
|
||||
// whether this sink has coolant, and which sink it is plumbed to
|
||||
// (the loop master, whose Condenser number IS the lamp's frame).
|
||||
//
|
||||
int
|
||||
GetCoolantAvailable() const { Check(this); return coolantAvailable; }
|
||||
Subsystem *
|
||||
ResolveCoolingMaster() { Check(this); return linkedSinks.Resolve(); }
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Local Data
|
||||
//
|
||||
@@ -484,6 +494,12 @@
|
||||
void
|
||||
RefrigerationSimulation(Scalar time_slice);
|
||||
|
||||
//
|
||||
// The loop number (1..6) -- the cockpit lamp's image-strip frame.
|
||||
//
|
||||
int
|
||||
GetCondenserNumber() const { Check(this); return condenserNumber; }
|
||||
|
||||
protected:
|
||||
int valveState;
|
||||
int condenserNumber;
|
||||
|
||||
@@ -94,6 +94,10 @@
|
||||
# include <projweap.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(HEAT_HPP)
|
||||
# include <heat.hpp>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static const Scalar SeekVoltageXScale = 230.0f; // 0x43660000
|
||||
@@ -293,6 +297,40 @@ static Scalar
|
||||
// (the per-frame sampler Gauge::Update drives -- GAUGE.CPP:569).
|
||||
//###########################################################################
|
||||
|
||||
//
|
||||
// The cooling-loop lamp's frame: the loop number of the Condenser this
|
||||
// subsystem's sink is plumbed to, or 0 ("OFF") when it has no coolant,
|
||||
// no loop master, or a master that is not a Condenser.
|
||||
//
|
||||
static int
|
||||
CoolingLoopFrameOf(void *source)
|
||||
{
|
||||
Subsystem
|
||||
*subsystem = (Subsystem *)source;
|
||||
if (subsystem == NULL
|
||||
|| !subsystem->IsDerivedFrom(HeatSink::ClassDerivations))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
HeatSink
|
||||
*sink = (HeatSink *)subsystem;
|
||||
if (sink->GetCoolantAvailable() != 1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Subsystem
|
||||
*master = sink->ResolveCoolingMaster();
|
||||
if (master == NULL
|
||||
|| !master->IsDerivedFrom(Condenser::ClassDerivations))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ((Condenser *)master)->GetCondenserNumber();
|
||||
}
|
||||
|
||||
//
|
||||
// CoolingLoopConnection -- @004c3134 ctor / @004c31a0 sampler (vt 0x518ea8).
|
||||
// The binary: when the source subsystem's coolant loop is available
|
||||
@@ -300,10 +338,12 @@ static Scalar
|
||||
// "HeatSink" link == linkedSinks) and shows its Condenser loop number
|
||||
// (condenserNumber == the image-strip frame); otherwise 0.
|
||||
//
|
||||
// INERT STUB: HeatSink::coolantAvailable, HeatSink::linkedSinks and
|
||||
// Condenser::condenserNumber are protected with no published accessor or
|
||||
// attribute row in source410 (heat.hpp) -- the loop lamp draws frame 0
|
||||
// ("OFF") until the heat accessor wave lands.
|
||||
// LIVE (5.3.36): heat.hpp now publishes GetCoolantAvailable() /
|
||||
// ResolveCoolingMaster() / GetCondenserNumber(), so the lamp follows the
|
||||
// binary exactly -- the same shape as PowerSourceConnection below. A sink
|
||||
// with no coolant, no loop master, or a master that is not a Condenser
|
||||
// reads frame 0 ("OFF"), which is what the box showed for every panel
|
||||
// while this was stubbed.
|
||||
//
|
||||
class CoolingLoopConnection : public GaugeConnection
|
||||
{
|
||||
@@ -315,7 +355,7 @@ public:
|
||||
{}
|
||||
void Update() // @004c31a0
|
||||
{
|
||||
*destination = 0;
|
||||
*destination = CoolingLoopFrameOf(source);
|
||||
}
|
||||
protected:
|
||||
void *source; // @0x10 this[4]
|
||||
|
||||
Reference in New Issue
Block a user