2016-09-04 09:25:03 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
#include "XEH_PREP.hpp"
|
2023-09-06 16:37:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
private _itemHash = createHashMap;
|
|
|
|
// key is Treatment Type (prefix @ represents a group of treatments)
|
|
|
|
// value is hash of item/treatment pairs
|
|
|
|
{
|
|
|
|
_x params ["_itemType", "_treatments"];
|
|
|
|
private _typeHash = createHashMap;
|
|
|
|
{
|
|
|
|
private _items = getArray (configFile >> "ace_medical_treatment_actions" >> _x >> "items");
|
|
|
|
if (_items isEqualTo []) then { ERROR_1("bad action %1",_x); };
|
|
|
|
private _itemClassname = configName (configFile >> "CfgWeapons" >> _items # 0);
|
2024-02-04 17:50:24 +00:00
|
|
|
private _treatment = ["", _x] select ((count _treatments) > 1);
|
2023-09-06 16:37:26 +00:00
|
|
|
_typeHash set [_itemClassname, _treatment];
|
|
|
|
} forEach _treatments;
|
|
|
|
_itemHash set [_itemType, _typeHash];
|
|
|
|
} forEach [
|
|
|
|
["@bandage", ["FieldDressing", "PackingBandage", "ElasticBandage", "QuikClot"]],
|
|
|
|
["@iv", ["SalineIV", "SalineIV_500", "SalineIV_250", "BloodIV", "BloodIV_500", "BloodIV_250", "PlasmaIV", "PlasmaIV_500", "PlasmaIV_250"]],
|
2024-08-05 09:39:01 +00:00
|
|
|
["tourniquet", ["ApplyTourniquet"]],
|
2023-09-06 16:37:26 +00:00
|
|
|
["splint", ["splint"]],
|
|
|
|
["morphine", ["morphine"]],
|
|
|
|
["epinephrine", ["epinephrine"]]
|
|
|
|
];
|
|
|
|
uinamespace setVariable [QGVAR(itemHash), compileFinal _itemHash];
|