mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical Treatment - Add medical facility classes config (#7047)
* Add medical facility classes config * Convert to configCase and filter non-existant buildings
This commit is contained in:
parent
2fc11d38e0
commit
1998bf3eb6
26
addons/medical_treatment/ACE_Medical_Facilities.hpp
Normal file
26
addons/medical_treatment/ACE_Medical_Facilities.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
class EGVAR(medical,facilities) {
|
||||
BI[] = {
|
||||
"Land_Medevac_house_V1_F",
|
||||
"Land_Medevac_HQ_V1_F",
|
||||
"Land_MedicalTent_01_white_IDAP_med_closed_F",
|
||||
"Land_MedicalTent_01_MTP_closed_F",
|
||||
"Land_MedicalTent_01_brownhex_closed_F",
|
||||
"Land_MedicalTent_01_digital_closed_F"
|
||||
};
|
||||
CUP[] = {
|
||||
"TK_GUE_WarfareBFieldhHospital_Base_EP1",
|
||||
"TK_GUE_WarfareBFieldhHospital_EP1",
|
||||
"TK_WarfareBFieldhHospital_Base_EP1",
|
||||
"TK_WarfareBFieldhHospital_EP1",
|
||||
"US_WarfareBFieldhHospital_Base_EP1",
|
||||
"US_WarfareBFieldhHospital_EP1",
|
||||
"MASH_EP1",
|
||||
"MASH",
|
||||
"Land_A_Hospital",
|
||||
"CDF_WarfareBFieldhHospital",
|
||||
"GUE_WarfareBFieldhHospital",
|
||||
"INS_WarfareBFieldhHospital",
|
||||
"RU_WarfareBFieldhHospital",
|
||||
"USMC_WarfareBFieldhHospital"
|
||||
};
|
||||
};
|
@ -2,8 +2,9 @@
|
||||
#define GRID_3DEN_W (pixelW * pixelGrid * 0.5)
|
||||
#define GRID_3DEN_H (pixelH * pixelGrid * 0.5)
|
||||
|
||||
#define DEFAULT_IS_MEDIC (parseNumber (_this getUnitTrait 'medic'))
|
||||
#define DEFAULT_IS_MEDIC (parseNumber (_this getUnitTrait 'medic'))
|
||||
#define DEFAULT_IS_MEDICAL_VEHICLE (getNumber (configFile >> 'CfgVehicles' >> typeOf _this >> 'attendant') > 0)
|
||||
#define DEFAULT_IS_MEDICAL_FACILITY (typeOf _this in GVAR(facilityClasses))
|
||||
|
||||
class ctrlToolbox;
|
||||
|
||||
@ -67,7 +68,7 @@ class Cfg3DEN {
|
||||
property = QUOTE(ace_isMedicalFacility);
|
||||
control = "Checkbox";
|
||||
expression = QUOTE(_this setVariable [ARR_3(QQEGVAR(medical,isMedicalFacility),_value,true)];);
|
||||
defaultValue = "false";
|
||||
defaultValue = QUOTE(DEFAULT_IS_MEDICAL_FACILITY);
|
||||
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
||||
typeName = "BOOL";
|
||||
};
|
||||
|
@ -34,24 +34,14 @@ GVAR(animDurations) = [] call CBA_fnc_createNamespace;
|
||||
["AinvPknlMstpSnonWnonDnon_medic1", 10]
|
||||
];
|
||||
|
||||
// class names of medical facilities
|
||||
// global variable so it can be accessed by mission makers
|
||||
GVAR(facilityClasses) = [
|
||||
"TK_GUE_WarfareBFieldhHospital_Base_EP1",
|
||||
"TK_GUE_WarfareBFieldhHospital_EP1",
|
||||
"TK_WarfareBFieldhHospital_Base_EP1",
|
||||
"TK_WarfareBFieldhHospital_EP1",
|
||||
"US_WarfareBFieldhHospital_Base_EP1",
|
||||
"US_WarfareBFieldhHospital_EP1",
|
||||
"MASH_EP1",
|
||||
"MASH",
|
||||
"Land_A_Hospital",
|
||||
"CDF_WarfareBFieldhHospital",
|
||||
"GUE_WarfareBFieldhHospital",
|
||||
"INS_WarfareBFieldhHospital",
|
||||
"RU_WarfareBFieldhHospital",
|
||||
"USMC_WarfareBFieldhHospital"
|
||||
];
|
||||
// class names of medical facilities (config case)
|
||||
GVAR(facilityClasses) = [];
|
||||
{
|
||||
{
|
||||
private _name = configName (configFile >> "CfgVehicles" >> _x);
|
||||
if (_name != "") then { GVAR(facilityClasses) pushBackUnique _name; };
|
||||
} forEach getArray _x;
|
||||
} forEach configProperties [configFile >> QEGVAR(medical,facilities), "isArray _x"];
|
||||
|
||||
// array of medical items to replace and their ACE equivalents
|
||||
GVAR(replacementItems) = configProperties [configFile >> QEGVAR(medical,replacementItems), "isArray _x"] apply {
|
||||
|
@ -16,6 +16,7 @@ class CfgPatches {
|
||||
|
||||
#include "ACE_Medical_Treatment.hpp"
|
||||
#include "ACE_Medical_Treatment_Actions.hpp"
|
||||
#include "ACE_Medical_Facilities.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgReplacementItems.hpp"
|
||||
|
Loading…
Reference in New Issue
Block a user