Skip to content

Commit

Permalink
Medical/Repair 3den Toolbox State Fix (Bug fix for #4902) (#4905)
Browse files Browse the repository at this point in the history
* Update medical/repair 3den away from missionNamespace

* Simplify save
  • Loading branch information
AACO authored and PabstMirror committed Feb 18, 2017
1 parent 9d12815 commit 0900bf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions addons/medical/CfgEden.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Cfg3DEN {
};
};
class GVAR(isMedicControl): Title {
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 = "(lbCurSel (_this controlsGroupCtrl 100)) - 1";
class Controls: Controls {
class Title: Title{};
class Value: ctrlToolbox {
Expand All @@ -22,7 +22,6 @@ class Cfg3DEN {
rows = 1;
columns = 4;
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)};
onToolboxSelChanged = "missionnamespace setvariable ['ace_isMedic_temp',_this select 1];";
};
};
};
Expand All @@ -36,7 +35,7 @@ class Cfg3DEN {
control = QGVAR(isMedicControl);
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
tooltip = CSTRING(Attributes_isMedic_Description);
expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
expression = QUOTE(if (_value > -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
typeName = "NUMBER";
condition = "objectBrain";
defaultValue = "-1";
Expand Down
5 changes: 2 additions & 3 deletions addons/repair/CfgEden.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Cfg3DEN {
};
};
class GVAR(isEngineerControl): Title {
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
attributeSave = "(missionnamespace getvariable ['ace_isEng_temp',0]) - 1;";
attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);";
attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1";
class Controls: Controls {
class Title: Title{};
class Value: ctrlToolbox {
Expand All @@ -22,7 +22,6 @@ class Cfg3DEN {
rows = 1;
columns = 4;
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_specialist)};
onToolboxSelChanged = "missionnamespace setvariable ['ace_isEng_temp',_this select 1];";
};
};
};
Expand Down

0 comments on commit 0900bf9

Please sign in to comment.