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

Arsenal - Add init/remove local events to Arsenal creation/destruction #9064

Merged
merged 8 commits into from Oct 22, 2022

Conversation

TACHarsis
Copy link
Contributor

@TACHarsis TACHarsis commented Oct 5, 2022

When merged this pull request will:

  • Add "ace_arsenal_boxInitialized" local event on the creation of an arsenal box via fnc_initBox

  • Add "ace_arsenal_boxRemoved" local event on the removal of an arsenal box via fnc_removeBox

  • Events are added to arsenal event list in docs

Why?: My mod adds sub actions to the arsenal interaction menu tree. Currently there is no way to cleanly hook into that process and add these extensions every time an arsenal is created. There is an event "initBox" that gets fired only in multiplayer and for global arsenals that works in certain cases, but feels like an abuse of an internal version.
I see no point of rewriting that event, as it clearly serves a specific purpose, not a gneralized one.
A generalized local event to enable reactions to arsenals being initiated or removed is the better solution and almost free.

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

* onInitArsenal fired when Arsenal got initiated
* onRemoveArsenal fired when Arsenal got removed

* added them to the arsenal event listing in the docs
addons/arsenal/functions/fnc_removeBox.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_removeBox.sqf Outdated Show resolved Hide resolved
TACHarsis and others added 2 commits October 6, 2022 13:13
Co-authored-by: BrettMayson <brett@mayson.io>
Co-authored-by: BrettMayson <brett@mayson.io>
addons/arsenal/functions/fnc_initBox.sqf Outdated Show resolved Hide resolved
docs/wiki/framework/arsenal-framework.md Outdated Show resolved Hide resolved
TACHarsis and others added 2 commits October 6, 2022 18:13
Co-authored-by: BrettMayson <brett@mayson.io>
@BrettMayson BrettMayson added this to the 3.16.0 milestone Oct 14, 2022
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Oct 22, 2022
@PabstMirror PabstMirror merged commit 95a5fb0 into acemod:master Oct 22, 2022
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.

None yet

3 participants