might be worth checking with Alex if there's any way to tell if a given ShipAPI has a "temporary" FleetMemberAPI
Actually upon further testing it's not that big of an issue since even though wings get a temporary fleetMemberId, their fleetMember is still null. What is perplexing, though, is the way Arma Armatura handles its pilotable fighters. So in the DeployedFleetMemberAPI of the pilotable fighter, the isFighterWing() function returns false (so wingIfFighter is null and shipIfShip is not). However, dfm.getShip().isFighter() returns true, but wait! -- dfm.getShip().getWing() is null. It's a fighter... but actually it isn't... but actually it is... but actually it isn't.
Anyway, I changed it so that if a ship satisfies the following conditions:
- dfm.isFighterWing() is false
- dfm.getShip() is not null
- dfm.getShip().isFighter() is true
- dfm.getShip().getWing() is null OR dfm.getShip().getWing().getSourceShip() is null
- dfm.getShip().getFleetMember() is not null,
then the "base ship" of dfm.getShip() (the base ship is the ship that actually receives the XP, which usually is the carrier for fighter wings) will just be itself. Obviously this is a very specific change that basically only handles the Arma Armatura case, but it does work in practice.
I'll push this change out with the next update.