mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added support for customizable treatment location limitation
This commit is contained in:
parent
2657677bd8
commit
10a1108aae
@ -80,18 +80,6 @@ class ACE_Medical_Actions {
|
|||||||
itemConsumed = 0;
|
itemConsumed = 0;
|
||||||
litter[] = {};
|
litter[] = {};
|
||||||
};
|
};
|
||||||
/*class PersonalAidKit: Bandage {
|
|
||||||
displayName = "";
|
|
||||||
displayNameProgress = "";
|
|
||||||
items[] = {"ACE_personalAidKit"};
|
|
||||||
treatmentLocations[] = {"All"};
|
|
||||||
requiredMedic = 1;
|
|
||||||
treatmentTime = 15;
|
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
|
|
||||||
itemConsumed = 0;
|
|
||||||
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
|
||||||
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"}}, {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}, {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} };
|
|
||||||
};*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Advanced {
|
class Advanced {
|
||||||
@ -204,7 +192,7 @@ class ACE_Medical_Actions {
|
|||||||
displayName = "";
|
displayName = "";
|
||||||
displayNameProgress = "";
|
displayNameProgress = "";
|
||||||
items[] = {"ACE_surgicalKit"};
|
items[] = {"ACE_surgicalKit"};
|
||||||
treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"};
|
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
||||||
requiredMedic = QGVAR(medicSetting_SurgicalKit);
|
requiredMedic = QGVAR(medicSetting_SurgicalKit);
|
||||||
treatmentTime = 10;
|
treatmentTime = 10;
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_surgicalKit));
|
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_surgicalKit));
|
||||||
@ -216,7 +204,7 @@ class ACE_Medical_Actions {
|
|||||||
displayName = "";
|
displayName = "";
|
||||||
displayNameProgress = "";
|
displayNameProgress = "";
|
||||||
items[] = {"ACE_personalAidKit"};
|
items[] = {"ACE_personalAidKit"};
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
||||||
requiredMedic = QGVAR(medicSetting_PAK);
|
requiredMedic = QGVAR(medicSetting_PAK);
|
||||||
treatmentTime = 10;
|
treatmentTime = 10;
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
|
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
|
||||||
|
@ -99,6 +99,16 @@ class ACE_Settings {
|
|||||||
value = 0;
|
value = 0;
|
||||||
values[] = {"No", "Yes"};
|
values[] = {"No", "Yes"};
|
||||||
};
|
};
|
||||||
|
class GVAR(useLocation_PAK) {
|
||||||
|
typeName = "SCALAR";
|
||||||
|
value = 3;
|
||||||
|
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
|
||||||
|
};
|
||||||
|
class GVAR(useLocation_SurgicalKit) {
|
||||||
|
typeName = "SCALAR";
|
||||||
|
value = 2;
|
||||||
|
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
|
||||||
|
};
|
||||||
class GVAR(keepLocalSettingsSynced) {
|
class GVAR(keepLocalSettingsSynced) {
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
|
@ -204,7 +204,7 @@ class CfgVehicles {
|
|||||||
defaultValue = 1800;
|
defaultValue = 1800;
|
||||||
};
|
};
|
||||||
class medicSetting_PAK {
|
class medicSetting_PAK {
|
||||||
displayName = "Allow PAK";
|
displayName = "Allow PAK (Adv)";
|
||||||
description = "Who can use the PAK for full heal?";
|
description = "Who can use the PAK for full heal?";
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
class values {
|
class values {
|
||||||
@ -214,7 +214,7 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
class consumeItem_PAK {
|
class consumeItem_PAK {
|
||||||
displayName = "Remove PAK on use";
|
displayName = "Remove PAK on use (Adv)";
|
||||||
description = "Should PAK be removed on usage?";
|
description = "Should PAK be removed on usage?";
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
class values {
|
class values {
|
||||||
@ -222,14 +222,30 @@ class CfgVehicles {
|
|||||||
class remove { name = "Yes"; value = 1; default = 1; };
|
class remove { name = "Yes"; value = 1; default = 1; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
class useLocation_PAK {
|
||||||
|
displayName = "Locations PAK (Adv)";
|
||||||
|
description = "Where can the personal aid kit be used?";
|
||||||
|
typeName = "NUMBER";
|
||||||
|
class values {
|
||||||
|
class anywhere { name = "Anywhere"; value = 0; };
|
||||||
|
class vehicle { name = "Medical Vehicles"; value = 1; ; };
|
||||||
|
class facility { name = "Medical facility"; value = 2; };
|
||||||
|
class vehicleAndFacility { name = "Vehicles & facility"; value = 3; default = 1};
|
||||||
|
class disabled { name = "Disabled"; value = 4;};
|
||||||
|
};
|
||||||
|
};
|
||||||
class medicSetting_SurgicalKit: medicSetting_PAK {
|
class medicSetting_SurgicalKit: medicSetting_PAK {
|
||||||
displayName = "Allow Surgical kit";
|
displayName = "Allow Surgical kit (Adv)";
|
||||||
description = "Who can use the surgical kit?";
|
description = "Who can use the surgical kit?";
|
||||||
};
|
};
|
||||||
class consumeItem_SurgicalKit: consumeItem_PAK {
|
class consumeItem_SurgicalKit: consumeItem_PAK {
|
||||||
displayName = "Remove Surgical kit";
|
displayName = "Remove Surgical kit (Adv)";
|
||||||
description = "Should Surgical kit be removed on usage?";
|
description = "Should Surgical kit be removed on usage?";
|
||||||
};
|
};
|
||||||
|
class useLocation_SurgicalKit: useLocation_PAK {
|
||||||
|
displayName = "Locations Surgical kit (Adv)";
|
||||||
|
description = "Where can the Surgical kit be used?";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
class ModuleDescription {
|
class ModuleDescription {
|
||||||
|
@ -13,6 +13,28 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
|
|||||||
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
|
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
|
||||||
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
|
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
|
||||||
|
|
||||||
|
["medical_onUnconscious", {
|
||||||
|
if (local (_this select 0)) then {
|
||||||
|
_unit = _this select 0;
|
||||||
|
if (_this select 1) then {
|
||||||
|
_unit setVariable ["tf_globalVolume", 0.4];
|
||||||
|
_unit setVariable ["tf_voiceVolume", 0, true];
|
||||||
|
_unit setVariable ["tf_unable_to_use_radio", true, true];
|
||||||
|
|
||||||
|
_unit setVariable ["acre_sys_core_isDisabled", true, true];
|
||||||
|
_unit setVariable ["acre_sys_core_globalVolume", 0.4];
|
||||||
|
} else {
|
||||||
|
_unit setVariable ["tf_globalVolume", 1];
|
||||||
|
_unit setVariable ["tf_voiceVolume", 1, true];
|
||||||
|
_unit setVariable ["tf_unable_to_use_radio", true, true];
|
||||||
|
|
||||||
|
_unit setVariable ["acre_sys_core_isDisabled", true, true];
|
||||||
|
_unit setVariable ["acre_sys_core_globalVolume", 1];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}] call ace_common_fnc_addEventHandler;
|
||||||
|
|
||||||
|
|
||||||
// Initialize all effects
|
// Initialize all effects
|
||||||
_fnc_createEffect = {
|
_fnc_createEffect = {
|
||||||
private ["_type", "_layer", "_default"];
|
private ["_type", "_layer", "_default"];
|
||||||
|
@ -68,6 +68,18 @@ if ("All" in _locations) exitwith {true};
|
|||||||
if (_x == "field") exitwith {_return = true;};
|
if (_x == "field") exitwith {_return = true;};
|
||||||
if (_x == "MedicalFacility" && {[_caller, _target] call FUNC(inMedicalFacility)}) exitwith {_return = true;};
|
if (_x == "MedicalFacility" && {[_caller, _target] call FUNC(inMedicalFacility)}) exitwith {_return = true;};
|
||||||
if (_x == "MedicalVehicle" && {[_caller, _target] call FUNC(inMedicalVehicle)}) exitwith {_return = true;};
|
if (_x == "MedicalVehicle" && {[_caller, _target] call FUNC(inMedicalVehicle)}) exitwith {_return = true;};
|
||||||
|
if !(isnil _x) exitwith {
|
||||||
|
private "_val";
|
||||||
|
_val = missionNamespace getvariable _x;
|
||||||
|
if (typeName _val == "SCALAR") then {
|
||||||
|
_return = switch (_val) {
|
||||||
|
case 0: {true};
|
||||||
|
case 1: {[_caller, _target] call FUNC(inMedicalVehicle)};
|
||||||
|
case 2: {[_caller, _target] call FUNC(inMedicalFacility)};
|
||||||
|
case 3: {[_caller, _target] call FUNC(inMedicalVehicle) || [_caller, _target] call FUNC(inMedicalFacility)};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}foreach _locations;
|
}foreach _locations;
|
||||||
|
|
||||||
_return;
|
_return;
|
||||||
|
@ -81,6 +81,18 @@ if ("All" in _locations) then {
|
|||||||
if (_x == "field") exitwith {_return = true;};
|
if (_x == "field") exitwith {_return = true;};
|
||||||
if (_x == "MedicalFacility" && {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))}) exitwith {_return = true;};
|
if (_x == "MedicalFacility" && {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))}) exitwith {_return = true;};
|
||||||
if (_x == "MedicalVehicle" && {([vehicle _caller] call FUNC(isMedicalVehicle)) || ([vehicle _target] call FUNC(isMedicalVehicle))}) exitwith {_return = true;};
|
if (_x == "MedicalVehicle" && {([vehicle _caller] call FUNC(isMedicalVehicle)) || ([vehicle _target] call FUNC(isMedicalVehicle))}) exitwith {_return = true;};
|
||||||
|
if !(isnil _x) exitwith {
|
||||||
|
private "_val";
|
||||||
|
_val = missionNamespace getvariable _x;
|
||||||
|
if (typeName _val == "SCALAR") then {
|
||||||
|
_return = switch (_val) {
|
||||||
|
case 0: {true};
|
||||||
|
case 1: {[_caller, _target] call FUNC(inMedicalVehicle)};
|
||||||
|
case 2: {[_caller, _target] call FUNC(inMedicalFacility)};
|
||||||
|
case 3: {[_caller, _target] call FUNC(inMedicalVehicle) || [_caller, _target] call FUNC(inMedicalFacility)};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}foreach _locations;
|
}foreach _locations;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user