ACE3/addons/medical_treatment/script_component.hpp
PabstMirror e1c650d56e
Medical - add dummy cfgVehicle entries for old modules (#7091)
* Medical - add dummy cfgVehicle entries for old modules

* add medical_menu

* Update addons/medical/CfgVehicles.hpp

Co-Authored-By: jonpas <jonpas33@gmail.com>
2019-07-05 15:32:19 -05:00

51 lines
1.6 KiB
C++

#define COMPONENT medical_treatment
#define COMPONENT_BEAUTIFIED Medical Treatment
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_MEDICAL_TREATMENT
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MEDICAL_TREATMENT
#define DEBUG_SETTINGS DEBUG_SETTINGS_MEDICAL_TREATMENT
#endif
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"
#include "\z\ace\addons\main\script_macros.hpp"
// Returns a text config entry as compiled code or variable from missionNamespace
#define GET_FUNCTION(var,cfg) \
private var = getText (cfg); \
if (isNil var) then { \
var = compile var; \
} else { \
var = missionNamespace getVariable var; \
}
// Returns a number config entry with default value of 0
// If entry is a string, will get the variable from missionNamespace
#define GET_NUMBER_ENTRY(cfg) \
if (isText (cfg)) then { \
missionNamespace getVariable [getText (cfg), 0]; \
} else { \
getNumber (cfg); \
}
// Macros for checking if unit is in medical vehicle or facility
// Defined mostly to make location check in canTreat more readable
#define IN_MED_VEHICLE(unit) (unit call FUNC(isInMedicalVehicle))
#define IN_MED_FACILITY(unit) (unit call FUNC(isInMedicalFacility))
#define TREATMENT_LOCATIONS_ALL 0
#define TREATMENT_LOCATIONS_VEHICLES 1
#define TREATMENT_LOCATIONS_FACILITIES 2
#define TREATMENT_LOCATIONS_VEHICLES_AND_FACILITIES 3
#define TREATMENT_LOCATIONS_NONE 4
#define LITTER_CLEANUP_CHECK_DELAY 30
#define BODY_CLEANUP_CHECK_DELAY 20