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

Common - Add FUNC(getItemReplacements) #10413

Merged
merged 4 commits into from
Oct 15, 2024
Merged

Conversation

LinkIsGrim
Copy link
Contributor

When merged this pull request will:

  • Add an API function to get item replacements from an item type or classname.

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}.

@LinkIsGrim LinkIsGrim added the kind/enhancement Release Notes: **IMPROVED:** label Oct 13, 2024
@LinkIsGrim LinkIsGrim added this to the 3.18.2 milestone Oct 13, 2024
* Example:
* ["FirstAidKit", false] call ace_common_fnc_getItemReplacements
*
* Public: Yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want to make this API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't much care, but I see no reason not to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just thinking of potential maintenance - up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it ever breaks I won't be around anymore

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
@johnb432
Copy link
Contributor

You can register [] as an item replacer, which removes the registered item. If this is going to be API, we need a way to tell between that and the default value (maybe return nil if not defined?).

@johnb432 johnb432 changed the title Common - Add FUNC(getItemReplacements) Common - Add FUNC(getItemReplacements) Oct 13, 2024
@PabstMirror PabstMirror merged commit 8e794eb into master Oct 15, 2024
3 checks passed
@PabstMirror PabstMirror deleted the common-check-itemReplacement branch October 15, 2024 19:57
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.

3 participants