-
Notifications
You must be signed in to change notification settings - Fork 738
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
Medical - Add arsenal category #9220
Medical - Add arsenal category #9220
Conversation
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Arsenal doesn't support magazines in custom categories
Have you tried this change with your other PR (#9221)? I had difficulties adding more than 10 categories (Seems to be capped at 10, but I'm not entirely sure) |
There's a hard limit on 10 extra categories in the arsenal, yeah. Out of scope for this, but why someone would have more than 10 extra categories is beyond me. |
Well, when this PR and #9221 gets merged, only one will be displayed, because adding just one will reach 10 limit and any newly registered categories will not work. So essentially, your other PR is for nothing because it will never be displayed if this gets merged as well due to reaching that limit. I like this change and splitting things into categories. In KAM, we have our own Medical category, but your solution is better. However, when you add your other category for Field Rations, it won't work together. I wanted to add a separate category for GreenMag and a couple of other mods as well, so the limit should be addressed when this PR is tampering with the categories in this way. |
Not the case on not doing anything, the categories work in addition to the base ones. Both PRs merged: Category handling is out of scope for this one, and I don't see a good way to do it (adding a scroll bar there would be hell). |
I see. Then I must have made some kind of mistake when I was adding new category using the same way and it was not working for me (At that time, I only had 2 categories added as an extra). Thank you for testing it out together. |
Excess categories could be hidden under another "category" button (3 dots or something like in mobile apps) that shows overlay menu with them temporarily after being clicked. |
_list pushBack (configName _x); | ||
} forEach (_fnc_isMedicalItem configClasses (configFile >> "CfgWeapons")); | ||
|
||
uiNamespace setVariable [QGVAR(treatmentItems), compileFinal str (_list arrayIntersect _list)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you storing code? I don't like this, this should store an array that gets cache-invalidated as necessary. Not sure how other things in Arsenal are done though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #9220 (comment), though I don't see a reason we need to protect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we do that for other variables in ace_arsenal
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I really don't see the reason. @PabstMirror ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is how we've been storing things computed at prestart
see https://github.com/acemod/ACE3/blob/master/addons/cargo/XEH_preStart.sqf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can swing either way, but arsenal just leaves things unprotected (performance concerns, I guess). I guess once 2.14 compileFinal hits this can be switched to a proper data type anyway.
When merged this pull request will:
Contains all items in ACE_Medical_Treatment_Actions, compatible with third party mods that add medical items (OPTRE, KAM (though not all items from KAM are added apparently? This should be fixed on their end with API)). Should clean up Misc Items a bit.
Uses Medical GUI icon if that's available. Vanilla medical icon is ugly.
See also #9221.
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.