CntoDev / cnto-additions

Other
0 stars 1 forks source link

"CNTO-Factions Check" Tools Menu #38

Open JamesTheClarke opened 2 years ago

JamesTheClarke commented 2 years ago

https://discord.com/channels/154907081256730624/283017590362603521/913367476039991296

freghar commented 2 years ago

To be more specific;

The dropdown menu item would work on selected objects only, and copy something like the following to the clipboard (and give an Eden green bar notification about what it did):

Mods used by soldier loadout:
@rhs_usaf : rhsusf_weapons, rhsusf_scopes, rhsusf_props
@rhs_afrf : rhs_weapons2

Mods used by cargo inventory (vehicles, crates):
@niarms : hlc_WP_FAL

Mods from requiredAddons:
@cnto_factions : cnto_factions_shared
@rhs_gref : rhsgref_c_vehicles_ret

The first part would be done via getUnitLoadout and checking configSourceAddonList for each CfgWeapons classname (and looking them up in CfgPatches, doing configSourceModList on each), ... or maybe just calling configSourceAddonList on the soldier if it takes the current (non-engine) loadout into consideration.

The second part would be Config traversal through the four Transport* classes, doing the same configSourceAddonList for each CfgWeapons entry found.

The third part would be figuring out configSourceAddonList for all the selected units/objects, extracting a list of their own CfgPatches, pulling their own requiredAddons from there and doing configSourceModList on each line.

... All of the above probably done via HashMaps, indexed by @mod names or something.