-
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
Logistics Wirecutter - Add modded class support #9235
Logistics Wirecutter - Add modded class support #9235
Conversation
Change check for wire cutters for all child classes in addition to current class
fix bracket
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
@@ -88,7 +88,7 @@ | |||
#define CUT_TIME_ENGINEER 7.5 | |||
|
|||
#define HAS_WIRECUTTER(unit) (\ | |||
"ACE_wirecutter" in (unit call EFUNC(common,uniqueItems)) \ | |||
count ((unit call EFUNC(common,uniqueItems)) select {_x isKindOf ["ACE_wirecutter", configFile >> "CfgWeapons"]}) > 0 \ |
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.
Best approach would be to add a config entry that defines whether an item is a wirecutter so inheritance from the ACE item isn't strictly required.
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.
Agreed though am unsure how best to do that in a performant manner without iterating through all unique items
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.
Pre-compile a list of all wirecutters and check if the unit has any of them.
Better performing searching for wirecutter Co-authored-by: BrettMayson <brett@mayson.io>
Index all possible wirecutters
arrayIntersect with possible wirecutters
@mharis001 Was the above what you had in mind? |
Incorrect quotes
Add iswirecutter to wirecutter
Remove pointless parentheses
fix for incorrect arrayintersect check Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Incorrect quoting Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Wirecutter stuff doesn't have any documentation currently, should do that in another PR. |
Mind if you point me towards where to/how to? |
https://github.com/acemod/ACE3/tree/master/docs/wiki/framework, new file (wirecutter-framework.md?), use one of the existing files as template. |
Documentation proposed in #9248 |
When merged this pull request will:
Enable child classes of ACE_wirecutter to have the same functionality.
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.