ACE3/addons/medical_treatment/XEH_preInit.sqf
Grim 59af3e1f6d
General - Change CBA Namespaces to HashMap (#8801)
* medical_treatment

* advanced_throwing

* common, csw

* Update fnc_replaceRegisteredItems.sqf

* Sanitised numerous components

* Update XEH_postInit.sqf

* Update XEH_postInit.sqf

* FUNC -> LINKFUNC

* Changed tagging hashmap

* Reverted some changes

* Reverted some changes

* Update XEH_clientInit.sqf

* Tweaks and fixes

* Fix number replacements

* Minor cleanup

* Update fnc_getMagazineName.sqf

* Update fnc_getMagazineName.sqf

* Minor improvement

* Made factions case-sensitive and added `toLowerANSI` to be safe

* Update fnc_getDetectedObject.sqf

* Update addons/common/functions/fnc_actionKeysNamesConverted.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Throw error if item doesn't exist

---------

Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-06-11 12:34:32 -03:00

51 lines
1.9 KiB
Plaintext

#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.inc.sqf"
#define ARSENAL_CATEGORY_ICON (["\A3\ui_f\data\igui\cfg\actions\heal_ca.paa", QPATHTOEF(medical_gui,data\categories\bandage_fracture.paa)] select (["ace_medical_gui"] call EFUNC(common,isModLoaded)))
// config to determine animation acceleration coefficient
// adjusting these is trail and error
// if the animation is cut of ingame, increase these values
// if the unit idles too much, decrease them
GVAR(animDurations) = createHashMapFromArray [
["ainvpknlmstpslaywnondnon_medic", 7.5],
["ainvppnemstpslaywnondnon_medic", 7],
["ainvpknlmstpslaywrfldnon_medic", 7],
["ainvppnemstpslaywrfldnon_medic", 9.5],
["ainvpknlmstpslaywlnrdnon_medic", 9],
["ainvpknlmstpslaywpstdnon_medic", 9.5],
["ainvppnemstpslaywpstdnon_medic", 10],
["ainvpknlmstpslaywnondnon_medicother", 8.5],
["ainvppnemstpslaywnondnon_medicother", 8.5],
["ainvpknlmstpslaywrfldnon_medicother", 7],
["ainvppnemstpslaywrfldnon_medicother", 9],
["ainvpknlmstpslaywlnrdnon_medicother", 9],
["ainvpknlmstpslaywpstdnon_medicother", 10],
["ainvppnemstpslaywpstdnon_medicother", 8.5],
["ainvpknlmstpsnonwnondnon_medic1", 10],
["ainvpknlmstpsnonwnondr_medic0", 12]
];
// 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"];
// Custom Arsenal tab
if (["ace_arsenal"] call EFUNC(common,isModLoaded)) then {
[MEDICAL_TREATMENT_ITEMS, LLSTRING(medicalTab), ARSENAL_CATEGORY_ICON, -1, true] call EFUNC(arsenal,addRightPanelButton);
};
ADDON = true;