2019-06-03 15:31:46 +00:00
|
|
|
|
|
|
|
#define GRID_3DEN_W (pixelW * pixelGrid * 0.5)
|
|
|
|
#define GRID_3DEN_H (pixelH * pixelGrid * 0.5)
|
|
|
|
|
2019-06-12 01:02:40 +00:00
|
|
|
#define DEFAULT_IS_MEDIC (parseNumber (_this getUnitTrait 'medic'))
|
2019-06-03 15:31:46 +00:00
|
|
|
#define DEFAULT_IS_MEDICAL_VEHICLE (getNumber (configFile >> 'CfgVehicles' >> typeOf _this >> 'attendant') > 0)
|
2019-06-12 01:02:40 +00:00
|
|
|
#define DEFAULT_IS_MEDICAL_FACILITY (typeOf _this in GVAR(facilityClasses))
|
2019-06-03 15:31:46 +00:00
|
|
|
|
2016-02-22 17:26:32 +00:00
|
|
|
class ctrlToolbox;
|
|
|
|
|
2016-02-07 22:56:45 +00:00
|
|
|
class Cfg3DEN {
|
2016-02-22 17:26:32 +00:00
|
|
|
class Attributes {
|
|
|
|
class Default;
|
|
|
|
class Title: Default {
|
|
|
|
class Controls {
|
|
|
|
class Title;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
class GVAR(isMedicControl): Title {
|
2019-06-03 15:31:46 +00:00
|
|
|
attributeLoad = QUOTE((_this controlsGroupCtrl 100) lbSetCurSel (0 max (_value + 1) min 3));
|
|
|
|
attributeSave = QUOTE(lbCurSel (_this controlsGroupCtrl 100) - 1);
|
2016-02-22 17:26:32 +00:00
|
|
|
class Controls: Controls {
|
2019-06-03 15:31:46 +00:00
|
|
|
class Title: Title {};
|
2016-02-22 17:26:32 +00:00
|
|
|
class Value: ctrlToolbox {
|
|
|
|
idc = 100;
|
2023-02-02 05:28:55 +00:00
|
|
|
x = QUOTE(48 * GRID_3DEN_W);
|
|
|
|
w = QUOTE(82 * GRID_3DEN_W);
|
|
|
|
h = QUOTE(5 * GRID_3DEN_H);
|
2016-02-22 17:26:32 +00:00
|
|
|
rows = 1;
|
|
|
|
columns = 4;
|
2019-06-03 15:31:46 +00:00
|
|
|
strings[] = {
|
|
|
|
"$STR_3DEN_Attributes_Lock_Default_text",
|
|
|
|
CSTRING(AssignMedicRoles_role_none),
|
|
|
|
CSTRING(AssignMedicRoles_role_medic),
|
|
|
|
CSTRING(AssignMedicRoles_role_doctorShort)
|
|
|
|
};
|
2016-02-22 17:26:32 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2016-02-07 22:56:45 +00:00
|
|
|
class Object {
|
|
|
|
class AttributeCategories {
|
2016-02-10 00:17:18 +00:00
|
|
|
class ace_attributes {
|
2016-02-07 22:56:45 +00:00
|
|
|
class Attributes {
|
2016-02-10 00:17:18 +00:00
|
|
|
class ace_isMedic {
|
2016-02-07 22:56:45 +00:00
|
|
|
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
|
|
|
|
tooltip = CSTRING(Attributes_isMedic_Description);
|
2019-06-03 15:31:46 +00:00
|
|
|
property = QUOTE(ace_isMedic);
|
|
|
|
control = QGVAR(isMedicControl);
|
|
|
|
expression = QUOTE(if (_value != -1 && {_value != DEFAULT_IS_MEDIC}) then {_this setVariable [ARR_3(QQEGVAR(medical,medicClass),_value,true)]});
|
|
|
|
defaultValue = QUOTE(DEFAULT_IS_MEDIC);
|
2016-02-07 22:56:45 +00:00
|
|
|
condition = "objectBrain";
|
2019-06-03 15:31:46 +00:00
|
|
|
typeName = "NUMBER";
|
2016-02-07 22:56:45 +00:00
|
|
|
};
|
2016-02-10 00:17:18 +00:00
|
|
|
class ace_isMedicalVehicle {
|
2016-02-20 00:51:25 +00:00
|
|
|
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
|
|
|
|
tooltip = CSTRING(Attributes_isMedicalVehicle_Description);
|
2019-06-03 15:31:46 +00:00
|
|
|
property = QUOTE(ace_isMedicalVehicle);
|
|
|
|
control = "Checkbox";
|
|
|
|
expression = QUOTE(_this setVariable [ARR_3(QQEGVAR(medical,isMedicalVehicle),_value,true)]);
|
|
|
|
defaultValue = QUOTE(DEFAULT_IS_MEDICAL_VEHICLE);
|
2016-02-07 22:56:45 +00:00
|
|
|
condition = "objectVehicle";
|
2019-06-03 15:31:46 +00:00
|
|
|
typeName = "BOOL";
|
2016-02-07 22:56:45 +00:00
|
|
|
};
|
2016-02-10 00:17:18 +00:00
|
|
|
class ace_isMedicalFacility {
|
2016-02-20 00:51:25 +00:00
|
|
|
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
|
|
|
|
tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
|
2019-06-03 15:31:46 +00:00
|
|
|
property = QUOTE(ace_isMedicalFacility);
|
|
|
|
control = "Checkbox";
|
2018-08-11 10:40:06 +00:00
|
|
|
expression = QUOTE(_this setVariable [ARR_3(QQEGVAR(medical,isMedicalFacility),_value,true)];);
|
2019-06-12 01:02:40 +00:00
|
|
|
defaultValue = QUOTE(DEFAULT_IS_MEDICAL_FACILITY);
|
2019-06-03 15:31:46 +00:00
|
|
|
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
|
|
|
typeName = "BOOL";
|
2016-02-07 22:56:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|