-
Notifications
You must be signed in to change notification settings - Fork 148
-
Notifications
You must be signed in to change notification settings - Fork 148
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
CBA_fnc_removeWeaponCargo deletes MX LSW #725
Comments
Must be because |
Nope, problem is actually in
|
|
Unsure how to go about this, since there is no base class without linked items, you can't pass a weapon to retain attachments, you can only fully remove it. Another way would be adding another argument to remove or keep attachments instead of figuring that out from non-preset class - that would also be consistent with how I want to add support for keeping contents of backpacks/wearables in @commy2 @Killswitch00 thoughts? |
The MX SW might not be the only weapon effected by this either, did you test with the other machineguns that come with bipods? |
How about evaluating the difference between the attachments of the baseWeapon and the provided weapon? btw: I'm missing the support of the manual |
Since
is the case, there is no way to add this weapon without bipod attachment to a box with scripting. |
|
Yes commy, but we want to remove it, problem is the function can't make out if attachments should be retained or not, because I based that on comparison of non-preset equals passed. I think the best way is another param, that way you could pass preset or non-preset and always get same results based on "keep attachments" param. Same would then be for other functions for "keep contents". |
Imo the result should be: ["arifle_mx_sw_f"] call CBA_fnc_weaponComponents
-> ["arifle_mx_sw_f"] So unlike the BIS version, it should not list "bipod_01_f_snd", because that is an element of the most basic weapon. |
That's not what the function is.
|
Well, there is no base weapon without attachments in some cases. |
Exactly, which is why it returns Those functions do exactly what they are supposed to. The only problem is how we handle them in |
I also think about usefulness and I'd prefer a function that reported the most basic weapon and all other attachments. |
But we can't change what it returns now, that would break backwards compatibility on anyone relying that it returns That doesn't solve the issue with |
I have no idea how your keep attachments proposal would work, as it seems to me to be impossible to add this weapon without bipod. |
I think, the best way would be a rewrite of |
It's
I added that in #706 and specifically asked if that is wanted or not, then it simply got merged without any answer, so I assumed it was wanted. I would still prefer a param for that rather. And with this "not every weapon has base class without preset attachments" it'll have to be changed to that anyways it seems. |
Well, then I don't know. I don't have any use for either personally. |
Actually, there is a point you made @commy2 we were relying on adding non-preset weapon, because a preset weapon can have custom attachments on them, and just readding a preset weapon would make them disappear (that is the other weapons in the container, not the one we are removing, since they all get removed and then readded). The only way I see to do that now is to read I don't see what we can do about this, since there is no way to add a weapon with specific attachments to the container, might as well make a note that attachments will reappear on those weapons (bipod in this case)? |
Yes, there is no way around that. |
Arma 3 Version:
1.72
(stable)CBA Version:
3.4.0
(stable)Mods:
Description:
This appears to be an issue with the function CBA_fnc_getNonPresetClass, which returns an empty string for arifle_MX_SW_F and all variants.
Screenshot of post-function-call inventory: https://i.imgur.com/fTHi9Ob.jpg
Steps to reproduce:
Where did the issue occur?
RPT log file:
Warning Message: Picture equip\w\w_.paa not found
The text was updated successfully, but these errors were encountered: