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:
Cyd
2026-07-27 12:30:13 -05:00
co-authored by Claude Fable 5
parent 341a503641
commit 30e4b5885d
4 changed files with 62 additions and 2 deletions
+17
View File
@@ -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 &)
{
+8
View File
@@ -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;