2016-06-13 15:00:56 +00:00
# define COMPONENT medical_treatment
2016-06-30 15:33:29 +00:00
# define COMPONENT_BEAUTIFIED Medical Treatment
2016-06-13 15:00:56 +00:00
# include "\z\ace\addons\main\script_mod.hpp"
2019-07-05 20:32:19 +00:00
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
2016-06-13 15:00:56 +00:00
# ifdef DEBUG_ENABLED_MEDICAL_TREATMENT
# define DEBUG_MODE_FULL
# endif
# ifdef DEBUG_SETTINGS_MEDICAL_TREATMENT
# define DEBUG_SETTINGS DEBUG_SETTINGS_MEDICAL_TREATMENT
# endif
2018-07-18 18:13:25 +00:00
# include "\z\ace\addons\medical_engine\script_macros_medical.hpp"
2019-04-27 19:12:11 +00:00
# include "\z\ace\addons\main\script_macros.hpp"
2019-06-03 15:31:46 +00:00
// 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
2020-02-23 13:14:11 +00:00
// Animations that would be played slower than this are instead played exactly as slow as this. (= Progress bar will take longer than the slowed down animation).
# define ANIMATION_SPEED_MIN_COEFFICIENT 0.5
// Animations that would be played faster than this are instead skipped. (= Progress bar too quick for animation).
2020-02-23 13:25:11 +00:00
# define ANIMATION_SPEED_MAX_COEFFICIENT 2.5
2023-07-07 04:14:44 +00:00
2023-10-04 18:09:05 +00:00
# define MEDICAL_TREATMENT_ITEMS (keys (uiNamespace getVariable QGVAR(treatmentItems)))