Based on branch #177 (refactor/squadIndex), which should be merged before this.
With this PR the squad id, squad choice (how the game indexes squads) and squad index (how the mod loader indexes squads) should now be correctly updated for every squad choice in the hangar; including Random, Custom and Secret Squads.
Window detection
Update window state detected via GetText immediately when detected instead of waiting for the next onFrameDrawStart hook.
Squad
Restrict mod squad id from being "Custom" or "Random"
onHangarSquadSelecte event now dispatches with 3 arguments: squadId, squadChoice and squadIndex. (From just squadId before)
Random- and Custom Squad are given the id/choice/index: "Random"/8/-1 and "Custom"/9/-1 respectively.
New Functions
HangarGetSelectedSquadIndex - returns the squad index of the selected squad in the hangar.
HangarGetSelectedSquadChoice - returns the squad choice of the selected squad in the hangar.
HangarIsRandomSquad - returns true if the selected squad is "Random" (Could be omitted since HangarGetSelectedSquadChoice can technically get the same information)
HangarIsCustomSquad - returns true if the selected squad is "Custom" (Could be omitted since HangarGetSelectedSquadChoice can technically get the same information)
Based on branch #177 (
refactor/squadIndex
), which should be merged before this.With this PR the squad id, squad choice (how the game indexes squads) and squad index (how the mod loader indexes squads) should now be correctly updated for every squad choice in the hangar; including Random, Custom and Secret Squads.
Window detection
Squad
onHangarSquadSelecte
event now dispatches with 3 arguments: squadId, squadChoice and squadIndex. (From just squadId before)New Functions
HangarGetSelectedSquadIndex
- returns the squad index of the selected squad in the hangar.HangarGetSelectedSquadChoice
- returns the squad choice of the selected squad in the hangar.HangarIsRandomSquad
- returns true if the selected squad is "Random" (Could be omitted since HangarGetSelectedSquadChoice can technically get the same information)HangarIsCustomSquad
- returns true if the selected squad is "Custom" (Could be omitted since HangarGetSelectedSquadChoice can technically get the same information)Test Mod