OnBestGeLoadoutApplied_Listener now uses ELD_OnStateSubmitted deferral, and applies only to RPGO soldiers, and only if weapon restrictions are enabled.
Different state submission method for the RPGOSpecializationsAssigned event to make it possible for the OnBestGeLoadoutApplied_Listener to listen to that event using the ELD_OnStateSubmitted deferral. It does not appear to trigger at all when using AddGameStateToHistory().
OnBestGeLoadoutApplied_Listener now listens to rjSquadSelect_UpdateData event instead of the OnBestGearLoadoutApplied. This is necessary due to differences between Make Weapons Available buttons in the base game, and Unequip Barracks in RJSS. The first one automatically re-equips the soldier with fitting equipment, which makes the OnBestGeLoadoutApplied_Listener unnecessary and harmful, causing the item duplication bug.
So special handling is necessary only for RJSS's Unequip Barracks, which simply strips soldiers of their gear. For now using rjSquadSelect_UpdateData is enough for basic function, but it's preferable to add a new event into RJSS that triggers specifically when clicking that button.
OnBestGeLoadoutApplied_Listener
now usesELD_OnStateSubmitted
deferral, and applies only to RPGO soldiers, and only if weapon restrictions are enabled.Different state submission method for the
RPGOSpecializationsAssigned
event to make it possible for theOnBestGeLoadoutApplied_Listener
to listen to that event using theELD_OnStateSubmitted
deferral. It does not appear to trigger at all when usingAddGameStateToHistory()
.OnBestGeLoadoutApplied_Listener
now listens torjSquadSelect_UpdateData
event instead of theOnBestGearLoadoutApplied
. This is necessary due to differences between Make Weapons Available buttons in the base game, and Unequip Barracks in RJSS. The first one automatically re-equips the soldier with fitting equipment, which makes theOnBestGeLoadoutApplied_Listener
unnecessary and harmful, causing the item duplication bug.So special handling is necessary only for RJSS's Unequip Barracks, which simply strips soldiers of their gear. For now using
rjSquadSelect_UpdateData
is enough for basic function, but it's preferable to add a new event into RJSS that triggers specifically when clicking that button.