Skip to content

Wardrobe - Add onItemChanged* Events#11137

Merged
PabstMirror merged 16 commits intoacemod:masterfrom
Andx667:master
Nov 22, 2025
Merged

Wardrobe - Add onItemChanged* Events#11137
PabstMirror merged 16 commits intoacemod:masterfrom
Andx667:master

Conversation

@Andx667
Copy link
Copy Markdown
Contributor

@Andx667 Andx667 commented Nov 15, 2025

When merged this pull request will:

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

@Andx667 Andx667 changed the title Wardrobe - Add Events on change Wardrobe - Add Event on Item changed Nov 15, 2025
@Andx667 Andx667 marked this pull request as ready for review November 15, 2025 09:41
@PabstMirror PabstMirror added this to the 3.20.2 milestone Nov 16, 2025
@PabstMirror PabstMirror added the kind/change Release Notes: **CHANGED:** label Nov 16, 2025
Andx667 and others added 2 commits November 16, 2025 07:20
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Copy link
Copy Markdown
Member

@LinkIsGrim LinkIsGrim left a comment

Choose a reason for hiding this comment

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

Might be overkill, but maybe before and after events instead of a single event? And add the equipment type to the event args.

@Andx667
Copy link
Copy Markdown
Contributor Author

Andx667 commented Nov 16, 2025

Might be overkill, but maybe before and after events instead of a single event? And add the equipment type to the event args.

Dont think we need a before and after. #11139

Can add the type.

Copy link
Copy Markdown
Contributor

@johnb432 johnb432 left a comment

Choose a reason for hiding this comment

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

This has to be inserted at line 55 of FUNC(replace), because _classOrigin isn't passed to the replace functions.
Also if we add other functions in the future, we don't have to think about adding the 'after' event on a per function/file basis. So line 55 would be like:

[{
    params ["_player", "_classOrigin", "_classTarget", "_equipmentType", "_replaceCode"];
    
    [_player, _classTarget, _equipmentType] call _replaceCode;
    
    [QGVAR(itemChangedAfter), [_player, _classOrigin, _classTarget, _equipmentType]] call CBA_fnc_localEvent;
}, [_player, _classOrigin, _classTarget, _equipmentType, _replaceCode], _duration] call CBA_fnc_waitAndExecute;

@Andx667 Andx667 changed the title Wardrobe - Add Event on Item changed Wardrobe - Add Events on Item changed Nov 16, 2025
@Andx667 Andx667 changed the title Wardrobe - Add Events on Item changed Wardrobe - Add onItemChanged* Events Nov 19, 2025
Copy link
Copy Markdown
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

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

it looks great
Image

@PabstMirror PabstMirror merged commit 8f673a1 into acemod:master Nov 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/change Release Notes: **CHANGED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants