FR: Add scripting function to recalculate loadout counts
There should be a way for FSO to be forced to recalculate loadout values, so that if a script updates sexp variables, it can be reflected in the loadout screen. Currently, the variables cannot be updated at the right time to change loadout values.
Alternatively, we could allow direct control over the values. It all depends on the effort the developer wants to put in.
This is a feature absolutely required by BtA.
Chatting with @JohnAFernandez, and it seems like a way to do this is by adding a hook at line 518 of missionscreencommon.cpp, that, in thinking, should allow modifications after everything else is loaded. Will examine after stable is completed.
Adding a hook there didn't quite work. The loadout seems to actually be built during mission parse, so missionscreencommon.cpp was too late. A hook in missionparse.cpp just before loadout calculations begin is what was required in my testing. PR soon.