I've written a potential refactor for the assignGear files, specifically the parts of the files that do per-unit assignment. A preview of this new format can be found here: https://pastebin.com/ahPRdUru (will PR this eventually).
This new format uses a "top-down" approach instead of the current "bottom-up" approach. Instead of assigning gear on a per-unit basis and having an individual loadout for each unit type, this new approach instead defines a whole bunch of "loadout packages" that represent common sets of equipment for units (for example: "has an assault rifle", "has a bag", "has this particular combination of grenades"). These loadout packages are then assigned to units (for example, an AT Rifleman might have the bag, carbine rifle, assault grenade loadout, and LAT packages).
Pros:
Makes common platoon-level operations much easier (for example: removing frag grenades from all units but riflemen, changing which units have binoculars, changing weapon types for multiple classes).
Simplifies many loadout tweaks by making them copy+paste instead of having to modify inventory code.
Makes information about platoon loadouts much more accessible through clustering of information. Answering a question like "which of my units have rifles/frag grenades/binoculars/rocket launchers?" involves checking a few lines instead of the entire file.
Significantly reduces filesize (the prototype is a 15KB file that replaces two 15KB files).
The new format is, strictly speaking, a superset of the old format through the custom loadout section, meaning that most of the flexibility of the old format is maintained.
Cons
Complicates assignGear's structure, possibly making it more difficult for new missionmakers to fully understand.
Makes it more difficult to see an individual unit's loadout (though this can be done by looking at an assignGeared unit's inventory instead).
In some cases, may make tweaks to individual classes more difficult (for example, making AARs have one less mag than other rifle classes).
Makes very fine grained control over loadouts more difficult (for example, it's effectively impossible to assign items specifically to a vest without entirely ignoring the new loadout packages system).
I've written a potential refactor for the assignGear files, specifically the parts of the files that do per-unit assignment. A preview of this new format can be found here: https://pastebin.com/ahPRdUru (will PR this eventually).
This new format uses a "top-down" approach instead of the current "bottom-up" approach. Instead of assigning gear on a per-unit basis and having an individual loadout for each unit type, this new approach instead defines a whole bunch of "loadout packages" that represent common sets of equipment for units (for example: "has an assault rifle", "has a bag", "has this particular combination of grenades"). These loadout packages are then assigned to units (for example, an AT Rifleman might have the bag, carbine rifle, assault grenade loadout, and LAT packages).
Pros:
Cons