mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
4466f9e785
* Move litter to `treatment` * Move eden object attributes to `treatment` * Move treatment items to `treatment` * Move bodybag handling to `treatment` * Move state conditions to `statemachine` * Move radio addon handling to `feedback` * Move medical macros to `engine` * Move medical extension to `damage` * Fix texture and material paths after move * Remove duplicate medical menu config * Remove old faction class * Remove a bunch of old code
32 lines
946 B
Plaintext
32 lines
946 B
Plaintext
#include "script_component.hpp"
|
|
|
|
ADDON = false;
|
|
|
|
PREP_RECOMPILE_START;
|
|
#include "XEH_PREP.hpp"
|
|
PREP_RECOMPILE_END;
|
|
|
|
call FUNC(parseConfigForInjuries);
|
|
|
|
addMissionEventHandler ["Loaded",{
|
|
INFO("Mission Loaded - Reloading medical configs for extension");
|
|
// Reload configs into extension (handle full game restart)
|
|
call FUNC(parseConfigForInjuries);
|
|
}];
|
|
|
|
// decide which woundsHandler to use by whether the extension is present or not
|
|
if ("ace_medical" callExtension "version" != "") then {
|
|
DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandler);
|
|
} else {
|
|
DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandlerSQF);
|
|
};
|
|
|
|
[QEGVAR(medical,woundReceived), {
|
|
params ["_unit", "_woundedHitPoint", "_receivedDamage", "", "_ammo"];
|
|
|
|
private _typeOfDamage = _ammo call FUNC(getTypeOfDamage);
|
|
[_unit, _woundedHitPoint, _receivedDamage, _typeOfDamage] call FUNC(woundsHandlerActive);
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
ADDON = true;
|