mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3393 from acemod/3denReplaceDropDown
Fix 3den attributes
This commit is contained in:
commit
7cf912222b
@ -8,7 +8,7 @@ class Cfg3DEN {
|
|||||||
control = "Checkbox";
|
control = "Checkbox";
|
||||||
displayName = CSTRING(ModuleHandcuffed_DisplayName);
|
displayName = CSTRING(ModuleHandcuffed_DisplayName);
|
||||||
tooltip = CSTRING(ModuleHandcuffed_Description);
|
tooltip = CSTRING(ModuleHandcuffed_Description);
|
||||||
expression = QUOTE([ARR_2(_this,_value)]call FUNC(setHandcuffed));
|
expression = QUOTE(if (_value) then {[ARR_3(objNull,[_this],true)] call FUNC(moduleHandcuffed)});
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
condition = "objectBrain";
|
condition = "objectBrain";
|
||||||
defaultValue = false;
|
defaultValue = false;
|
||||||
@ -18,7 +18,7 @@ class Cfg3DEN {
|
|||||||
control = "Checkbox";
|
control = "Checkbox";
|
||||||
displayName = CSTRING(ModuleSurrender_DisplayName);
|
displayName = CSTRING(ModuleSurrender_DisplayName);
|
||||||
tooltip = CSTRING(ModuleSurrender_Description);
|
tooltip = CSTRING(ModuleSurrender_Description);
|
||||||
expression = QUOTE([ARR_2(_this,_value)]call FUNC(setSurrendered));
|
expression = QUOTE(if (_value) then {[ARR_3(objNull,[_this],true)] call FUNC(moduleSurrender)});
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
condition = "objectBrain";
|
condition = "objectBrain";
|
||||||
defaultValue = false;
|
defaultValue = false;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
* Module Function to make a unit handcuffed (can be called from editor)
|
* Module Function to make a unit handcuffed (can be called from editor)
|
||||||
|
* Also used for threeden attribute expression with dummy Logic Object
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The Module Logic <OBJECT>
|
* 0: The Module Logic <OBJECT>
|
||||||
@ -11,7 +12,7 @@
|
|||||||
* Nothing
|
* Nothing
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* Called from module
|
* [objNull, [player], true] call ace_captives_fnc_moduleHandcuffed
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -28,8 +29,11 @@ if (!isServer) exitWith {};
|
|||||||
[{
|
[{
|
||||||
params ["_units"];
|
params ["_units"];
|
||||||
{
|
{
|
||||||
|
TRACE_2("event",_x,local _x);
|
||||||
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
||||||
} forEach _units;
|
} forEach _units;
|
||||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||||
|
|
||||||
deleteVehicle _logic;
|
if (!isNull _logic) then {
|
||||||
|
deleteVehicle _logic;
|
||||||
|
};
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
* Module Function to make a unit surrender (can be called from editor)
|
* Module Function to make a unit surrender (can be called from editor)
|
||||||
|
* Also used for threeden attribute expression with dummy Logic Object
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The Module Logic <OBJECT>
|
* 0: The Module Logic <OBJECT>
|
||||||
@ -11,7 +12,7 @@
|
|||||||
* Nothing
|
* Nothing
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* Called from module
|
* [objNull, [player], true] call ace_captives_fnc_moduleSurrender
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -28,8 +29,11 @@ if (!isServer) exitWith {};
|
|||||||
[{
|
[{
|
||||||
params ["_units"];
|
params ["_units"];
|
||||||
{
|
{
|
||||||
|
TRACE_2("event",_x,local _x);
|
||||||
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
||||||
} forEach _units;
|
} forEach _units;
|
||||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||||
|
|
||||||
deleteVehicle _logic;
|
if (!isNull _logic) then {
|
||||||
|
deleteVehicle _logic;
|
||||||
|
};
|
||||||
|
@ -1,23 +1,45 @@
|
|||||||
|
class ctrlToolbox;
|
||||||
|
|
||||||
class Cfg3DEN {
|
class Cfg3DEN {
|
||||||
|
class Attributes {
|
||||||
|
class Default;
|
||||||
|
class Title: Default {
|
||||||
|
class Controls {
|
||||||
|
class Title;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GVAR(isMedicControl): Title {
|
||||||
|
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
|
||||||
|
attributeSave = "(missionnamespace getvariable ['ace_isMeidc_temp',0]) - 1;";
|
||||||
|
class Controls: Controls {
|
||||||
|
class Title: Title{};
|
||||||
|
class Value: ctrlToolbox {
|
||||||
|
idc = 100;
|
||||||
|
style = "0x02";
|
||||||
|
x = "48 * (pixelW * 1.25 * 4)";
|
||||||
|
w = "82 * (pixelW * 1.25 * 4)";
|
||||||
|
h = "5 * (pixelH * 1.25 * 4)";
|
||||||
|
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_isMeidc_temp',_this select 1];";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
class Object {
|
class Object {
|
||||||
class AttributeCategories {
|
class AttributeCategories {
|
||||||
class ace_attributes {
|
class ace_attributes {
|
||||||
class Attributes {
|
class Attributes {
|
||||||
class ace_isMedic {
|
class ace_isMedic {
|
||||||
property = QUOTE(ace_isMedic);
|
property = QUOTE(ace_isMedic);
|
||||||
value = 0;
|
control = QGVAR(isMedicControl);
|
||||||
control = "Combo";
|
|
||||||
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
|
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
|
||||||
tooltip = CSTRING(Attributes_isMedic_Description);
|
tooltip = CSTRING(Attributes_isMedic_Description);
|
||||||
expression = QUOTE(_this setVariable [ARR_2(QUOTE(QGVAR(medicClass)),_value)];);
|
expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
condition = "objectBrain";
|
condition = "objectBrain";
|
||||||
defaultValue = 0;
|
defaultValue = "-1";
|
||||||
class values {
|
|
||||||
class none {name = CSTRING(AssignMedicRoles_role_none); value = 0; default = 1;};
|
|
||||||
class medic {name = CSTRING(AssignMedicRoles_role_medic); value = 1; default = 0;};
|
|
||||||
class doctor {name = CSTRING(AssignMedicRoles_role_doctor); value = 2; default = 0;};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
class ace_isMedicalVehicle {
|
class ace_isMedicalVehicle {
|
||||||
property = QUOTE(ace_isMedicalVehicle);
|
property = QUOTE(ace_isMedicalVehicle);
|
||||||
@ -25,7 +47,7 @@ class Cfg3DEN {
|
|||||||
control = "CheckboxNumber";
|
control = "CheckboxNumber";
|
||||||
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
|
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
|
||||||
tooltip = CSTRING(Attributes_isMedicalVehicle_Description);
|
tooltip = CSTRING(Attributes_isMedicalVehicle_Description);
|
||||||
expression = QUOTE(_this setVariable [ARR_2(QUOTE(QGVAR(medicClass)),_value)];);
|
expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];);
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
condition = "objectVehicle";
|
condition = "objectVehicle";
|
||||||
defaultValue = 0;
|
defaultValue = 0;
|
||||||
@ -36,7 +58,7 @@ class Cfg3DEN {
|
|||||||
control = "Checkbox";
|
control = "Checkbox";
|
||||||
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
|
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
|
||||||
tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
|
tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
|
||||||
expression = QUOTE(_this setVariable [ARR_2(QUOTE(QGVAR(isMedicalFacility)),_value)];);
|
expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(isMedicalFacility)),_value, true)];);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
||||||
defaultValue = "false";
|
defaultValue = "false";
|
||||||
|
@ -3815,6 +3815,18 @@
|
|||||||
<Hungarian>Doktor (csak fejlett orvosok)</Hungarian>
|
<Hungarian>Doktor (csak fejlett orvosok)</Hungarian>
|
||||||
<Italian>Dottore (Solo Medici Avanzati)</Italian>
|
<Italian>Dottore (Solo Medici Avanzati)</Italian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_AssignMedicRoles_role_doctorShort">
|
||||||
|
<English>Doctor</English>
|
||||||
|
<Russian>Врач</Russian>
|
||||||
|
<Polish>Doktor</Polish>
|
||||||
|
<Spanish>Doctor</Spanish>
|
||||||
|
<German>Arzt</German>
|
||||||
|
<Czech>Doktor</Czech>
|
||||||
|
<Portuguese>Doutor</Portuguese>
|
||||||
|
<French>Médecin</French>
|
||||||
|
<Hungarian>Doktor</Hungarian>
|
||||||
|
<Italian>Dottore</Italian>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Medical_AssignMedicRoles_Module_Description">
|
<Key ID="STR_ACE_Medical_AssignMedicRoles_Module_Description">
|
||||||
<English>Assigns the ACE medic class to a unit</English>
|
<English>Assigns the ACE medic class to a unit</English>
|
||||||
<Russian>Задает юниту класс медика</Russian>
|
<Russian>Задает юниту класс медика</Russian>
|
||||||
|
@ -1,23 +1,46 @@
|
|||||||
|
class ctrlToolbox;
|
||||||
|
|
||||||
class Cfg3DEN {
|
class Cfg3DEN {
|
||||||
|
class Attributes {
|
||||||
|
class Default;
|
||||||
|
class Title: Default {
|
||||||
|
class Controls {
|
||||||
|
class Title;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GVAR(isEngineerControl): Title {
|
||||||
|
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
|
||||||
|
attributeSave = "(missionnamespace getvariable ['ace_isEng_temp',0]) - 1;";
|
||||||
|
class Controls: Controls {
|
||||||
|
class Title: Title{};
|
||||||
|
class Value: ctrlToolbox {
|
||||||
|
idc = 100;
|
||||||
|
style = "0x02";
|
||||||
|
x = "48 * (pixelW * 1.25 * 4)";
|
||||||
|
w = "82 * (pixelW * 1.25 * 4)";
|
||||||
|
h = "5 * (pixelH * 1.25 * 4)";
|
||||||
|
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];";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
class Object {
|
class Object {
|
||||||
class AttributeCategories {
|
class AttributeCategories {
|
||||||
class ace_attributes {
|
class ace_attributes {
|
||||||
class Attributes {
|
class Attributes {
|
||||||
class ace_isEngineer {
|
class ace_isEngineer {
|
||||||
property = QUOTE(ace_isEngineer);
|
property = QUOTE(ace_isEngineer);
|
||||||
value = 0;
|
|
||||||
control = "Combo";
|
|
||||||
displayName = CSTRING(AssignEngineerRole_role_DisplayName);
|
displayName = CSTRING(AssignEngineerRole_role_DisplayName);
|
||||||
tooltip = CSTRING(AssignEngineerRole_role_Description);
|
tooltip = CSTRING(AssignEngineerRole_role_Description);
|
||||||
expression = "_this setVariable ['%s',_value];";
|
expression = "if (_value != -1) then {_this setVariable ['%s',_value, true];}";
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
condition = "objectBrain";
|
condition = "objectBrain";
|
||||||
defaultValue = 0;
|
defaultValue = "-1";
|
||||||
class values {
|
control = QGVAR(isEngineerControl);
|
||||||
class none {name = CSTRING(AssignEngineerRole_role_none); value = 0; default = 1;};
|
|
||||||
class engineer {name = CSTRING(AssignEngineerRole_role_engineer); value = 1; default = 0;};
|
|
||||||
class specialist {name = CSTRING(AssignEngineerRole_role_specialist); value = 2; default = 0;};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
class ace_isRepairVehicle {
|
class ace_isRepairVehicle {
|
||||||
property = QUOTE(ace_isRepairVehicle);
|
property = QUOTE(ace_isRepairVehicle);
|
||||||
@ -25,7 +48,7 @@ class Cfg3DEN {
|
|||||||
control = "CheckboxNumber";
|
control = "CheckboxNumber";
|
||||||
displayName = CSTRING(AssignRepairVehicle_role_DisplayName);
|
displayName = CSTRING(AssignRepairVehicle_role_DisplayName);
|
||||||
tooltip = CSTRING(AssignRepairVehicle_role_Description);
|
tooltip = CSTRING(AssignRepairVehicle_role_Description);
|
||||||
expression = "_this setVariable ['%s',_value];";
|
expression = "_this setVariable ['%s',_value, true];";
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
condition = "objectVehicle";
|
condition = "objectVehicle";
|
||||||
defaultValue = 0;
|
defaultValue = 0;
|
||||||
@ -36,7 +59,7 @@ class Cfg3DEN {
|
|||||||
control = "CheckboxNumber";
|
control = "CheckboxNumber";
|
||||||
displayName = CSTRING(AssignRepairFacility_role_DisplayName);
|
displayName = CSTRING(AssignRepairFacility_role_DisplayName);
|
||||||
tooltip = CSTRING(AssignRepairFacility_role_Description);
|
tooltip = CSTRING(AssignRepairFacility_role_Description);
|
||||||
expression = "_this setVariable ['%s',_value];";
|
expression = "_this setVariable ['%s',_value, true];";
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
||||||
defaultValue = 0;
|
defaultValue = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user