Medical/Repair 3den Toolbox State Fix (Bug fix for #4902) (#4905)

* Update medical/repair 3den away from missionNamespace

* Simplify save
This commit is contained in:
Mark Ruffner 2017-02-18 12:27:36 -06:00 committed by Glowbal
parent 5240c225e6
commit cd526b7f5e
2 changed files with 5 additions and 7 deletions

View File

@ -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 {
@ -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];";
};
};
};
@ -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";

View File

@ -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 {
@ -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];";
};
};
};