-
Notifications
You must be signed in to change notification settings - Fork 736
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
Medical/Repair 3den Toolbox State Fix (Bug fix for #4902) #4905
Conversation
addons/medical/CfgEden.hpp
Outdated
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);"; | ||
attributeSave = "(missionnamespace getvariable ['ace_isMedic_temp',0]) - 1;"; | ||
attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);"; | ||
attributeSave = "(_this getVariable ['ace_isMedic_temp', 0]) - 1;"; |
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.
Why does this exist in the first place?
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.
That's how BIS does attributes:
class Rank: Toolbox {
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (['private','corporal','sergeant','lieutenant','captain','major','colonel'] find _value);";
attributeSave = "['private','corporal','sergeant','lieutenant','captain','major','colonel'] select (missionnamespace getvariable ['Rank_value',0]);";
class Controls: Controls {
class Value: Value {
tooltips[] = {"Private", "Corporal", "Sergeant", "Lieutenant", "Captain", "Major", "Colonel"};
onToolboxSelChanged = "missionnamespace setvariable ['Rank_value',_this select 1];";
};
};
};
Does rank have the same issue as ace's medic setting?
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.
Storing this on the control seems really pointless. The control itself already has a state. I'm not sure this fix is correct.
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.
If we use a default value of 0 we can probably get away with just using the toolbox state, otherwise it'd always save to the SQM, albeit it'd be the correct value.
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.
@PabstMirror to your point about the rank module, I'm really not sure. The rank (and stance) toolboxes are stored as bonafide unit attributes, so I'm going to speculate and say BI is cheating and treats those slightly differently.
Talking with @AACO - The way BIS does rank must use some special engine stuff as it works fine. The current code's problem is using |
:\ |
Simple fix to store the toolbox state on the control level, instead of the missionNamespace level.
Resolves #4902