-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtered getUnitLoadout #1236
Comments
Idea:
CBA_fnc_setUnitLoadout = {
params ["_unit", "_loadout"];
_loadout = _loadout call CBA_fnc_generalizeLoadout;
_unit setLoadout _loadout;
}; CBA_fnc_getUnitLoadout = {
params ["_unit"];
getUnitLoadout _unit call CBA_fnc_generalizeLoadout
}; Question is how it is supposed to know what is a derived item. Would need some config entry pointing to the correct class. |
I like the addition of generalizeLoadout so it can be used without directly affecting a unit, I hadn't considered that. I do still think it should be using code from mods however, and not doing it automatically. |
We have ACE Arsenal config entries for that. Might be worth adding a filter for that within ACE? |
Is your feature request related to a problem?
Some mods (TFAR, ACRE, Unique Maps) use an ID system to track individual items. This will cause issues with
getUnitLoadout
andsetUnitLoadout
.Solution you'd like:
CBA_fnc_getUnitLoadout
that is a drop in replacement for its vanilla counterpart. Also createCBA_fnc_addUnitLoadoutFilter
andCBA_fnc_removeUnitLoadoutFilter
that take code as a parameter, that code takes agetUnitLoadout
array and must return agetUnitLoadout
array. The code will be used to replace any ID items with their base version.Additional context:
ACRE Example
The text was updated successfully, but these errors were encountered: