BT410 5.3.34: the weapon ammo readout goes live (0024)
BallisticWeaponCluster's two round counters pointed at UnboundIntegerSource because ProjectileWeapon::ammoBinLink is protected -- the documented inert gap in the ctor ledger. ProjectileWeapon now exposes GetAmmoCount() (the resolved bin's rounds, -1 with no bin) and the cluster copies it into a live cell each Execute, the same pattern it already uses for jammed and reloadSeconds. The binary pointed its NumericDisplayInteger straight at the resolved bin's count. The STREAK 6 panel now reads 0024 against the shipped binary's 0024, in the same font, stencilled into the fire-ready disc the same way. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,23 @@ ProjectileWeapon::~ProjectileWeapon()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
// GetAmmoCount -- the linked bin's rounds (-1 with no bin). The cockpit's
|
||||
// BallisticWeaponCluster ammo readout reads this each frame; the binary
|
||||
// pointed its NumericDisplayInteger straight at the resolved bin's count.
|
||||
//#############################################################################
|
||||
//
|
||||
int
|
||||
ProjectileWeapon::GetAmmoCount()
|
||||
{
|
||||
Check(this);
|
||||
|
||||
AmmoBin
|
||||
*bin = (AmmoBin *)ammoBinLink.Resolve();
|
||||
return (bin != NULL) ? bin->GetAmmoCount() : -1;
|
||||
}
|
||||
|
||||
Logical
|
||||
ProjectileWeapon::TestClass(Mech &)
|
||||
{
|
||||
|
||||
@@ -98,6 +98,14 @@
|
||||
);
|
||||
~ProjectileWeapon();
|
||||
|
||||
//
|
||||
// The linked bin's round count, or -1 when no bin is linked. The
|
||||
// cockpit's ammo readout needs this from BT_L4 and the link itself
|
||||
// is protected (the binary read the resolved bin's count direct).
|
||||
//
|
||||
int
|
||||
GetAmmoCount();
|
||||
|
||||
protected:
|
||||
SubsystemConnection ammoBinLink;
|
||||
int tracerInterval;
|
||||
|
||||
Reference in New Issue
Block a user