-
Notifications
You must be signed in to change notification settings - Fork 748
wardrobe - transfer variables on item change #11139
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
Conversation
|
maybe we do need a before event. will add to the other PR |
|
but we have no way to know if the setVar should be global sync or not I think we may need to handle this with events inside gunbag |
|
TFAR uses setVars on backpacks for radio settings this is what I came up with for controlling setVar broadcast setting so we only transfer if explicitly set? |
| { _this call (GVAR(exceptions) get (_this#0) select 1) } | ||
| ] call CBA_fnc_addEventHandler; | ||
|
|
||
| GVAR(containerVarsToTransfer) = createHashMapFromArray [ |
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.
Add doc comment explaining what this does?
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.
Would also note in wardrobe wiki that variable needs to be added here I guess
When merged this pull request will:
If a variable is set on a unit's vest, backpack, uniform; the variables will not be present on the new one. We instead transfer all existing variables onto the new item.
I can see this PR being rejected, because we don't set these variables globally. Technically, you could set a variable on a remote unit's container. As far as I know there is no way to check if this has occurred, and this information will be lost on wardrobe change. I guess if there is an event for an item change before and after the
setLoadoutis called, then the person who made this insane decision can transfer the variables themselfIMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}.