Skip to content

Commit

Permalink
Take setting into account
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Aug 4, 2024
1 parent 8e8d7dc commit 9f0ba6a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
7 changes: 7 additions & 0 deletions addons/medical_ai/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
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

// default time values for AI being ready to heal, used in fnc_isSafe
if (isNil QGVAR(timeSafe_shoot)) then { GVAR(timeSafe_shoot) = 30; };
if (isNil QGVAR(timeSafe_hit)) then { GVAR(timeSafe_hit) = 30; };
if (isNil QGVAR(timeSafe_suppressed)) then { GVAR(timeSafe_suppressed) = 30; };

GVAR(itemHash) = uiNamespace getVariable QGVAR(itemHash);

["ace_firedNonPlayer", {
_unit setVariable [QGVAR(lastFired), CBA_missionTime];
}] call CBA_fnc_addEventHandler;
Expand Down
7 changes: 0 additions & 7 deletions addons/medical_ai/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,4 @@ PREP_RECOMPILE_END;

#include "initSettings.inc.sqf"

// default time values for AI being ready to heal, used in fnc_isSafe
if (isNil QGVAR(timeSafe_shoot)) then { GVAR(timeSafe_shoot) = 30; };
if (isNil QGVAR(timeSafe_hit)) then { GVAR(timeSafe_hit) = 30; };
if (isNil QGVAR(timeSafe_suppressed)) then { GVAR(timeSafe_suppressed) = 30; };

GVAR(itemHash) = uiNamespace getVariable QGVAR(itemHash);

ADDON = true;
2 changes: 1 addition & 1 deletion addons/medical_treatment/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CfgVehicles {
selection = "";
class GVAR(buryBodyBag) {
displayName = CSTRING(DigGrave);
condition = QUOTE([ARR_2(_this#1,_this#0)] call FUNC(canDigGrave));
condition = QUOTE(GETEGVAR(medical,enabled,false) && {[ARR_2(_this#1,_this#0)] call FUNC(canDigGrave)});

Check failure on line 34 in addons/medical_treatment/CfgVehicles.hpp

View workflow job for this annotation

GitHub Actions / windows

found "\"" but expected one of "i", "J", "N", "a", "s", "d", "T", "p", "y", "O", "e", "b", "z", "X", "F", "0", "g", "w", "K", "h", "o", "x", "q", "l", "B", "E", "H", "M", "Q", "C", "t", "Y", "W", "=", "[", "L", "P", "S", "v", "V", "2", "D", "u", "6", "I", "U", "j", "8", "4", "Z", "k", "f", "3", "7", "_", "9", "1", "5", "R", "A", "c", "r", "G", "m", "n"

found "\"" but expected one of "i", "J", "N", "a", "s", "d", "T", "p", "y", "O", "e", "b", "z", "X", "F", "0", "g", "w", "K", "h", "o", "x", "q", "l", "B", "E", "H", "M", "Q", "C", "t", "Y", "W", "=", "[", "L", "P", "S", "v", "V", "2", "D", "u", "6", "I", "U", "j", "8", "4", "Z", "k", "f", "3", "7", "_", "9", "1", "5", "R", "A", "c", "r", "G", "m", "n"

Check failure on line 34 in addons/medical_treatment/CfgVehicles.hpp

View workflow job for this annotation

GitHub Actions / build

found "\"" but expected one of "t", "U", "E", "V", "_", "2", "4", "R", "b", "H", "T", "Y", "B", "7", "P", "d", "n", "h", "g", "W", "p", "[", "J", "3", "m", "y", "=", "j", "N", "9", "q", "a", "f", "s", "Z", "G", "I", "5", "1", "k", "X", "e", "O", "M", "z", "C", "v", "x", "u", "i", "l", "D", "L", "w", "o", "0", "6", "A", "Q", "F", "K", "r", "8", "S", "c"

found "\"" but expected one of "t", "U", "E", "V", "_", "2", "4", "R", "b", "H", "T", "Y", "B", "7", "P", "d", "n", "h", "g", "W", "p", "[", "J", "3", "m", "y", "=", "j", "N", "9", "q", "a", "f", "s", "Z", "G", "I", "5", "1", "k", "X", "e", "O", "M", "z", "C", "v", "x", "u", "i", "l", "D", "L", "w", "o", "0", "6", "A", "Q", "F", "K", "r", "8", "S", "c"
statement = QUOTE(_this call FUNC(placeBodyBagInGrave));
icon = QPATHTOEF(medical_gui,ui\grave.paa);
};
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_vitals/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
true,
1,
{
if (_this) exitWith {}; // skip if true
if (_this || {!(GETEGVAR(medical,enabled,false))}) exitWith {}; // skip if true or if medical system disabled
{
_x setVariable [VAR_OXYGEN_DEMAND, 0, true];
_x setVariable [VAR_SPO2, DEFAULT_SPO2, true];
Expand Down

0 comments on commit 9f0ba6a

Please sign in to comment.