Skip to content
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

Merged
merged 13 commits into from
Jul 9, 2023

Conversation

SpicyBagpipes
Copy link
Contributor

@SpicyBagpipes SpicyBagpipes commented Jul 1, 2023

When merged this pull request will:
Enable child classes of ACE_wirecutter to have the same functionality.

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

Change check for wire cutters for all child classes in addition to current class
@LinkIsGrim LinkIsGrim added the kind/enhancement Release Notes: **IMPROVED:** label Jul 1, 2023
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 \
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

SpicyBagpipes and others added 4 commits July 3, 2023 19:12
Better performing searching for wirecutter

Co-authored-by: BrettMayson <brett@mayson.io>
Index all possible wirecutters
arrayIntersect with possible wirecutters
@SpicyBagpipes
Copy link
Contributor Author

@mharis001 Was the above what you had in mind?

Incorrect quotes
Add iswirecutter to wirecutter
@SpicyBagpipes SpicyBagpipes requested a review from BrettMayson July 3, 2023 20:26
Remove pointless parentheses
SpicyBagpipes and others added 2 commits July 4, 2023 01:59
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>
@PabstMirror PabstMirror added this to the 3.16.0 milestone Jul 7, 2023
@LinkIsGrim
Copy link
Contributor

Wirecutter stuff doesn't have any documentation currently, should do that in another PR.

@SpicyBagpipes
Copy link
Contributor Author

Wirecutter stuff doesn't have any documentation currently, should do that in another PR.

Mind if you point me towards where to/how to?

@LinkIsGrim
Copy link
Contributor

LinkIsGrim commented Jul 9, 2023

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.

@LinkIsGrim LinkIsGrim merged commit 05c9e42 into acemod:master Jul 9, 2023
@SpicyBagpipes
Copy link
Contributor Author

Documentation proposed in #9248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants