Use variable to enable/disable aspects

This commit is contained in:
johnb432 2024-07-17 21:49:23 +02:00
parent 96501b0087
commit 6d65fc42e8
20 changed files with 548 additions and 480 deletions

View File

@ -1,22 +1,26 @@
// #define DEBUG_MODE_FULL // #define DEBUG_MODE_FULL
#include "script_component.hpp" #include "script_component.hpp"
[QEGVAR(medical,setUnconscious), LINKFUNC(setUnconscious)] call CBA_fnc_addEventHandler; ["CBA_settingsInitialized", {
if !(GETEGVAR(medical,enabled,false)) exitWith {};
if (!hasInterface) exitWith {}; [QEGVAR(medical,setUnconscious), LINKFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
// Fractures affect base sway, pain makes it worse if (!hasInterface) exitWith {};
["baseline", {
// Fractures affect base sway, pain makes it worse
["baseline", {
ACE_player getVariable [QEGVAR(medical_engine,aimFracture), 0] ACE_player getVariable [QEGVAR(medical_engine,aimFracture), 0]
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor); }, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
// Max pain = 5x sway // Max pain = 5x sway
["multiplier", { ["multiplier", {
1 + (GET_PAIN_PERCEIVED(ACE_player) * 4) 1 + (GET_PAIN_PERCEIVED(ACE_player) * 4)
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor); }, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
call compile preprocessFileLineNumbers QPATHTOF(dev\reportSettings.sqf); call compile preprocessFileLineNumbers QPATHTOF(dev\reportSettings.sqf);
call compile preprocessFileLineNumbers QPATHTOF(dev\watchVariable.sqf); call compile preprocessFileLineNumbers QPATHTOF(dev\watchVariable.sqf);
call compile preprocessFileLineNumbers QPATHTOF(dev\debugDisplay.sqf); call compile preprocessFileLineNumbers QPATHTOF(dev\debugDisplay.sqf);
#endif #endif
}] call CBA_fnc_addEventHandler;

View File

@ -23,6 +23,12 @@
*/ */
// #define DEBUG_TESTRESULTS // #define DEBUG_TESTRESULTS
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [LINKFUNC(addDamageToUnit), _this];
};
if !(GETEGVAR(medical,enabled,false)) exitWith {false};
params [ params [
["_unit", objNull, [objNull]], ["_unit", objNull, [objNull]],
["_damageToAdd", -1, [0]], ["_damageToAdd", -1, [0]],

View File

@ -12,12 +12,18 @@
* The new pain level <NUMBER> * The new pain level <NUMBER>
* *
* Example: * Example:
* [guy, 0.5] call ace_medical_fnc_adjustPainLevel * [player, 0.5] call ace_medical_fnc_adjustPainLevel
* *
* Public: Yes * Public: Yes
*/ */
params ["_unit", "_addedPain"]; if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [LINKFUNC(adjustPainLevel), _this];
};
if !(GETEGVAR(medical,enabled,false)) exitWith {};
params [["_unit", objNull, [objNull]], ["_addedPain", 0, [0]]];
if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit); }; if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit); };

View File

@ -15,6 +15,13 @@
* *
* Public: Yes * Public: Yes
*/ */
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [LINKFUNC(deserializeState), _this];
};
if !(GETEGVAR(medical,enabled,false)) exitWith {};
params [["_unit", objNull, [objNull]], ["_json", "{}", [""]]]; params [["_unit", objNull, [objNull]], ["_json", "{}", [""]]];
// Don't run in scheduled environment // Don't run in scheduled environment

View File

@ -10,10 +10,17 @@
* Serialized state as JSON string <STRING> * Serialized state as JSON string <STRING>
* *
* Example: * Example:
* [player] call ace_medical_fnc_serializeState * player call ace_medical_fnc_serializeState
* *
* Public: Yes * Public: Yes
*/ */
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [LINKFUNC(serializeState), _this];
};
if !(GETEGVAR(medical,enabled,false)) exitWith {""};
params [["_unit", objNull, [objNull]]]; params [["_unit", objNull, [objNull]]];
private _state = [] call CBA_fnc_createNamespace; private _state = [] call CBA_fnc_createNamespace;

View File

@ -6,8 +6,8 @@
* Arguments: * Arguments:
* 0: The unit that will be put in an unconscious state <OBJECT> * 0: The unit that will be put in an unconscious state <OBJECT>
* 1: Set unconsciouns <BOOL> (default: true) * 1: Set unconsciouns <BOOL> (default: true)
* 2: Minimum unconscious time (set to 0 to ignore) <NUMBER><OPTIONAL> (default: 0) * 2: Minimum unconscious time (set to 0 to ignore) <NUMBER> (default: 0)
* 3: Force wakeup at given time if vitals are stable <BOOL><OPTIONAL> (default: false) * 3: Force wakeup at given time if vitals are stable <BOOL> (default: false)
* *
* Return Value: * Return Value:
* Success? <BOOLEAN> * Success? <BOOLEAN>
@ -19,11 +19,12 @@
* Public: Yes * Public: Yes
*/ */
// only run this after the settings are initialized if (!EGVAR(common,settingsInitFinished)) exitWith {
if !(EGVAR(common,settingsInitFinished)) exitWith { EGVAR(common,runAtSettingsInitialized) pushBack [LINKFUNC(setUnconscious), _this];
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setUnconscious), _this];
}; };
if !(GETEGVAR(medical,enabled,false)) exitWith {};
params [["_unit", objNull, [objNull]], ["_knockOut", true, [false]], ["_minWaitingTime", 0, [0]], ["_forcedWakup", false, [false]]]; params [["_unit", objNull, [objNull]], ["_knockOut", true, [false]], ["_minWaitingTime", 0, [0]], ["_forcedWakup", false, [false]]];
TRACE_4("setUnconscious",_unit,_knockOut,_minWaitingTime,_forcedWakup); TRACE_4("setUnconscious",_unit,_knockOut,_minWaitingTime,_forcedWakup);

View File

@ -1,8 +1,9 @@
#include "script_component.hpp" #include "script_component.hpp"
["CBA_settingsInitialized", { ["CBA_settingsInitialized", {
TRACE_1("settingsInitialized",GVAR(enabledFor)); TRACE_2("settingsInitialized",GVAR(enabledFor),GETEGVAR(medical,enabled,false));
if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
if (GVAR(enabledFor) == 0 || {!(GETEGVAR(medical,enabled,false))}) exitWith {}; // 0: disabled
if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients
["ace_firedNonPlayer", { ["ace_firedNonPlayer", {
@ -20,5 +21,4 @@
}] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addClassEventHandler;
#include "stateMachine.inc.sqf" #include "stateMachine.inc.sqf"
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;

View File

@ -1,9 +1,12 @@
#include "script_component.hpp" #include "script_component.hpp"
// To support public API regardless of component settings ["CBA_settingsInitialized", {
[QGVAR(spurt), LINKFUNC(spurt)] call CBA_fnc_addEventHandler; if !(GETEGVAR(medical,enabled,false)) exitWith {};
if (isServer) then { // To support public API regardless of component settings
[QGVAR(spurt), LINKFUNC(spurt)] call CBA_fnc_addEventHandler;
if (isServer) then {
GVAR(bloodDrops) = []; GVAR(bloodDrops) = [];
[QGVAR(bloodDropCreated), { [QGVAR(bloodDropCreated), {
@ -22,4 +25,5 @@ if (isServer) then {
[LINKFUNC(cleanupLoop), [], GVAR(bloodLifetime)] call CBA_fnc_waitAndExecute; [LINKFUNC(cleanupLoop), [], GVAR(bloodLifetime)] call CBA_fnc_waitAndExecute;
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
}; };
}] call CBA_fnc_addEventHandler;

View File

@ -1,13 +1,16 @@
#include "script_component.hpp" #include "script_component.hpp"
[QGVAR(updateDamageEffects), LINKFUNC(updateDamageEffects)] call CBA_fnc_addEventHandler; ["CBA_settingsInitialized", {
if !(GETEGVAR(medical,enabled,false)) exitWith {};
["unit", { [QGVAR(updateDamageEffects), LINKFUNC(updateDamageEffects)] call CBA_fnc_addEventHandler;
["unit", {
params ["_new"]; params ["_new"];
[_new] call FUNC(updateDamageEffects); // Run on new controlled unit to update QGVAR(aimFracture) [_new] call FUNC(updateDamageEffects); // Run on new controlled unit to update QGVAR(aimFracture)
}, true] call CBA_fnc_addPlayerEventHandler; }, true] call CBA_fnc_addPlayerEventHandler;
["CAManBase", "init", { ["CAManBase", "init", {
params ["_unit"]; params ["_unit"];
if (unitIsUAV _unit) exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (unitIsUAV _unit) exitWith {TRACE_1("ignore UAV AI",typeOf _unit);};
@ -38,24 +41,24 @@
[_this select 0, _this select 1, 2] call EFUNC(common,doAnimation); [_this select 0, _this select 1, 2] call EFUNC(common,doAnimation);
}, [_healer, _healer call EFUNC(common,getDefaultAnim)], 5] call CBA_fnc_waitUntilAndExecute; }, [_healer, _healer call EFUNC(common,getDefaultAnim)], 5] call CBA_fnc_waitUntilAndExecute;
}]; }];
}, nil, [IGNORE_BASE_UAVPILOTS], true] call CBA_fnc_addClassEventHandler; }, nil, [IGNORE_BASE_UAVPILOTS], true] call CBA_fnc_addClassEventHandler;
if !(["ace_medical_treatment"] call EFUNC(common,isModLoaded)) then { if !(["ace_medical_treatment"] call EFUNC(common,isModLoaded)) then {
[TYPE_FIRST_AID_KIT, ""] call EFUNC(common,registerItemReplacement); [TYPE_FIRST_AID_KIT, ""] call EFUNC(common,registerItemReplacement);
[TYPE_MEDIKIT, ""] call EFUNC(common,registerItemReplacement); [TYPE_MEDIKIT, ""] call EFUNC(common,registerItemReplacement);
}; };
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
[QEGVAR(medical,woundReceived), { [QEGVAR(medical,woundReceived), {
params ["_unit", "_damages", "_shooter", "_ammo"]; params ["_unit", "_damages", "_shooter", "_ammo"];
TRACE_4("wound",_unit,_damages,_shooter,_ammo); TRACE_4("wound",_unit,_damages,_shooter,_ammo);
//systemChat str _this; //systemChat str _this;
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
#endif #endif
// this handles moving units into vehicles via load functions or zeus // this handles moving units into vehicles via load functions or zeus
// needed, because the vanilla INCAPACITATED state does not handle vehicles // needed, because the vanilla INCAPACITATED state does not handle vehicles
["CAManBase", "GetInMan", { ["CAManBase", "GetInMan", {
params ["_unit", "", "_vehicle"]; params ["_unit", "", "_vehicle"];
if (local _unit && {lifeState _unit == "INCAPACITATED"}) then { if (local _unit && {lifeState _unit == "INCAPACITATED"}) then {
@ -65,25 +68,25 @@ if !(["ace_medical_treatment"] call EFUNC(common,isModLoaded)) then {
if (local _vehicle) then { if (local _vehicle) then {
[_unit] call FUNC(lockUnconsciousSeat); [_unit] call FUNC(lockUnconsciousSeat);
}; };
}] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addClassEventHandler;
["CAManBase", "GetOutMan", { ["CAManBase", "GetOutMan", {
params ["_unit", "", "_vehicle"]; params ["_unit", "", "_vehicle"];
if (local _vehicle) then { if (local _vehicle) then {
[_unit] call FUNC(unlockUnconsciousSeat); [_unit] call FUNC(unlockUnconsciousSeat);
}; };
}] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addClassEventHandler;
// Fixes units being stuck in unconscious animation when being knocked over by a PhysX object // Fixes units being stuck in unconscious animation when being knocked over by a PhysX object
["CAManBase", "AnimDone", { ["CAManBase", "AnimDone", {
params ["_unit", "_anim"]; params ["_unit", "_anim"];
if (local _unit && {_anim find QUNCON_ANIM(face) != -1 && {lifeState _unit != "INCAPACITATED"}}) then { if (local _unit && {_anim find QUNCON_ANIM(face) != -1 && {lifeState _unit != "INCAPACITATED"}}) then {
[_unit, false] call FUNC(setUnconsciousAnim); [_unit, false] call FUNC(setUnconsciousAnim);
}; };
}] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addClassEventHandler;
["ace_unconscious", { ["ace_unconscious", {
params ["_unit", "_unconscious"]; params ["_unit", "_unconscious"];
TRACE_3("unit uncon",_unit,objectParent _unit,local _unit); TRACE_3("unit uncon",_unit,objectParent _unit,local _unit);
if (!isNull objectParent _unit && {local objectParent _unit}) then { if (!isNull objectParent _unit && {local objectParent _unit}) then {
@ -93,20 +96,21 @@ if !(["ace_medical_treatment"] call EFUNC(common,isModLoaded)) then {
[_unit] call FUNC(unlockUnconsciousSeat); [_unit] call FUNC(unlockUnconsciousSeat);
}; };
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
["ace_killed", { // global event ["ace_killed", { // global event
params ["_unit"]; params ["_unit"];
TRACE_3("unit Killed",_unit,objectParent _unit,local _unit); TRACE_3("unit Killed",_unit,objectParent _unit,local _unit);
if (!isNull objectParent _unit && {local objectParent _unit}) exitWith { if (!isNull objectParent _unit && {local objectParent _unit}) exitWith {
[_unit] call FUNC(lockUnconsciousSeat); [_unit] call FUNC(lockUnconsciousSeat);
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
["CAManBase", "Deleted", { ["CAManBase", "Deleted", {
params ["_unit"]; params ["_unit"];
TRACE_3("unit deleted",_unit,objectParent _unit,local _unit); TRACE_3("unit deleted",_unit,objectParent _unit,local _unit);
if ((!isNull objectParent _unit) && {local objectParent _unit}) then { if ((!isNull objectParent _unit) && {local objectParent _unit}) then {
[_unit] call FUNC(unlockUnconsciousSeat); [_unit] call FUNC(unlockUnconsciousSeat);
}; };
}, true, []] call CBA_fnc_addClassEventHandler; }, true, []] call CBA_fnc_addClassEventHandler;
}] call CBA_fnc_addEventHandler;

View File

@ -1,38 +1,41 @@
#include "script_component.hpp" #include "script_component.hpp"
[QEGVAR(medical,injured), { ["CBA_settingsInitialized", {
if !(GETEGVAR(medical,enabled,false)) exitWith {};
[QEGVAR(medical,injured), {
params ["_unit", "_painLevel"]; params ["_unit", "_painLevel"];
[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call FUNC(playInjuredSound); [_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call FUNC(playInjuredSound);
if (hasInterface && {_unit == ace_player}) then { if (hasInterface && {_unit == ace_player}) then {
[true] call FUNC(handleEffects); [true] call FUNC(handleEffects);
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
[QEGVAR(medical,moan), { [QEGVAR(medical,moan), {
params ["_unit", "_painLevel"]; params ["_unit", "_painLevel"];
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call FUNC(playInjuredSound); [_unit, "moan", PAIN_TO_MOAN(_painLevel)] call FUNC(playInjuredSound);
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
[QEGVAR(medical,fracture), { [QEGVAR(medical,fracture), {
params ["_unit"]; params ["_unit"];
if (_unit == ACE_player) then { if (_unit == ACE_player) then {
playSound SND_FRACTURE; playSound SND_FRACTURE;
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
GVAR(nextFadeIn) = 0; GVAR(nextFadeIn) = 0;
GVAR(heartBeatEffectRunning) = false; GVAR(heartBeatEffectRunning) = false;
GVAR(lastHeartBeatSound) = 0; GVAR(lastHeartBeatSound) = 0;
GVAR(bloodTickCounter) = 0; GVAR(bloodTickCounter) = 0;
[false] call FUNC(initEffects); [false] call FUNC(initEffects);
[true] call FUNC(handleEffects); [true] call FUNC(handleEffects);
[LINKFUNC(handleEffects), 1, false] call CBA_fnc_addPerFrameHandler; [LINKFUNC(handleEffects), 1, false] call CBA_fnc_addPerFrameHandler;
["ace_unconscious", { ["ace_unconscious", {
params ["_unit", "_unconscious"]; params ["_unit", "_unconscious"];
if (_unit != ACE_player) exitWith {}; if (_unit != ACE_player) exitWith {};
@ -52,10 +55,10 @@ GVAR(bloodTickCounter) = 0;
[_unconscious, 1] call FUNC(effectUnconscious); [_unconscious, 1] call FUNC(effectUnconscious);
[true] call FUNC(handleEffects); [true] call FUNC(handleEffects);
["unconscious", _unconscious] call EFUNC(common,setDisableUserInputStatus); ["unconscious", _unconscious] call EFUNC(common,setDisableUserInputStatus);
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
// Reset volume upon death for spectators // Reset volume upon death for spectators
[QEGVAR(medical,death), { [QEGVAR(medical,death), {
params ["_unit"]; params ["_unit"];
if (_unit != ACE_player) exitWith {}; if (_unit != ACE_player) exitWith {};
@ -63,10 +66,10 @@ GVAR(bloodTickCounter) = 0;
[true, _unit] call EFUNC(common,setVolume); [true, _unit] call EFUNC(common,setVolume);
[QUOTE(ADDON), 1, false] call EFUNC(common,setHearingCapability); [QUOTE(ADDON), 1, false] call EFUNC(common,setHearingCapability);
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
// Update effects to match new unit's current status (this also handles respawn) // Update effects to match new unit's current status (this also handles respawn)
["unit", { ["unit", {
params ["_new"]; params ["_new"];
private _status = IS_UNCONSCIOUS(_new); private _status = IS_UNCONSCIOUS(_new);
@ -76,10 +79,10 @@ GVAR(bloodTickCounter) = 0;
[QUOTE(ADDON), _volume, _status] call EFUNC(common,setHearingCapability); [QUOTE(ADDON), _volume, _status] call EFUNC(common,setHearingCapability);
[true] call FUNC(handleEffects); [true] call FUNC(handleEffects);
["unconscious", _status] call EFUNC(common,setDisableUserInputStatus); ["unconscious", _status] call EFUNC(common,setDisableUserInputStatus);
}] call CBA_fnc_addPlayerEventHandler; }] call CBA_fnc_addPlayerEventHandler;
// Update effects for featureCamera (curator, arsenal, etc) // Update effects for featureCamera (curator, arsenal, etc)
["featureCamera", { ["featureCamera", {
params ["_unit", "_newCamera"]; params ["_unit", "_newCamera"];
[true] call FUNC(handleEffects); [true] call FUNC(handleEffects);
@ -96,10 +99,10 @@ GVAR(bloodTickCounter) = 0;
[QUOTE(ADDON), 1, false] call EFUNC(common,setHearingCapability); [QUOTE(ADDON), 1, false] call EFUNC(common,setHearingCapability);
["unconscious", false] call EFUNC(common,setDisableUserInputStatus); ["unconscious", false] call EFUNC(common,setDisableUserInputStatus);
}; };
}] call CBA_fnc_addPlayerEventHandler; }] call CBA_fnc_addPlayerEventHandler;
// Forced say3D // Forced say3D
[QGVAR(forceSay3D), { [QGVAR(forceSay3D), {
params ["_unit", "_sound", "_distance"]; params ["_unit", "_sound", "_distance"];
if (ACE_player distance _unit > _distance) exitWith {}; if (ACE_player distance _unit > _distance) exitWith {};
@ -118,18 +121,18 @@ GVAR(bloodTickCounter) = 0;
// Fallback: attachTo doesn't work within vehicles // Fallback: attachTo doesn't work within vehicles
_unit say3D [_sound, _distance, 1, false]; _unit say3D [_sound, _distance, 1, false];
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
// Kill vanilla bleeding feedback effects. // Kill vanilla bleeding feedback effects.
#ifdef DISABLE_VANILLA_DAMAGE_EFFECTS #ifdef DISABLE_VANILLA_DAMAGE_EFFECTS
TRACE_1("disabling vanilla bleeding feedback effects",_this); TRACE_1("disabling vanilla bleeding feedback effects",_this);
[{ [{
{isNil _x} count [ {isNil _x} count [
"BIS_fnc_feedback_damageCC", "BIS_fnc_feedback_damageCC",
"BIS_fnc_feedback_damageRadialBlur", "BIS_fnc_feedback_damageRadialBlur",
"BIS_fnc_feedback_damageBlur" "BIS_fnc_feedback_damageBlur"
] == 0 ] == 0
}, { }, {
{ {
ppEffectDestroy _x; ppEffectDestroy _x;
} forEach [ } forEach [
@ -137,5 +140,6 @@ TRACE_1("disabling vanilla bleeding feedback effects",_this);
BIS_fnc_feedback_damageRadialBlur, BIS_fnc_feedback_damageRadialBlur,
BIS_fnc_feedback_damageBlur BIS_fnc_feedback_damageBlur
]; ];
}] call CBA_fnc_waitUntilAndExecute; }] call CBA_fnc_waitUntilAndExecute;
#endif #endif
}] call CBA_fnc_addEventHandler;

View File

@ -4,7 +4,7 @@ class CfgVehicles {
class ACE_SelfActions { class ACE_SelfActions {
class ACE_Medical { class ACE_Medical {
displayName = CSTRING(Medical); displayName = CSTRING(Medical);
condition = QGVAR(enableSelfActions); condition = QUOTE(missionNamespace getVariable [ARR_2(QQEGVAR(medical,enabled),false)] && GVAR(enableSelfActions));
exceptions[] = {"isNotInside", "isNotSitting", "isNotSwimming"}; exceptions[] = {"isNotInside", "isNotSitting", "isNotSwimming"};
statement = QUOTE([ARR_2(_target,-1)] call FUNC(displayPatientInformation)); statement = QUOTE([ARR_2(_target,-1)] call FUNC(displayPatientInformation));
runOnHover = 1; runOnHover = 1;
@ -23,7 +23,7 @@ class CfgVehicles {
}; };
}; };
class ACE_Actions { class ACE_Actions {
#define ACTION_CONDITION condition = QUOTE(GVAR(enableActions) == 0); #define ACTION_CONDITION condition = QUOTE(missionNamespace getVariable [ARR_2(QQEGVAR(medical,enabled),false)] && GVAR(enableActions) == 0);
#include "InteractionBodyParts.hpp" #include "InteractionBodyParts.hpp"
#undef ACTION_CONDITION #undef ACTION_CONDITION
class ACE_MainActions { class ACE_MainActions {
@ -38,7 +38,7 @@ class CfgVehicles {
}; };
class ACE_Medical_Radial { class ACE_Medical_Radial {
displayName = CSTRING(Medical); displayName = CSTRING(Medical);
condition = QUOTE((GVAR(enableActions) == 1 || {GVAR(enableActions) != 2 && {!isNull objectParent _target && {objectParent _target isEqualTo objectParent _player}}})); condition = QUOTE(missionNamespace getVariable [ARR_2(QQEGVAR(medical,enabled),false)] && (GVAR(enableActions) == 1 || {GVAR(enableActions) != 2 && {!isNull objectParent _target && {objectParent _target isEqualTo objectParent _player}}}));
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_target,-1)] call FUNC(displayPatientInformation)); statement = QUOTE([ARR_2(_target,-1)] call FUNC(displayPatientInformation));
runOnHover = 1; runOnHover = 1;
@ -49,7 +49,7 @@ class CfgVehicles {
}; };
class ACE_LoadPatient { class ACE_LoadPatient {
displayName = CSTRING(LoadPatient); displayName = CSTRING(LoadPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {alive _target} && {isNull objectParent _target} && {(_target call EFUNC(common,nearestVehiclesFreeSeat)) isNotEqualTo []}); condition = QUOTE(missionNamespace getVariable [ARR_2(QQEGVAR(medical,enabled),false)] && {_target getVariable [ARR_2('ACE_isUnconscious',false)]} && {alive _target} && {isNull objectParent _target} && {(_target call EFUNC(common,nearestVehiclesFreeSeat)) isNotEqualTo []});
exceptions[] = {"isNotDragging", "isNotCarrying"}; exceptions[] = {"isNotDragging", "isNotCarrying"};
statement = QUOTE([ARR_2(_player,_target)] call EFUNC(medical_treatment,loadUnit)); statement = QUOTE([ARR_2(_player,_target)] call EFUNC(medical_treatment,loadUnit));
icon = QPATHTOF(ui\cross.paa); icon = QPATHTOF(ui\cross.paa);

View File

@ -2,103 +2,50 @@
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
GVAR(target) = objNull; #include "initKeybinds.inc.sqf"
GVAR(previousTarget) = objNull;
GVAR(selectedBodyPart) = 0;
GVAR(selectedCategory) = "triage";
GVAR(lastOpenedOn) = -1; ["CBA_settingsInitialized", {
GVAR(pendingReopen) = false; if !(GETEGVAR(medical,enabled,false)) exitWith {};
GVAR(menuPFH) = -1; GVAR(target) = objNull;
GVAR(previousTarget) = objNull;
GVAR(selectedBodyPart) = 0;
GVAR(selectedCategory) = "triage";
GVAR(peekLastOpenedOn) = -1; GVAR(lastOpenedOn) = -1;
GVAR(peekOnHitLastOpenedOn) = -1; GVAR(pendingReopen) = false;
GVAR(selfInteractionActions) = []; GVAR(menuPFH) = -1;
[] call FUNC(addTreatmentActions);
[] call FUNC(collectActions);
[QEGVAR(interact_menu,newControllableObject), { GVAR(peekLastOpenedOn) = -1;
GVAR(peekOnHitLastOpenedOn) = -1;
GVAR(selfInteractionActions) = [];
[] call FUNC(addTreatmentActions);
[] call FUNC(collectActions);
[QEGVAR(interact_menu,newControllableObject), {
params ["_type"]; // string of the object's classname params ["_type"]; // string of the object's classname
if !(_type isKindOf "CAManBase") exitWith {}; if !(_type isKindOf "CAManBase") exitWith {};
{ {
_x set [0, _type]; _x set [0, _type];
_x call EFUNC(interact_menu,addActionToClass); _x call EFUNC(interact_menu,addActionToClass);
} forEach GVAR(selfInteractionActions); } forEach GVAR(selfInteractionActions);
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
["ace_treatmentSucceded", { ["ace_treatmentSucceded", {
if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then { if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then {
GVAR(pendingReopen) = false; GVAR(pendingReopen) = false;
[FUNC(openMenu), GVAR(target)] call CBA_fnc_execNextFrame; [FUNC(openMenu), GVAR(target)] call CBA_fnc_execNextFrame;
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
["ACE3 Common", QGVAR(openMedicalMenuKey), localize LSTRING(OpenMedicalMenu), { // Close patient information display when interaction menu is closed
// Get target (cursorTarget, cursorObject, and lineIntersectsSurfaces along camera to maxDistance), if not valid then target is ACE_player ["ace_interactMenuClosed", {
TRACE_3("Open menu key",cursorTarget,cursorObject,ACE_player);
private _target = cursorTarget;
if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then {
_target = cursorObject;
if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then {
private _start = AGLToASL positionCameraToWorld [0, 0, 0];
private _end = AGLToASL positionCameraToWorld [0, 0, GVAR(maxDistance)];
private _intersections = lineIntersectsSurfaces [_start, _end, ACE_player, objNull, true, -1, "FIRE"];
{
_x params ["", "", "_intersectObject"];
// Only look "through" player and player's vehicle
if (!(_intersectObject isKindOf "CAManBase") && {_intersectObject != vehicle ACE_player}) exitWith {};
if (_intersectObject != ACE_player && {_intersectObject isKindOf "CAManBase" && {[ACE_player, _intersectObject] call FUNC(canOpenMenu)}}) exitWith {
_target =_intersectObject
};
} forEach _intersections;
if (!(_target isKindOf "CAManBase") || {!([ACE_player, _target] call FUNC(canOpenMenu))}) then {
_target = ACE_player;
};
};
};
// Check conditions: canInteract and canOpenMenu
if !([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false};
// Statement
[_target] call FUNC(openMenu);
false
}, {
// Close menu if enough time passed from opening
if (CBA_missionTime - GVAR(lastOpenedOn) > 0.5) exitWith {
[objNull] call FUNC(openMenu);
};
false
}, [DIK_H, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
["ACE3 Common", QGVAR(peekMedicalInfoKey), localize LSTRING(PeekMedicalInfo),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[ACE_player, -1] call FUNC(displayPatientInformation);
false
}, {
if (CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)) then {
[{
CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)
}, {QGVAR(RscPatientInfo) cutFadeOut 0.3}] call CBA_fnc_waitUntilAndExecute;
};
GVAR(peekLastOpenedOn) = CBA_missionTime;
false
}, [DIK_H, [false, true, false]], false, 0] call CBA_fnc_addKeybind;
// Close patient information display when interaction menu is closed
["ace_interactMenuClosed", {
QGVAR(RscPatientInfo) cutFadeOut 0.3; QGVAR(RscPatientInfo) cutFadeOut 0.3;
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
[QEGVAR(medical,woundReceived), { [QEGVAR(medical,woundReceived), {
params ["_unit", "_allDamages", ""]; params ["_unit", "_allDamages", ""];
if !(GVAR(peekMedicalOnHit) && {_unit == ACE_player}) exitWith {}; if !(GVAR(peekMedicalOnHit) && {_unit == ACE_player}) exitWith {};
@ -113,4 +60,5 @@ GVAR(selfInteractionActions) = [];
}, {QGVAR(RscPatientInfo) cutFadeOut 0.3}] call CBA_fnc_waitUntilAndExecute; }, {QGVAR(RscPatientInfo) cutFadeOut 0.3}] call CBA_fnc_waitUntilAndExecute;
}; };
GVAR(peekOnHitLastOpenedOn) = CBA_missionTime; GVAR(peekOnHitLastOpenedOn) = CBA_missionTime;
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;

View File

@ -16,6 +16,8 @@
* Public: No * Public: No
*/ */
if !(GETEGVAR(medical,enabled,false)) exitWith {false};
params ["_player", "_target"]; params ["_player", "_target"];
// If in Zeus // If in Zeus

View File

@ -18,7 +18,10 @@
* Public: No * Public: No
*/ */
if !(GETEGVAR(medical,enabled,false)) exitWith {};
params ["_target", "_player", "", "_actionData"]; params ["_target", "_player", "", "_actionData"];
if ( if (
GVAR(interactionMenuShowTriage) == 1 // Anyone GVAR(interactionMenuShowTriage) == 1 // Anyone
|| {GVAR(interactionMenuShowTriage) == 2 && {[_player] call EFUNC(medical_treatment,isMedic)}} // Medics & Doctors || {GVAR(interactionMenuShowTriage) == 2 && {[_player] call EFUNC(medical_treatment,isMedic)}} // Medics & Doctors

View File

@ -0,0 +1,56 @@
["ACE3 Common", QGVAR(openMedicalMenuKey), LLSTRING(OpenMedicalMenu), {
// Get target (cursorTarget, cursorObject, and lineIntersectsSurfaces along camera to maxDistance), if not valid then target is ACE_player
TRACE_3("Open menu key",cursorTarget,cursorObject,ACE_player);
private _target = cursorTarget;
if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then {
_target = cursorObject;
if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then {
private _start = AGLToASL positionCameraToWorld [0, 0, 0];
private _end = AGLToASL positionCameraToWorld [0, 0, GVAR(maxDistance)];
private _intersections = lineIntersectsSurfaces [_start, _end, ACE_player, objNull, true, -1, "FIRE"];
{
_x params ["", "", "_intersectObject"];
// Only look "through" player and player's vehicle
if (!(_intersectObject isKindOf "CAManBase") && {_intersectObject != vehicle ACE_player}) exitWith {};
if (_intersectObject != ACE_player && {_intersectObject isKindOf "CAManBase" && {[ACE_player, _intersectObject] call FUNC(canOpenMenu)}}) exitWith {
_target = _intersectObject
};
} forEach _intersections;
if (!(_target isKindOf "CAManBase") || {!([ACE_player, _target] call FUNC(canOpenMenu))}) then {
_target = ACE_player;
};
};
};
// Check conditions: canInteract and canOpenMenu
if !([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false};
// Statement
[_target] call FUNC(openMenu);
false
}, {
// Close menu if enough time passed from opening
if (CBA_missionTime - GVAR(lastOpenedOn) > 0.5) exitWith {
[objNull] call FUNC(openMenu);
};
}, [DIK_H, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
["ACE3 Common", QGVAR(peekMedicalInfoKey), localize LSTRING(PeekMedicalInfo),
{
if !(GETEGVAR(medical,enabled,false)) exitWith {};
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[ACE_player, -1] call FUNC(displayPatientInformation);
false
}, {
if (CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)) then {
[{
CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)
}, {QGVAR(RscPatientInfo) cutFadeOut 0.3}] call CBA_fnc_waitUntilAndExecute;
};
GVAR(peekLastOpenedOn) = CBA_missionTime;
}, [DIK_H, [false, true, false]], false, 0] call CBA_fnc_addKeybind;

View File

@ -1,6 +1,9 @@
#include "script_component.hpp" #include "script_component.hpp"
["ace_killed", { // global event ["CBA_settingsInitialized", {
if !(GETEGVAR(medical,enabled,false)) exitWith {};
["ace_killed", { // global event
params ["_unit"]; params ["_unit"];
// Prevent second ragdoll of uncon units when they're killed // Prevent second ragdoll of uncon units when they're killed
@ -11,4 +14,5 @@
_unit enableSimulation false; _unit enableSimulation false;
[{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute; [{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute;
}; };
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;

View File

@ -1,28 +1,32 @@
#include "script_component.hpp" #include "script_component.hpp"
// Handle pain changes on injury ["CBA_settingsInitialized", {
[QEGVAR(medical,injured), LINKFUNC(adjustPainLevel)] call CBA_fnc_addEventHandler; if !(GETEGVAR(medical,enabled,false)) exitWith {};
// Handle pain changes on injury
[QEGVAR(medical,injured), LINKFUNC(adjustPainLevel)] call CBA_fnc_addEventHandler;
// Add inventory and open backpack actions to units // Add inventory and open backpack actions to units
[QGVAR(addInventoryActions), LINKFUNC(addInventoryActions)] call CBA_fnc_addEventHandler; [QGVAR(addInventoryActions), LINKFUNC(addInventoryActions)] call CBA_fnc_addEventHandler;
// apply to all living and dead now
{ // Apply to all living and dead now
{
[QGVAR(addInventoryActions), _x] call CBA_fnc_localEvent; [QGVAR(addInventoryActions), _x] call CBA_fnc_localEvent;
} forEach (allUnits + allDeadMen); } forEach (allUnits + allDeadMen);
// apply to all future units
["CAManBase", "init", LINKFUNC(addInventoryActions), true, [], false] call CBA_fnc_addClassEventHandler; // Apply to all future units
// Respawn is called locally ["CAManBase", "init", LINKFUNC(addInventoryActions), true, [], false] call CBA_fnc_addClassEventHandler;
["CAManBase", "respawn", {
// Respawn is called locally
["CAManBase", "respawn", {
params ["_unit"]; params ["_unit"];
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};
[QGVAR(addInventoryActions), _unit] call CBA_fnc_globalEvent; [QGVAR(addInventoryActions), _unit] call CBA_fnc_globalEvent;
}, true] call CBA_fnc_addClassEventHandler; }, true] call CBA_fnc_addClassEventHandler;
// Handle comms status effects for spectator
// Handle comms status effects for spectator // Separate from medical_feedback as these affect unit behavior rather than what the player sees
// Separate from medical_feedback as these affect unit behavior rather than what the player sees ["featureCamera", {
["featureCamera", {
params ["_unit", "_newCamera"]; params ["_unit", "_newCamera"];
if (_unit isNotEqualTo ACE_player) exitWith {}; if (_unit isNotEqualTo ACE_player) exitWith {};
@ -33,4 +37,5 @@
} else { } else {
[_unit, false, true] call FUNC(setStatusEffects); [_unit, false, true] call FUNC(setStatusEffects);
}; };
}] call CBA_fnc_addPlayerEventHandler; }] call CBA_fnc_addPlayerEventHandler;
}] call CBA_fnc_addEventHandler;

View File

@ -1,6 +1,11 @@
#include "script_component.hpp" #include "script_component.hpp"
[QEGVAR(medical_status,initialized), { ["CBA_settingsInitialized", {
if !(GETEGVAR(medical,enabled,false)) exitWith {};
TRACE_1("CBA_settingsInitialized EH",GVAR(convertItems)); // 0: Enabled 1: RemoveOnly
[QEGVAR(medical_status,initialized), {
params ["_unit"]; params ["_unit"];
// Clear all saved medical logs // Clear all saved medical logs
@ -9,33 +14,31 @@
} forEach (_unit getVariable [QEGVAR(medical,allLogs), []]); } forEach (_unit getVariable [QEGVAR(medical,allLogs), []]);
_unit setVariable [QEGVAR(medical,allLogs), [], true]; _unit setVariable [QEGVAR(medical,allLogs), [], true];
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
// Handle body removal and litter on server // Handle body removal and litter on server
if (isServer) then { if (isServer) then {
[QGVAR(createLitterServer), LINKFUNC(createLitterServer)] call CBA_fnc_addEventHandler; [QGVAR(createLitterServer), LINKFUNC(createLitterServer)] call CBA_fnc_addEventHandler;
["ace_placedInBodyBag", LINKFUNC(removeBody)] call CBA_fnc_addEventHandler; ["ace_placedInBodyBag", LINKFUNC(removeBody)] call CBA_fnc_addEventHandler;
}; };
// Treatment events // Treatment events
[QGVAR(bandageLocal), LINKFUNC(bandageLocal)] call CBA_fnc_addEventHandler; [QGVAR(bandageLocal), LINKFUNC(bandageLocal)] call CBA_fnc_addEventHandler;
[QGVAR(checkBloodPressureLocal), LINKFUNC(checkBloodPressureLocal)] call CBA_fnc_addEventHandler; [QGVAR(checkBloodPressureLocal), LINKFUNC(checkBloodPressureLocal)] call CBA_fnc_addEventHandler;
[QGVAR(checkPulseLocal), LINKFUNC(checkPulseLocal)] call CBA_fnc_addEventHandler; [QGVAR(checkPulseLocal), LINKFUNC(checkPulseLocal)] call CBA_fnc_addEventHandler;
[QGVAR(cprLocal), LINKFUNC(cprLocal)] call CBA_fnc_addEventHandler; [QGVAR(cprLocal), LINKFUNC(cprLocal)] call CBA_fnc_addEventHandler;
[QGVAR(fullHealLocal), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; [QGVAR(fullHealLocal), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler;
[QGVAR(ivBagLocal), LINKFUNC(ivBagLocal)] call CBA_fnc_addEventHandler; [QGVAR(ivBagLocal), LINKFUNC(ivBagLocal)] call CBA_fnc_addEventHandler;
[QGVAR(medicationLocal), LINKFUNC(medicationLocal)] call CBA_fnc_addEventHandler; [QGVAR(medicationLocal), LINKFUNC(medicationLocal)] call CBA_fnc_addEventHandler;
[QGVAR(placeInBodyBagOrGrave), LINKFUNC(placeInBodyBagOrGrave)] call CBA_fnc_addEventHandler; [QGVAR(placeInBodyBagOrGrave), LINKFUNC(placeInBodyBagOrGrave)] call CBA_fnc_addEventHandler;
[QGVAR(splintLocal), LINKFUNC(splintLocal)] call CBA_fnc_addEventHandler; [QGVAR(splintLocal), LINKFUNC(splintLocal)] call CBA_fnc_addEventHandler;
[QGVAR(tourniquetLocal), LINKFUNC(tourniquetLocal)] call CBA_fnc_addEventHandler; [QGVAR(tourniquetLocal), LINKFUNC(tourniquetLocal)] call CBA_fnc_addEventHandler;
// Logging events // Logging events
[QGVAR(addToLog), LINKFUNC(addToLog)] call CBA_fnc_addEventHandler; [QGVAR(addToLog), LINKFUNC(addToLog)] call CBA_fnc_addEventHandler;
[QGVAR(addToTriageCard), LINKFUNC(addToTriageCard)] call CBA_fnc_addEventHandler; [QGVAR(addToTriageCard), LINKFUNC(addToTriageCard)] call CBA_fnc_addEventHandler;
// replace medical items with their ACE equivalents // Replace medical items with their ACE equivalents
["CBA_settingsInitialized", {
TRACE_1("CBA_settingsInitialized EH",GVAR(convertItems)); // 0: Enabled 1: RemoveOnly
{ {
// turn [["stuff", 2], ...] into ["stuff", "stuff", ...] // turn [["stuff", 2], ...] into ["stuff", "stuff", ...]
private _replacements = []; private _replacements = [];
@ -59,9 +62,8 @@ if (isServer) then {
// register replacement // register replacement
[_toReplace, _replacements] call EFUNC(common,registerItemReplacement); [_toReplace, _replacements] call EFUNC(common,registerItemReplacement);
} forEach (configProperties [configFile >> QEGVAR(medical,replacementItems), "isArray _x"]); } forEach (configProperties [configFile >> QEGVAR(medical,replacementItems), "isArray _x"]);
}] call CBA_fnc_addEventHandler;
if (["ace_trenches"] call EFUNC(common,isModLoaded)) then { if (["ace_trenches"] call EFUNC(common,isModLoaded)) then {
if (hasInterface) then { if (hasInterface) then {
private _checkHeadstoneAction = [ private _checkHeadstoneAction = [
QGVAR(checkHeadstone), QGVAR(checkHeadstone),
@ -82,18 +84,21 @@ if (["ace_trenches"] call EFUNC(common,isModLoaded)) then {
if (isServer) then { if (isServer) then {
["ace_placedInBodyBag", { ["ace_placedInBodyBag", {
params ["_target", "_restingPlace"]; params ["_target", "_restingPlace"];
TRACE_2("ace_placedInBodyBag eh",_target,_restingPlace); TRACE_2("ace_placedInBodyBag eh",_target,_restingPlace);
if (isNull _restingPlace) exitWith {}; if (isNull _restingPlace) exitWith {};
private _targetName = ""; private _targetName = if (_target isKindOf "ACE_bodyBagObject") then {
if (_target isKindOf "ACE_bodyBagObject") then { _target getVariable [QGVAR(headstoneData), ""]
_targetName = _target getVariable [QGVAR(headstoneData), ""];
} else { } else {
_targetName = [_target, false, true] call EFUNC(common,getName); [_target, false, true] call EFUNC(common,getName)
}; };
if (_targetName == "") exitWith {}; if (_targetName == "") exitWith {};
_restingPlace setVariable [QGVAR(headstoneData), _targetName, true]; _restingPlace setVariable [QGVAR(headstoneData), _targetName, true];
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
}; };
}; };
}] call CBA_fnc_addEventHandler;

View File

@ -16,6 +16,8 @@
* Public: No * Public: No
*/ */
if !(GETEGVAR(medical,enabled,false)) exitWith {false};
params ["_unloader", "_target"]; params ["_unloader", "_target"];
!isNull objectParent _target && !isNull objectParent _target &&

View File

@ -21,7 +21,7 @@ params ["_logic"];
if !(local _logic) exitWith {}; if !(local _logic) exitWith {};
if (isNil QEFUNC(medical,setUnconscious)) then { if !(GETEGVAR(medical,enabled,false)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);
} else { } else {
private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]);