2018-10-21 22:07:19 +00:00
|
|
|
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
|
|
|
|
|
|
|
|
#define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer'))
|
|
|
|
#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(canRepair),0)
|
|
|
|
|
2016-02-22 08:50:20 +00:00
|
|
|
class ctrlToolbox;
|
|
|
|
|
2016-02-07 22:56:45 +00:00
|
|
|
class Cfg3DEN {
|
2016-02-22 08:50:20 +00:00
|
|
|
class Attributes {
|
|
|
|
class Default;
|
|
|
|
class Title: Default {
|
|
|
|
class Controls {
|
|
|
|
class Title;
|
|
|
|
};
|
|
|
|
};
|
2016-02-22 17:26:32 +00:00
|
|
|
class GVAR(isEngineerControl): Title {
|
2017-02-18 18:27:36 +00:00
|
|
|
attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);";
|
|
|
|
attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1";
|
2016-02-22 08:50:20 +00:00
|
|
|
class Controls: Controls {
|
|
|
|
class Title: Title{};
|
|
|
|
class Value: ctrlToolbox {
|
|
|
|
idc = 100;
|
|
|
|
style = "0x02";
|
2016-07-12 07:32:18 +00:00
|
|
|
x = "48 * (pixelW * pixelGrid * 0.50)";
|
|
|
|
w = "82 * (pixelW * pixelGrid * 0.50)";
|
|
|
|
h = "5 * (pixelH * pixelGrid * 0.50)";
|
2016-02-22 08:50:20 +00:00
|
|
|
rows = 1;
|
|
|
|
columns = 4;
|
2017-06-08 17:10:35 +00:00
|
|
|
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_advanced)};
|
2016-02-22 08:50:20 +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_isEngineer {
|
|
|
|
property = QUOTE(ace_isEngineer);
|
2016-02-07 22:56:45 +00:00
|
|
|
displayName = CSTRING(AssignEngineerRole_role_DisplayName);
|
|
|
|
tooltip = CSTRING(AssignEngineerRole_role_Description);
|
2018-10-21 22:07:19 +00:00
|
|
|
expression = QUOTE(if !(_value == DEFAULT_ISENGINEER || {_value == -1}) then {_this setVariable [ARR_3('%s',_value,true)]});
|
2016-02-07 22:56:45 +00:00
|
|
|
typeName = "NUMBER";
|
|
|
|
condition = "objectBrain";
|
2018-10-21 22:07:19 +00:00
|
|
|
defaultValue = QUOTE(DEFAULT_ISENGINEER);
|
2016-02-22 17:26:32 +00:00
|
|
|
control = QGVAR(isEngineerControl);
|
2016-02-07 22:56:45 +00:00
|
|
|
};
|
2016-02-10 00:17:18 +00:00
|
|
|
class ace_isRepairVehicle {
|
|
|
|
property = QUOTE(ace_isRepairVehicle);
|
2016-02-07 22:56:45 +00:00
|
|
|
value = 0;
|
|
|
|
control = "CheckboxNumber";
|
2016-02-20 00:51:25 +00:00
|
|
|
displayName = CSTRING(AssignRepairVehicle_role_DisplayName);
|
|
|
|
tooltip = CSTRING(AssignRepairVehicle_role_Description);
|
2018-10-21 22:07:19 +00:00
|
|
|
expression = QUOTE(if (_value != DEFAULT_ISREPAIRVEHICLE) then {_this setVariable [ARR_3('%s',_value,true)]});
|
2016-02-07 22:56:45 +00:00
|
|
|
typeName = "NUMBER";
|
|
|
|
condition = "objectVehicle";
|
2018-10-21 22:07:19 +00:00
|
|
|
defaultValue = QUOTE(DEFAULT_ISREPAIRVEHICLE);
|
2016-02-07 22:56:45 +00:00
|
|
|
};
|
2018-10-21 22:07:19 +00:00
|
|
|
class ace_isRepairFacility: ace_isRepairVehicle {
|
2016-02-10 00:17:18 +00:00
|
|
|
property = QUOTE(ace_isRepairFacility);
|
2016-02-20 00:51:25 +00:00
|
|
|
displayName = CSTRING(AssignRepairFacility_role_DisplayName);
|
|
|
|
tooltip = CSTRING(AssignRepairFacility_role_Description);
|
2016-02-07 22:56:45 +00:00
|
|
|
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
|
|
|
};
|
2017-12-07 14:29:54 +00:00
|
|
|
class GVAR(editorLoadedTracks) {
|
|
|
|
displayName = CSTRING(editorLoadedTracks);
|
|
|
|
tooltip = CSTRING(editorLoadedTracks_tooltip);
|
|
|
|
property = QGVAR(editorLoadedTracks);
|
|
|
|
control = "Edit";
|
|
|
|
expression = "_this setVariable ['%s',_value];";
|
2017-12-07 17:01:31 +00:00
|
|
|
defaultValue = "[0,1] select (_this isKindOf 'Tank')"; // must match pre init script
|
2017-12-07 14:29:54 +00:00
|
|
|
validate = "number";
|
|
|
|
condition = "objectHasInventoryCargo";
|
|
|
|
typeName = "NUMBER";
|
|
|
|
};
|
2018-10-21 22:07:19 +00:00
|
|
|
class GVAR(editorLoadedWheels): GVAR(editorLoadedTracks) {
|
2017-12-07 14:29:54 +00:00
|
|
|
displayName = CSTRING(editorLoadedWheels);
|
|
|
|
tooltip = CSTRING(editorLoadedWheels_tooltip);
|
|
|
|
property = QGVAR(editorLoadedWheels);
|
2017-12-07 17:01:31 +00:00
|
|
|
defaultValue = "[0,1] select (_this isKindOf 'Car')"; // must match pre init script
|
2017-12-07 14:29:54 +00:00
|
|
|
};
|
2016-02-07 22:56:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|