Added proper addon basics to status, moved more functions into status

This commit is contained in:
BaerMitUmlaut 2017-04-26 22:05:40 +02:00
parent b89bc86e00
commit f12d69e231
11 changed files with 63 additions and 24 deletions

View File

@ -0,0 +1,25 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_Init_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE(call FUNC(install));
};
};
};

View File

View File

@ -0,0 +1,9 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -13,3 +13,5 @@ class CfgPatches {
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"

View File

@ -18,34 +18,41 @@ if (damage _unit > 0) then {
_unit setDamage 0;
};
_unit setVariable [QGVAR(pain), 0, true];
// - Blood and heart ----------------------------------------------------------
_unit setVariable [QGVAR(bloodVolume), DEFAULT_BLOOD_VOLUME, true];
_unit setVariable [QGVAR(isUnconscious), false, true];
_unit setVariable [QGVAR(partialHealCounter), 0, true];
// tourniquets
_unit setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
_unit setVariable [QGVAR(occludedMedications), nil, true]; //Delayed Medications (from tourniquets)
// wounds and injuries
_unit setVariable [QGVAR(openWounds), [], true];
_unit setVariable [QGVAR(bandagedWounds), [], true];
_unit setVariable [QGVAR(stitchedWounds), [], true];
// vitals
_unit setVariable [QGVAR(heartRate), DEFAULT_HEART_RATE, true];
_unit setVariable [QGVAR(heartRateAdjustments), [], true];
_unit setVariable [QGVAR(bloodPressure), [80, 120], true];
_unit setVariable [QGVAR(peripheralResistance), 100, true];
_unit setVariable [QGVAR(peripheralResistanceAdjustments), [], true];
_unit setVariable [QGVAR(inCardiacArrest), false, true];
_unit setVariable [QGVAR(hasLostBlood), 0, true];
_unit setVariable [QGVAR(isBleeding), false, true];
// - Pain ---------------------------------------------------------------------
_unit setVariable [QGVAR(pain), 0, true];
_unit setVariable [QGVAR(hasPain), false, true];
_unit setVariable [QGVAR(painSuppress), 0, true];
_unit setVariable [QGVAR(painSuppressAdjustments), [], true];
// - Wounds -------------------------------------------------------------------
_unit setVariable [QGVAR(openWounds), [], true];
_unit setVariable [QGVAR(bandagedWounds), [], true];
_unit setVariable [QGVAR(stitchedWounds), [], true];
// - Misc ---------------------------------------------------------------------
_unit setVariable [QGVAR(isUnconscious), false, true];
// - Treatments ---------------------------------------------------------------
_unit setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
_unit setVariable [QGVAR(occludedMedications), nil, true]; //Delayed Medications (from tourniquets)
_unit setVariable [QGVAR(ivBags), nil, true];
_unit setVariable [QGVAR(partialHealCounter), 0, true];
// triage card and logs
_unit setVariable [QGVAR(triageLevel), 0, true];
_unit setVariable [QGVAR(triageCard), [], true];
// IVs
_unit setVariable [QGVAR(ivBags), nil, true];
// damage storage
_unit setVariable [QGVAR(bodyPartDamage), [0,0,0,0,0,0], true];
#ifdef DEBUG_TESTRESULTS
@ -53,13 +60,6 @@ _unit setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
#endif
// generic medical admin
_unit setVariable [QGVAR(inCardiacArrest), false, true];
_unit setVariable [QGVAR(hasLostBlood), 0, true];
_unit setVariable [QGVAR(isBleeding), false, true];
_unit setVariable [QGVAR(hasPain), false, true];
_unit setVariable [QGVAR(painSuppress), 0, true];
_unit setVariable [QGVAR(painSuppressAdjustments), [], true];
private ["_allUsedMedication", "_logs"];
// medication