I'm planning on writing a brief script to add a player action that would add or remove the suppressor so that I could add that action to all units in a player-controlled ai squad. Thus, when the player deems it tactically appropriate, they could hit ~, 6, and whatever the relevant number is for the "go loud" or "go soft" action.
Since addPrimaryWeaponItem only takes the item name for an input, not the slot it goes to, I assume that the slot information is written into the specific item's class. Can I tell unassignItem or removePrimaryWeaponItem to remove based on slot rather than by specific item? If so, how?
While I'm prepared to write the code by comparing the results of primaryWeaponItem to some master list of attachments, it seems like there is a better, faster way, provided the unassignItem method works the way I want it to work.