diff --git a/addons/acemisc/$PBOPREFIX$ b/addons/acemisc/$PBOPREFIX$ index db6e4fdee..88d2de18e 100644 --- a/addons/acemisc/$PBOPREFIX$ +++ b/addons/acemisc/$PBOPREFIX$ @@ -1 +1 @@ -kat_acemisc +x\kat_aceAdvMedical\addons\acemisc diff --git a/addons/acemisc/ACE_Medical_Actions.hpp b/addons/acemisc/ACE_Medical_Actions.hpp new file mode 100644 index 000000000..4864ba2bf --- /dev/null +++ b/addons/acemisc/ACE_Medical_Actions.hpp @@ -0,0 +1,32 @@ +class ACE_Medical_Actions { + class Advanced { + class SalineIV; + class SalineIV_Stand: SalineIV { + displayName = CSTRING(Display_IVStand); + requiredMedic = 0; + condition = QUOTE(params ['_player']; [ARR_2(_player, 1000)] call FUNC(conditionIV)); + items[] = {}; + callbackSuccess = QUOTE([ARR_5(_player, _target, _selectionName, 'SalineIV', ['ACE_salineIV'])] call FUNC(treatmentIV)); + itemConsumed = 0; + }; + class SalineIV_Stand_500: SalineIV_Stand { + displayName = CSTRING(Display_IVStand_500); + condition = QUOTE(params ['_player']; [ARR_2(_player, 500)] call FUNC(conditionIV)); + callbackSuccess = QUOTE([ARR_5(_player, _target, _selectionName, 'SalineIV_500', ['ACE_salineIV_500'])] call FUNC(treatmentIV)); + }; + class SalineIV_Stand_250: SalineIV_Stand { + displayName = CSTRING(Display_IVStand_250); + condition = QUOTE(params ['_player']; [ARR_2(_player, 250)] call FUNC(conditionIV)); + callbackSuccess = QUOTE([ARR_5(_player, _target, _selectionName, 'SalineIV_250', ['ACE_salineIV_250'])] call FUNC(treatmentIV)); + }; + class PersonalAidKit; + class LimitWounds: PersonalAidKit { + displayName = CSTRING(LIMITWOUNDS_Display); + displayNameProgress = CSTRING(LIMITWOUNDS_Display); + patientStateCondition = QGVAR(limitWounds_condition); + condition = QUOTE(([_target] call FUNC(getNumOpenWounds) > 5) && GVAR(limitWounds_enable)); + treatmentTime = 8; + callbackSuccess = QUOTE([_target] call FUNC(limitWounds)); + }; + }; +}; diff --git a/addons/acemisc/BIS_AddonInfo.hpp b/addons/acemisc/BIS_AddonInfo.hpp deleted file mode 100644 index 38ba39854..000000000 --- a/addons/acemisc/BIS_AddonInfo.hpp +++ /dev/null @@ -1,4 +0,0 @@ -class BIS_AddonInfo -{ - author="Katalam"; -}; diff --git a/addons/acemisc/CfgEventHandlers.hpp b/addons/acemisc/CfgEventHandlers.hpp new file mode 100644 index 000000000..f0ba52f40 --- /dev/null +++ b/addons/acemisc/CfgEventHandlers.hpp @@ -0,0 +1,34 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + disableModuload = true; + }; +}; + +class Extended_Init_EventHandlers { + class CAManBase { + class ADDON { + init = QUOTE(_this call COMPILE_FILE(XEH_init)); + }; + }; + class Land_IntravenStand_01_empty_F { + class ADDON { + init = QUOTE((_this select 0) setVariable [ARR_3(QQGVAR(stand), [], true)]); + }; + }; + class Land_IntravenStand_01_1bag_F { + class ADDON { + init = QUOTE((_this select 0) setVariable [ARR_3(QQGVAR(stand), [1000], true)]); + }; + }; + class Land_IntravenStand_01_2bags_F { + class ADDON { + init = QUOTE((_this select 0) setVariable [ARR_3(QQGVAR(stand), [ARR_2(1000, 1000)], true)]); + }; + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/acemisc/CfgFunctions.hpp b/addons/acemisc/CfgFunctions.hpp new file mode 100644 index 000000000..d1675f9f5 --- /dev/null +++ b/addons/acemisc/CfgFunctions.hpp @@ -0,0 +1,11 @@ +class CfgFunctions { + class ADDON { + tag = "ace_interaction"; + class ace_interaction { + class addPassengersActions { + file = QPATHTOF(functions\fnc_addPassengersActions.sqf); + }; + }; + }; + +}; diff --git a/addons/acemisc/CfgMoves.hpp b/addons/acemisc/CfgMoves.hpp new file mode 100644 index 000000000..720bcec6d --- /dev/null +++ b/addons/acemisc/CfgMoves.hpp @@ -0,0 +1,17 @@ +class CfgMovesBasic { + class ManActions { + kat_stretcher = "kat_stretcher"; + }; +}; + +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class Crew; + class kat_stretcher: crew { + file = "a3\anims_f\data\anim\sdr\inj\ainjppnemstpsnonwnondnon.rtm"; + interpolateTo[] = {"Unconscious", 0.02}; + leftHandIKCurve[] = {}; + rightHandIKCurve[] = {}; + }; + }; +}; diff --git a/addons/acemisc/CfgVehicles.hpp b/addons/acemisc/CfgVehicles.hpp new file mode 100644 index 000000000..85032fb91 --- /dev/null +++ b/addons/acemisc/CfgVehicles.hpp @@ -0,0 +1,277 @@ +class CfgVehicles { + #include "vehicle_stretcher.hpp" + class Land_IntravenStand_01_base_F; + + class Land_IntravenStand_01_empty_F: Land_IntravenStand_01_base_F { + ace_cargo_size = 2; + ace_cargo_canLoad = 1; + + // Dragging + ace_dragging_canDrag = 1; + ace_dragging_dragPosition[] = {0, 1.2, 1}; + ace_dragging_dragDirection = 0; + + // Carrying + ace_dragging_canCarry = 1; + ace_dragging_carryPosition[] = {0, 1.2, 1}; + ace_dragging_carryDirection = 0; + }; + class Land_IntravenStand_01_1bag_F: Land_IntravenStand_01_base_F { + ace_cargo_size = 2; + ace_cargo_canLoad = 1; + + // Dragging + ace_dragging_canDrag = 1; + ace_dragging_dragPosition[] = {0, 1.2, 1}; + ace_dragging_dragDirection = 0; + + // Carrying + ace_dragging_canCarry = 1; + ace_dragging_carryPosition[] = {0, 1.2, 1}; + ace_dragging_carryDirection = 0; + }; + class Land_IntravenStand_01_2bags_F: Land_IntravenStand_01_base_F { + ace_cargo_size = 2; + ace_cargo_canLoad = 1; + + // Dragging + ace_dragging_canDrag = 1; + ace_dragging_dragPosition[] = {0, 1.2, 1}; + ace_dragging_dragDirection = 0; + + // Carrying + ace_dragging_canCarry = 1; + ace_dragging_carryPosition[] = {0, 1.2, 1}; + ace_dragging_carryDirection = 0; + }; + + class weapon_bag_base; + class kat_stretcherBag: weapon_bag_base { + class assembleInfo { + displayName = "Stretcher"; + assembleTo = "kat_stretcher"; + base = ""; + primary = 1; + dissasembleTo[] = {}; + }; + author = "Katalam"; + scope = 2; + editorCategory = "EdCat_Equipment"; + editorSubcategory = "EdSubcat_DismantledWeapons"; + displayName = "Stretcher (Packed)"; + mass = 60; + }; + + class Tank_F; + class kat_stretcher: Tank_F { + explosionEffect = ""; + fuelExplosionPower = 0; + editorForceEmpty = 1; + editorSubcategory = "edSubcat_Storage"; + crew = "C_man_1"; + icon = "iconObject_1x1"; + hasDriver = 0; + scope = 2; + side = 3; + faction = "CIV_F"; + accuracy = 0.001; + camouflage = 10; + armor = 20; + displayName = "Stretcher"; + model = QPATHTOF(models\stretcher\vurtual_stretcher.p3d); + simulation = "tankX"; + crewVulnerable = 1; + explosionShielding = 0; + irTarget = 0; + allowTabLock = 0; + memoryPointsGetInCargo = "pos cargo"; + memoryPointsGetInCargoDir = "pos cargo dir"; + cargoAction[] = {"kat_stretcher"}; + tf_isolatedAmount = 0; + numberPhysicalWheels = 0; + hideProxyInCombat = 0; + hideWeaponsCargo = true; + ejectDeadCargo = 0; + class Damage { + tex[] = {}; + mat[] = { + QPATHTOF(models\stretcher\seat.rvmat), + QPATHTOF(models\stretcher\seat_destruct.rvmat) + }; + }; + class animationSources { + class seat_hide { + source = "user"; + initPhase = 0; + animPeriod = 0.1; + displayName = "Hide Stretcher"; + forceAnimatePhase = 1; + forceAnimate[] = {"legs_hide", 1}; + }; + }; + maximumLoad = 0; + transportMaxBackpacks = 0; + transportMaxMagazines = 64; + class TransportItems; + class CargoTurret; + class Turrets { + class MainTurret: CargoTurret { + gunnerAction = "passenger_inside_2"; + gunnerInAction = "passenger_inside_2"; //fixes standing up in steat + memoryPointsGetInGunner = "pos cargo"; + memoryPointsGetInGunnerDir = "pos cargo dir"; + gunnerName = "Armchair Warrior"; + gunnerCompartments = "Compartment1"; + proxyIndex = 1; + isPersonTurret = 1; + forceHideGunner = 1; //fixes being turned out in seat + maxElev = 75; + minElev = -75; + maxTurn = 95; + minTurn = -95; + stabilizedInAxes = 3; + primaryGunner = 1; + dontCreateAI = 0; + ejectDeadGunner = 0; + }; + }; + transportSoldier = 1; + ace_cargo_canLoad = 0; + ace_Cargo_hasCargo = 0; + ace_dragging_canDrag = 1; + ace_dragging_canCarry = 1; + ace_dragging_dragPosition[] = {0,1.7,0}; + ace_dragging_carryPosition[] = {0, 1.7, 0}; + ace_dragging_dragDirection = 0; + ace_Carry_carryDirection = 0; + ace_cookoff_probability = 0; + slingLoadCargoMemoryPoints[] = {"SlingLoadCargo1", "SlingLoadCargo2", "SlingLoadCargo3", "SlingLoadCargo4"}; + destrType = "destructDefault"; + fuelCapacity = 0; + + //pretend static weapon since some mods don't like unconscious people in static weapons + nameSound = "veh_static_s"; + vehicleClass = "static"; + unitInfoType = "RscUnitInfoStatic"; + crewExplosionProtection = 0; + class DestructionEffects {}; + class VehicleTransport { + class Cargo { + parachuteClass = "B_Parachute_02_F"; + parachuteHeightLimit = 5; + canBeTransported = 1; + dimensions[] = {"VTV_Cargo_Base", "VTV_Cargo_Corner"}; + }; + }; + class EventHandlers { + init = QUOTE(_this call FUNC(stretcher)); + }; + }; + class Land_Stretcher_01_base_F; + class Land_Stretcher_01_olive_F: Land_Stretcher_01_base_F { + ace_cargo_canLoad = 1; + ace_Cargo_hasCargo = 0; + ace_dragging_canDrag = 1; + ace_dragging_canCarry = 1; + ace_dragging_dragPosition[] = {0,1.7,0}; + ace_dragging_carryPosition[] = {0, 1.7, 0}; + ace_dragging_dragDirection = 0; + ace_Carry_carryDirection = 0; + ace_cookoff_probability = 0; + class VehicleTransport { + class Cargo { + parachuteClass = "B_Parachute_02_F"; + parachuteHeightLimit = 5; + canBeTransported = 1; + dimensions[] = {"VTV_Cargo_Base", "VTV_Cargo_Corner"}; + }; + }; + }; + + class Man; + class CAManBase: Man { + class ACE_Actions { + class ACE_Torso { + class FieldDressing; + class LimitWounds { + displayName = CSTRING(LIMITWOUNDS_Display); + condition = "[_player, _target, 'hand_l', 'LimitWounds'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'hand_l', 'LimitWounds'] call ace_medical_fnc_treatment"; + icon = ""; + }; + }; + class ACE_ArmLeft { + class SalineIV; + class SalineIV_Stand: SalineIV { + displayName = CSTRING(Display_IVStand); + condition = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_500: SalineIV { + displayName = CSTRING(Display_IVStand_500); + condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_250: SalineIV { + displayName = CSTRING(Display_IVStand_250); + condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; + }; + }; + class ACE_ArmRight { + class SalineIV; + class SalineIV_Stand: SalineIV { + displayName = CSTRING(Display_IVStand); + condition = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_500: SalineIV { + displayName = CSTRING(Display_IVStand_500); + condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_250: SalineIV { + displayName = CSTRING(Display_IVStand_250); + condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; + }; + }; + class ACE_LegLeft { + class SalineIV; + class SalineIV_Stand: SalineIV { + displayName = CSTRING(Display_IVStand); + condition = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_500: SalineIV { + displayName = CSTRING(Display_IVStand_500); + condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_250: SalineIV { + displayName = CSTRING(Display_IVStand_250); + condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; + }; + }; + class ACE_LegRight { + class SalineIV; + class SalineIV_Stand: SalineIV { + displayName = CSTRING(Display_IVStand); + condition = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_500: SalineIV { + displayName = CSTRING(Display_IVStand_500); + condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; + }; + class SalineIV_Stand_250: SalineIV { + displayName = CSTRING(Display_IVStand_250); + condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; + statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; + }; + }; + }; + }; +}; diff --git a/addons/acemisc/XEH_PREP.hpp b/addons/acemisc/XEH_PREP.hpp new file mode 100644 index 000000000..cfc9157a7 --- /dev/null +++ b/addons/acemisc/XEH_PREP.hpp @@ -0,0 +1,12 @@ +PREP(addIVbag); +PREP(addPassengersActions); +PREP(attachStretcher); +PREP(bandageRandomWound); +PREP(conditionIV); +PREP(conditionIVstand); +PREP(getNumOpenWounds); +PREP(init); +PREP(limitWounds); +PREP(removeIVbag); +PREP(stretcher); +PREP(treatmentIV); diff --git a/addons/acemisc/XEH_init.sqf b/addons/acemisc/XEH_init.sqf new file mode 100644 index 000000000..bba4b53de --- /dev/null +++ b/addons/acemisc/XEH_init.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_unit"]; + +_unit call FUNC(init); diff --git a/addons/acemisc/XEH_postInit.sqf b/addons/acemisc/XEH_postInit.sqf new file mode 100644 index 000000000..fcf4a98e3 --- /dev/null +++ b/addons/acemisc/XEH_postInit.sqf @@ -0,0 +1,25 @@ +#include "script_component.hpp" + +["Land_IntravenStand_01_empty_F", 0, ["ACE_MainActions"], + [QGVAR(addIV_1), localize LSTRING(Action_add_IV_Display), "", {[_target, _player, 1000] call FUNC(addIVbag)}, {[_player, "ACE_salineIV"] call FUNC(conditionIVstand)}] call ace_interact_menu_fnc_createAction +] call ace_interact_menu_fnc_addActionToClass; + +["Land_IntravenStand_01_empty_F", 0, ["ACE_MainActions"], + [QGVAR(addIV_5), localize LSTRING(Action_add_IV_Display_500), "", {[_target, _player, 500] call FUNC(addIVbag)}, {[_player, "ACE_salineIV_500"] call FUNC(conditionIVstand)}] call ace_interact_menu_fnc_createAction +] call ace_interact_menu_fnc_addActionToClass; + +["Land_IntravenStand_01_empty_F", 0, ["ACE_MainActions"], + [QGVAR(addIV_2), localize LSTRING(Action_add_IV_Display_250), "", {[_target, _player, 250] call FUNC(addIVbag)}, {[_player, "ACE_salineIV_250"] call FUNC(conditionIVstand)}] call ace_interact_menu_fnc_createAction +] call ace_interact_menu_fnc_addActionToClass; + +["Land_IntravenStand_01_1bag_F", 0, ["ACE_MainActions"], + [QGVAR(addIV), localize LSTRING(Action_add_IV_Display), "", {[_target, _player, 1000] call FUNC(addIVbag)}, {[_player, "ACE_salineIV"] call FUNC(conditionIVstand)}] call ace_interact_menu_fnc_createAction +] call ace_interact_menu_fnc_addActionToClass; + +["Land_IntravenStand_01_1bag_F", 0, ["ACE_MainActions"], + [QGVAR(addIV_5), localize LSTRING(Action_add_IV_Display_500), "", {[_target, _player, 500] call FUNC(addIVbag)}, {[_player, "ACE_salineIV_500"] call FUNC(conditionIVstand)}] call ace_interact_menu_fnc_createAction +] call ace_interact_menu_fnc_addActionToClass; + +["Land_IntravenStand_01_1bag_F", 0, ["ACE_MainActions"], + [QGVAR(addIV_2), localize LSTRING(Action_add_IV_Display_250), "", {[_target, _player, 250] call FUNC(addIVbag)}, {[_player, "ACE_salineIV_250"] call FUNC(conditionIVstand)}] call ace_interact_menu_fnc_createAction +] call ace_interact_menu_fnc_addActionToClass; diff --git a/addons/acemisc/XEH_preInit.sqf b/addons/acemisc/XEH_preInit.sqf new file mode 100644 index 000000000..3f4d8568c --- /dev/null +++ b/addons/acemisc/XEH_preInit.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#define CBA_SETTINGS_CAT "KAT - ADV Medical: Misc" + +//Enable aceExposure things +[ + QGVAR(enable), + "CHECKBOX", + localize LSTRING(SETTING_ENABLE), + CBA_SETTINGS_CAT, + [true], + true +] call CBA_Settings_fnc_init; + +ADDON = true; diff --git a/addons/acemisc/config.cpp b/addons/acemisc/config.cpp index 6c913d516..804fd5514 100644 --- a/addons/acemisc/config.cpp +++ b/addons/acemisc/config.cpp @@ -1,422 +1,30 @@ -#include "BIS_AddonInfo.hpp" +#include "script_component.hpp" + class CfgPatches { - class kat_aceMisc { + class ADDON { + name = COMPONENT_NAME; + requiredVersion = REQUIRED_VERSION; units[] = { - "KAT_stretcher", - "KAT_stretcher_bag" - }; - weapons[] = { - + kat_stretcher, + kat_stretcherBag }; - requiredVersion = 1.80; + weapons[] = { }; + magazines[] = { }; requiredAddons[] = { + "kat_main", "ace_medical", "cba_settings", "A3_Static_F" }; - version = "1.0"; - versionStr = "1.0"; author = "Katalam"; - authorUrl = "https://github.com/Katalam/kat_aceAdvMedical"; - }; -}; - -#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \ - name = #ITEM; \ - count = COUNT; \ -}; - -class CfgMovesBasic { - class ManActions { - kat_stretcher = "kat_stretcher"; - }; -}; - -class CfgMovesMaleSdr: CfgMovesBasic { - class States { - class Crew; - class kat_stretcher: crew { - file = "a3\anims_f\data\anim\sdr\inj\ainjppnemstpsnonwnondnon.rtm"; - interpolateTo[] = {"Unconscious", 0.02}; - leftHandIKCurve[] = {}; - rightHandIKCurve[] = {}; - }; + authors[] = {"Katalam"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; }; }; -class CfgFunctions { - class kat_aceMisc { - file = "kat_aceMisc\functions"; - class functions { - class addIVbag{}; - class attachStretcher{}; - class bandageRandomWound{}; - class conditionIV{}; - class conditionIVstand{}; - class events{}; - class getNumOpenWounds{}; - class handleInit{}; - class init{}; - class limitWounds{}; - class registerSettings{}; - class removeIVbag{}; - class stretcher{}; - class treatmentIV{}; - }; - }; - - class kat_aceInteraction { - tag = "ace_interaction"; - class ace_interaction { - class addPassengersActions { - file = "kat_aceMisc\functions\fn_addPassengersActions.sqf"; - }; - }; - }; - -}; - -class Extended_PreInit_EventHandlers { - class kat_aceMisc_preInit { - init = "call kat_aceMisc_fnc_registerSettings"; - }; -}; -class Extended_Init_EventHandlers { - class CAManBase { - class kat_aceMisc_init { - init = "_this call kat_aceMisc_fnc_handleInit"; - }; - }; - class Land_IntravenStand_01_empty_F { - class kat_aceMisc_init_0bag { - init = "(_this select 0) setVariable ['kat_aceMisc_stand', [], true]"; - }; - }; - class Land_IntravenStand_01_1bag_F { - class kat_aceMisc_init_1bag { - init = "(_this select 0) setVariable ['kat_aceMisc_stand', [1000], true]"; - }; - }; - class Land_IntravenStand_01_2bags_F { - class kat_aceMisc_init_2bag { - init = "(_this select 0) setVariable ['kat_aceMisc_stand', [1000, 1000], true]"; - }; - }; -}; -class Extended_PostInit_EventHandlers { - class kat_aceMisc_postInit { - init = "call kat_aceMisc_fnc_events"; - }; -}; - -class cfgVehicles { - #include "vehicle_stretcher.hpp" - class Land_IntravenStand_01_base_F; - - class Land_IntravenStand_01_empty_F: Land_IntravenStand_01_base_F { - ace_cargo_size = 2; - ace_cargo_canLoad = 1; - - // Dragging - ace_dragging_canDrag = 1; - ace_dragging_dragPosition[] = {0, 1.2, 1}; - ace_dragging_dragDirection = 0; - - // Carrying - ace_dragging_canCarry = 1; - ace_dragging_carryPosition[] = {0, 1.2, 1}; - ace_dragging_carryDirection = 0; - }; - class Land_IntravenStand_01_1bag_F: Land_IntravenStand_01_base_F { - ace_cargo_size = 2; - ace_cargo_canLoad = 1; - - // Dragging - ace_dragging_canDrag = 1; - ace_dragging_dragPosition[] = {0, 1.2, 1}; - ace_dragging_dragDirection = 0; - - // Carrying - ace_dragging_canCarry = 1; - ace_dragging_carryPosition[] = {0, 1.2, 1}; - ace_dragging_carryDirection = 0; - }; - class Land_IntravenStand_01_2bags_F: Land_IntravenStand_01_base_F { - ace_cargo_size = 2; - ace_cargo_canLoad = 1; - - // Dragging - ace_dragging_canDrag = 1; - ace_dragging_dragPosition[] = {0, 1.2, 1}; - ace_dragging_dragDirection = 0; - - // Carrying - ace_dragging_canCarry = 1; - ace_dragging_carryPosition[] = {0, 1.2, 1}; - ace_dragging_carryDirection = 0; - }; - - class weapon_bag_base; - class kat_stretcher_bag: weapon_bag_base { - class assembleInfo { - displayName = "Stretcher"; - assembleTo = "kat_stretcher"; - base = ""; - primary = 1; - dissasembleTo[] = {}; - }; - author = "Katalam"; - scope = 2; - editorCategory = "EdCat_Equipment"; - editorSubcategory = "EdSubcat_DismantledWeapons"; - displayName = "Stretcher (Packed)"; - mass = 60; - }; - - class Tank_F; - class kat_stretcher: Tank_F { - explosionEffect = ""; - fuelExplosionPower = 0; - editorForceEmpty = 1; - editorSubcategory = "edSubcat_Storage"; - crew = "C_man_1"; - icon = "iconObject_1x1"; - hasDriver = 0; - scope = 2; - side = 3; - faction = "CIV_F"; - accuracy = 0.001; - camouflage = 10; - armor = 20; - displayName = "Stretcher"; - model = "\kat_acemisc\images\vurtual_stretcher.p3d"; - simulation = "tankX"; - crewVulnerable = 1; - explosionShielding = 0; - irTarget = 0; - allowTabLock = 0; - memoryPointsGetInCargo = "pos cargo"; - memoryPointsGetInCargoDir = "pos cargo dir"; - cargoAction[] = {"kat_stretcher"}; - tf_isolatedAmount = 0; - numberPhysicalWheels = 0; - hideProxyInCombat = 0; - hideWeaponsCargo = true; - ejectDeadCargo = 0; - class Damage { - tex[] = {}; - mat[] = { - "kat_acemisc\images\seat.rvmat", - "kat_acemisc\images\seat_destruct.rvmat" - }; - }; - class animationSources { - class seat_hide { - source = "user"; - initPhase = 0; - animPeriod = 0.1; - displayName = "Hide Stretcher"; - forceAnimatePhase = 1; - forceAnimate[] = {"legs_hide", 1}; - }; - }; - maximumLoad = 0; - transportMaxBackpacks = 0; - transportMaxMagazines = 64; - transportMaxMagazines = 12; - class TransportItems; - class CargoTurret; - class Turrets { - class MainTurret: CargoTurret { - gunnerAction = "passenger_inside_2"; - gunnerInAction = "passenger_inside_2"; //fixes standing up in steat - memoryPointsGetInGunner = "pos cargo"; - memoryPointsGetInGunnerDir = "pos cargo dir"; - gunnerName = "Armchair Warrior"; - gunnerCompartments = "Compartment1"; - proxyIndex = 1; - isPersonTurret = 1; - forceHideGunner = 1; //fixes being turned out in seat - maxElev = 75; - minElev = -75; - maxTurn = 95; - minTurn = -95; - stabilizedInAxes = 3; - primaryGunner = 1; - dontCreateAI = 0; - ejectDeadGunner = 0; - }; - }; - transportSoldier = 1; - ace_cargo_canLoad = 0; - ace_Cargo_hasCargo = 0; - ace_dragging_canDrag = 1; - ace_dragging_canCarry = 1; - ace_dragging_dragPosition[] = {0,1.7,0}; - ace_dragging_carryPosition[] = {0, 1.7, 0}; - ace_dragging_dragDirection = 0; - ace_Carry_carryDirection = 0; - ace_cookoff_probability = 0; - slingLoadCargoMemoryPoints[] = {"SlingLoadCargo1", "SlingLoadCargo2", "SlingLoadCargo3", "SlingLoadCargo4"}; - destrType = "destructDefault"; - fuelCapacity = 0; - - //pretend static weapon since some mods don't like unconscious people in static weapons - nameSound = "veh_static_s"; - vehicleClass = "static"; - unitInfoType = "RscUnitInfoStatic"; - crewExplosionProtection = 0; - class DestructionEffects {}; - class VehicleTransport { - class Cargo { - parachuteClass = "B_Parachute_02_F"; - parachuteHeightLimit = 5; - canBeTransported = 1; - dimensions[] = {"VTV_Cargo_Base", "VTV_Cargo_Corner"}; - }; - }; - class EventHandlers { - init = "_this call kat_aceMisc_fnc_stretcher"; - }; - }; - class Land_Stretcher_01_base_F; - class Land_Stretcher_01_olive_F: Land_Stretcher_01_base_F { - ace_cargo_canLoad = 1; - ace_Cargo_hasCargo = 0; - ace_dragging_canDrag = 1; - ace_dragging_canCarry = 1; - ace_dragging_dragPosition[] = {0,1.7,0}; - ace_dragging_carryPosition[] = {0, 1.7, 0}; - ace_dragging_dragDirection = 0; - ace_Carry_carryDirection = 0; - ace_cookoff_probability = 0; - class VehicleTransport { - class Cargo { - parachuteClass = "B_Parachute_02_F"; - parachuteHeightLimit = 5; - canBeTransported = 1; - dimensions[] = {"VTV_Cargo_Base", "VTV_Cargo_Corner"}; - }; - }; - }; - - class Man; - class CAManBase: Man { - class ACE_Actions { - class ACE_Torso { - class FieldDressing; - class LimitWounds { - displayName = "$STR_kat_aceMisc_LIMITWOUNDS_Display"; - condition = "[_player, _target, 'hand_l', 'LimitWounds'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'hand_l', 'LimitWounds'] call ace_medical_fnc_treatment"; - icon = ""; - }; - }; - class ACE_ArmLeft { - class SalineIV; - class SalineIV_Stand: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand"; - condition = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_500: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_500"; - condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_250: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_250"; - condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; - }; - }; - class ACE_ArmRight { - class SalineIV; - class SalineIV_Stand: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand"; - condition = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_500: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_500"; - condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_250: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_250"; - condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; - }; - }; - class ACE_LegLeft { - class SalineIV; - class SalineIV_Stand: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand"; - condition = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_500: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_500"; - condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_250: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_250"; - condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; - }; - }; - class ACE_LegRight { - class SalineIV; - class SalineIV_Stand: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand"; - condition = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_500: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_500"; - condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_fnc_treatment"; - }; - class SalineIV_Stand_250: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand_250"; - condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_fnc_canTreatCached"; - statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_fnc_treatment"; - }; - }; - }; - }; -}; - -class ACE_Medical_Actions { - class Advanced { - class SalineIV; - class SalineIV_Stand: SalineIV { - displayName = "$STR_kat_aceMisc_Display_IVStand"; - requiredMedic = 0; - condition = "params ['_player'];[_player, 1000] call kat_aceMisc_fnc_conditionIV"; // no idea why here is a params needed - items[] = {}; - callbackSuccess = "[_player, _target, _selectionName, 'SalineIV', ['ACE_salineIV']] call kat_aceMisc_fnc_treatmentIV"; - itemConsumed = 0; - }; - class SalineIV_Stand_500: SalineIV_Stand { - displayName = "$STR_kat_aceMisc_Display_IVStand_500"; - condition = "params ['_player'];[_player, 500] call kat_aceMisc_fnc_conditionIV"; - callbackSuccess = "[_player, _target, _selectionName, 'SalineIV_500', ['ACE_salineIV_500']] call kat_aceMisc_fnc_treatmentIV"; - }; - class SalineIV_Stand_250: SalineIV_Stand { - displayName = "$STR_kat_aceMisc_Display_IVStand_250"; - condition = "params ['_player'];[_player, 250] call kat_aceMisc_fnc_conditionIV"; - callbackSuccess = "[_player, _target, _selectionName, 'SalineIV_250', ['ACE_salineIV_250']] call kat_aceMisc_fnc_treatmentIV"; - }; - class PersonalAidKit; - class LimitWounds: PersonalAidKit { - displayName = $STR_kat_aceMisc_LIMITWOUNDS_Display; - displayNameProgress = $STR_kat_aceMisc_LIMITWOUNDS_Display; - patientStateCondition = "kat_aceMisc_limitWounds_condition"; - condition = "[_target] call kat_aceMisc_fnc_getNumOpenWounds > 5 && (missionNamespace getVariable ['kat_aceMisc_limitWounds_enable', true])"; - treatmentTime = 8; - callbackSuccess = "[_target] call kat_aceMisc_fnc_limitWounds"; - }; - }; -}; +#include "CfgMoves.hpp" +#include "CfgFunctions.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "ACE_Medical_Actions.hpp" diff --git a/addons/acemisc/functions/fn_events.sqf b/addons/acemisc/functions/fn_events.sqf deleted file mode 100644 index 2d00f9f96..000000000 --- a/addons/acemisc/functions/fn_events.sqf +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Author: Katalam - * CBA Events function - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call kat_aceMisc_fnc_events; - * - * Public: No - */ - -//["", {_this call kat_aceMisc_fnc_}] call CBA_fnc_addEventHandler; - - -["Land_IntravenStand_01_empty_F", 0, ["ACE_MainActions"], - ["kat_addIV_1", localize "STR_kat_aceMisc_Action_add_IV_Display", "", {[_target, _player, 1000] call kat_aceMisc_fnc_addIVbag}, {[_player, "ACE_salineIV"] call kat_aceMisc_fnc_conditionIVstand}] call ace_interact_menu_fnc_createAction -] call ace_interact_menu_fnc_addActionToClass; - -["Land_IntravenStand_01_empty_F", 0, ["ACE_MainActions"], - ["kat_addIV_5", localize "STR_kat_aceMisc_Action_add_IV_Display_500", "", {[_target, _player, 500] call kat_aceMisc_fnc_addIVbag}, {[_player, "ACE_salineIV_500"] call kat_aceMisc_fnc_conditionIVstand}] call ace_interact_menu_fnc_createAction -] call ace_interact_menu_fnc_addActionToClass; - -["Land_IntravenStand_01_empty_F", 0, ["ACE_MainActions"], - ["kat_addIV_2", localize "STR_kat_aceMisc_Action_add_IV_Display_250", "", {[_target, _player, 250] call kat_aceMisc_fnc_addIVbag}, {[_player, "ACE_salineIV_250"] call kat_aceMisc_fnc_conditionIVstand}] call ace_interact_menu_fnc_createAction -] call ace_interact_menu_fnc_addActionToClass; - -["Land_IntravenStand_01_1bag_F", 0, ["ACE_MainActions"], - ["kat_addIV", localize "STR_kat_aceMisc_Action_add_IV_Display", "", {[_target, _player, 1000] call kat_aceMisc_fnc_addIVbag}, {[_player, "ACE_salineIV"] call kat_aceMisc_fnc_conditionIVstand}] call ace_interact_menu_fnc_createAction -] call ace_interact_menu_fnc_addActionToClass; - -["Land_IntravenStand_01_1bag_F", 0, ["ACE_MainActions"], - ["kat_addIV_5", localize "STR_kat_aceMisc_Action_add_IV_Display_500", "", {[_target, _player, 500] call kat_aceMisc_fnc_addIVbag}, {[_player, "ACE_salineIV_500"] call kat_aceMisc_fnc_conditionIVstand}] call ace_interact_menu_fnc_createAction -] call ace_interact_menu_fnc_addActionToClass; - -["Land_IntravenStand_01_1bag_F", 0, ["ACE_MainActions"], - ["kat_addIV_2", localize "STR_kat_aceMisc_Action_add_IV_Display_250", "", {[_target, _player, 250] call kat_aceMisc_fnc_addIVbag}, {[_player, "ACE_salineIV_250"] call kat_aceMisc_fnc_conditionIVstand}] call ace_interact_menu_fnc_createAction -] call ace_interact_menu_fnc_addActionToClass; diff --git a/addons/acemisc/functions/fn_handleInit.sqf b/addons/acemisc/functions/fn_handleInit.sqf deleted file mode 100644 index eeab7cf93..000000000 --- a/addons/acemisc/functions/fn_handleInit.sqf +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Author: Katalam - * Handle unit init. - * - * Arguments: - * 0: Unit - * - * Return Value: - * None - * - * Example: - * [player] call kat_aceMisc_fnc_handleInit; - * - * Public: No - */ - -params ["_unit"]; - -_unit call kat_aceMisc_fnc_init; diff --git a/addons/acemisc/functions/fn_registerSettings.sqf b/addons/acemisc/functions/fn_registerSettings.sqf deleted file mode 100644 index 5f957b545..000000000 --- a/addons/acemisc/functions/fn_registerSettings.sqf +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Author: Katalam - * CBA Settings function - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call kat_aceMisc_fnc_registerSettings; - * - * Public: No - */ - -#define CBA_SETTINGS_CAT "KAT - ACE Misc" - -//Enable aceExposure things -[ - "kat_aceMisc_enable", - "CHECKBOX", - localize "STR_kat_aceMisc_SETTING_ENABLE", - CBA_SETTINGS_CAT, - [true], - true -] call CBA_Settings_fnc_init; - -//Enable limit wounds -[ - "kat_aceMisc_limitWounds_enable", - "CHECKBOX", - localize "STR_kat_aceMisc_SETTING_LIMITWOUNDS_ENABLE", - CBA_SETTINGS_CAT, - [true], - true -] call CBA_Settings_fnc_init; - -//Enable limit wounds -[ - "kat_aceMisc_limitWounds_condition", - "LIST", - localize "STR_kat_aceMisc_Condition_limitWounds_Display", - CBA_SETTINGS_CAT, - [[0, 1, 2, 3], ["STR_ACE_Medical_AdvancedMedicalSettings_anywhere", "STR_ACE_Medical_AdvancedMedicalSettings_vehicle", "STR_ACE_Medical_AdvancedMedicalSettings_facility", "STR_ACE_Medical_AdvancedMedicalSettings_vehicleAndFacility"], 0], - true, - { - missionNamespace setVariable ['kat_aceMisc_limitWounds_condition', _this]; - } -] call CBA_Settings_fnc_init; - -nil; diff --git a/addons/acemisc/functions/fn_addIVbag.sqf b/addons/acemisc/functions/fnc_addIVbag.sqf similarity index 86% rename from addons/acemisc/functions/fn_addIVbag.sqf rename to addons/acemisc/functions/fnc_addIVbag.sqf index d5977a4ff..7d2d2276f 100644 --- a/addons/acemisc/functions/fn_addIVbag.sqf +++ b/addons/acemisc/functions/fnc_addIVbag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Adds a IV bag for the medicine IV stands. @@ -10,7 +11,7 @@ * None * * Example: - * [cursorTarget, player] call kat_aceMisc_fnc_addIVbag; + * [cursorTarget, player] call kat_acemisc_fnc_addIVbag; * * Public: No */ @@ -35,14 +36,14 @@ params ["_target", "_player", "_newML"]; _newObjectClass = "Land_IntravenStand_01_1bag_F"; } else { _newObjectClass = "Land_IntravenStand_01_2bags_F"; - _value = _target getVariable ["kat_aceMisc_stand", []]; + _value = _target getVariable [QGVAR(stand), []]; }; // creates new object at [0,0,0] private _newObject = createVehicle [_newObjectClass, [0,0,0], [], 0, "CAN_COLLIDE"]; _value pushBack _newML; - _newObject setVariable ["kat_aceMisc_stand", _value, true]; + _newObject setVariable [QGVAR(stand), _value, true]; // replace the old with the new object private _oldPos = getPos _target; @@ -67,4 +68,4 @@ params ["_target", "_player", "_newML"]; // use item [_player, _player, _classNameItem] call ace_medical_fnc_useItem; - }, {}, localize "STR_kat_aceMisc_Action_add_IV"] call ace_common_fnc_progressBar; + }, {}, localize LSTRING(Action_add_IV)] call ace_common_fnc_progressBar; diff --git a/addons/acemisc/functions/fn_addPassengersActions.sqf b/addons/acemisc/functions/fnc_addPassengersActions.sqf similarity index 98% rename from addons/acemisc/functions/fn_addPassengersActions.sqf rename to addons/acemisc/functions/fnc_addPassengersActions.sqf index 4e1ffbc1e..8f9fcd617 100644 --- a/addons/acemisc/functions/fn_addPassengersActions.sqf +++ b/addons/acemisc/functions/fnc_addPassengersActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain Edit by Katalam * Create one action per passenger. diff --git a/addons/acemisc/functions/fn_attachStretcher.sqf b/addons/acemisc/functions/fnc_attachStretcher.sqf similarity index 90% rename from addons/acemisc/functions/fn_attachStretcher.sqf rename to addons/acemisc/functions/fnc_attachStretcher.sqf index 41e2ecdd8..8b1076ace 100644 --- a/addons/acemisc/functions/fn_attachStretcher.sqf +++ b/addons/acemisc/functions/fnc_attachStretcher.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Children action for attaching stretcher @@ -9,7 +10,7 @@ * None * * Example: - * [cursorTarget] call kat_aceMisc_fnc_attachStretcher; + * [cursorTarget] call kat_acemisc_fnc_attachStretcher; * * Public: No */ @@ -23,7 +24,7 @@ private _actions = []; { private _type = typeOf _x; private _name = getText (configFile >> "CfgVehicles" >> _type >> "displayName"); - private _uniqueName = format ["KAT_%1", _type]; + private _uniqueName = format ["kat_acemisc_%1", _type]; if (isArray (configFile >> "CfgVehicles" >> _type >> "stretcherPos")) then { _actions pushBack [ [ diff --git a/addons/acemisc/functions/fn_bandageRandomWound.sqf b/addons/acemisc/functions/fnc_bandageRandomWound.sqf similarity index 95% rename from addons/acemisc/functions/fn_bandageRandomWound.sqf rename to addons/acemisc/functions/fnc_bandageRandomWound.sqf index 948293766..6f1ed7670 100644 --- a/addons/acemisc/functions/fn_bandageRandomWound.sqf +++ b/addons/acemisc/functions/fnc_bandageRandomWound.sqf @@ -1,5 +1,6 @@ +#include "script_component.hpp" /* - * Author: Schwaggot EDIT: Katalam + * Author: Katalam EDIT: Katalam * Will bandage random wounds for given player * * Arguments: @@ -9,7 +10,7 @@ * None * * Example: - * [cursorTarget] call kat_aceMisc_fnc_bandageRandomWound; + * [cursorTarget] call kat_acemisc_fnc_bandageRandomWound; * * Public: No */ diff --git a/addons/acemisc/functions/fn_conditionIV.sqf b/addons/acemisc/functions/fnc_conditionIV.sqf similarity index 75% rename from addons/acemisc/functions/fn_conditionIV.sqf rename to addons/acemisc/functions/fnc_conditionIV.sqf index dbfc1d086..09c0180a6 100644 --- a/addons/acemisc/functions/fn_conditionIV.sqf +++ b/addons/acemisc/functions/fnc_conditionIV.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Condition check for the medicine IV stands to remove a bag. @@ -10,7 +11,7 @@ * 0: Allowed * * Example: - * [player, 1000] call kat_aceMisc_fnc_conditionIV; + * [player, 1000] call kat_acemisc_fnc_conditionIV; * * Public: No */ @@ -20,11 +21,11 @@ params [ ["_ml", 1000, [0]] ]; -if !(kat_aceMisc_enable) exitWith {false}; +if !(GVAR(enable)) exitWith {false}; private _object = nearestObjects [_player, ['Land_IntravenStand_01_1bag_F', 'Land_IntravenStand_01_2bags_F'], 10, false]; if (isNil "_object") exitWith {false}; -_object = _object select {_ml in (_x getVariable ["kat_aceMisc_stand", []])}; +_object = _object select {_ml in (_x getVariable [QGVAR(stand), []])}; if (isNil "_object") exitWith {false}; _object = _object select 0; if (_object distance _player <= 10) exitWith {true}; diff --git a/addons/acemisc/functions/fn_conditionIVstand.sqf b/addons/acemisc/functions/fnc_conditionIVstand.sqf similarity index 77% rename from addons/acemisc/functions/fn_conditionIVstand.sqf rename to addons/acemisc/functions/fnc_conditionIVstand.sqf index eee153606..cea308f37 100644 --- a/addons/acemisc/functions/fn_conditionIVstand.sqf +++ b/addons/acemisc/functions/fnc_conditionIVstand.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Condition check for the medicine IV stands to add a bag. @@ -9,7 +10,7 @@ * Cann add IV bag * * Example: - * [player] call kat_aceMisc_fnc_conditionIVstand; + * [player] call kat_acemisc_fnc_conditionIVstand; * * Public: No */ @@ -19,7 +20,7 @@ ["_classname", "ACE_salineIV", [""]] ]; -if !(kat_aceMisc_enable) exitWith {false}; +if !(GVAR(enable)) exitWith {false}; if ([_player] call ace_medical_fnc_isMedic && _classname in items _player) exitWith {true}; false; diff --git a/addons/acemisc/functions/fn_getNumOpenWounds.sqf b/addons/acemisc/functions/fnc_getNumOpenWounds.sqf similarity index 95% rename from addons/acemisc/functions/fn_getNumOpenWounds.sqf rename to addons/acemisc/functions/fnc_getNumOpenWounds.sqf index 636698c85..f2369ba54 100644 --- a/addons/acemisc/functions/fn_getNumOpenWounds.sqf +++ b/addons/acemisc/functions/fnc_getNumOpenWounds.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Schwaggot EDIT: Katalam * Will count the open unbandaged wounds for given player. @@ -9,7 +10,7 @@ * 0: Open unbandaged wounds * * Example: - * [cursorTarget] call kat_aceMisc_fnc_getNumOpenWounds; + * [cursorTarget] call kat_acemisc_fnc_getNumOpenWounds; * * Public: No */ diff --git a/addons/acemisc/functions/fn_init.sqf b/addons/acemisc/functions/fnc_init.sqf similarity index 65% rename from addons/acemisc/functions/fn_init.sqf rename to addons/acemisc/functions/fnc_init.sqf index 8b2b4cb9e..0697ae695 100644 --- a/addons/acemisc/functions/fn_init.sqf +++ b/addons/acemisc/functions/fnc_init.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Initializes unit variables. @@ -9,11 +10,9 @@ * None * * Example: - * [player] call kat_aceMisc_fnc_init; + * [player] call kat_acemisc_fnc_init; * * Public: No */ params ["_unit"]; - -//_unit setVariable ["kat_aceMisc_X", "X", true]; diff --git a/addons/acemisc/functions/fn_limitWounds.sqf b/addons/acemisc/functions/fnc_limitWounds.sqf similarity index 64% rename from addons/acemisc/functions/fn_limitWounds.sqf rename to addons/acemisc/functions/fnc_limitWounds.sqf index 1e98b6473..356680a8a 100644 --- a/addons/acemisc/functions/fn_limitWounds.sqf +++ b/addons/acemisc/functions/fnc_limitWounds.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Schwaggot EDIT: Katalam * Will limit the wounds for the given player for realistic treatment. @@ -9,7 +10,7 @@ * None * * Example: - * [cursorTarget] call kat_aceMisc_fnc_limitWounds; + * [cursorTarget] call kat_acemisc_fnc_limitWounds; * * Public: Yes */ @@ -22,11 +23,11 @@ switch (true) do { case (!alive _unit): {}; default { // Get the open wounds for this unit - private _numOpenWounds = [_unit] call kat_aceMisc_fnc_getNumOpenWounds; + private _numOpenWounds = [_unit] call FUNC(getNumOpenWounds); while {_numOpenWounds > 5} do { - [_unit] call kat_aceMisc_fnc_bandageRandomWound; - _numOpenWounds = [_unit] call kat_aceMisc_fnc_getNumOpenWounds; + [_unit] call FUNC(bandageRandomWound); + _numOpenWounds = [_unit] call FUNC(getNumOpenWounds); }; }; }; diff --git a/addons/acemisc/functions/fn_removeIVbag.sqf b/addons/acemisc/functions/fnc_removeIVbag.sqf similarity index 80% rename from addons/acemisc/functions/fn_removeIVbag.sqf rename to addons/acemisc/functions/fnc_removeIVbag.sqf index 417853525..0253cad2b 100644 --- a/addons/acemisc/functions/fn_removeIVbag.sqf +++ b/addons/acemisc/functions/fnc_removeIVbag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Removes a IV bag for the medicine IV stands. @@ -9,7 +10,7 @@ * None * * Example: - * [player, 500] call kat_aceMisc_fnc_removeIVbag; + * [player, 500] call kat_acemisc_fnc_removeIVbag; * * Public: No */ @@ -18,9 +19,9 @@ params ["_player", "_oldML"]; // get some paramaters private _object = nearestObjects [_player, ['Land_IntravenStand_01_1bag_F', 'Land_IntravenStand_01_2bags_F'], 10, false]; -_object = _object select {_oldML in (_x getVariable ["kat_aceMisc_stand", []])}; +_object = _object select {_oldML in (_x getVariable [QGVAR(stand), []])}; _object = _object select 0; -private _value = _object getVariable ["kat_aceMisc_stand", []]; +private _value = _object getVariable [QGVAR(stand), []]; private _className = typeOf _object; private _newObjectClass = ""; if (_className isEqualTo "Land_IntravenStand_01_2bags_F") then { @@ -36,7 +37,7 @@ if (_className isEqualTo "Land_IntravenStand_01_2bags_F") then { // creates new object at [0,0,0] private _newObject = createVehicle [_newObjectClass, [0,0,0], [], 0, "CAN_COLLIDE"]; -_newObject setVariable ["kat_aceMisc_stand", _value, true]; +_newObject setVariable [QGVAR(stand), _value, true]; // replace the old with the new object private _oldPos = getPos _object; diff --git a/addons/acemisc/functions/fn_stretcher.sqf b/addons/acemisc/functions/fnc_stretcher.sqf similarity index 64% rename from addons/acemisc/functions/fn_stretcher.sqf rename to addons/acemisc/functions/fnc_stretcher.sqf index a44586a04..9adfe1bae 100644 --- a/addons/acemisc/functions/fn_stretcher.sqf +++ b/addons/acemisc/functions/fnc_stretcher.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Init function for stretcher @@ -9,7 +10,7 @@ * None * * Example: - * [cursorTarget] call kat_aceMisc_fnc_stretcher; + * [cursorTarget] call kat_acemisc_fnc_stretcher; * * Public: No */ @@ -21,9 +22,9 @@ if !(_object isKindOf "kat_stretcher") exitWith {false}; [_object] call ace_dragging_fnc_initObject; [_object, 0, ["ACE_MainActions"], - ["kat_aceMisc_disassemble", localize "STR_kat_aceMisc_disassemble_stretcher_display", "", { + [QGVAR(disassemble), localize LSTRING(disassemble_stretcher_display), "", { params [["_object", objNull, [objNull]]]; - "kat_stretcher_bag" createVehicle (getPos _object); + "kat_stretcherBag" createVehicle (getPos _object); // TODO create at exact position deleteVehicle _object; }, { params [["_object", objNull, [objNull]]]; @@ -33,8 +34,7 @@ if !(_object isKindOf "kat_stretcher") exitWith {false}; ] call ace_interact_menu_fnc_addActionToObject; [_object, 0, ["ACE_MainActions"], - ["kat_aceMisc_attach", localize "STR_kat_aceMisc_disassemble_attach_display", "", {}, {true}, {[_target] call kat_aceMisc_fnc_attachStretcher}] call ace_interact_menu_fnc_createAction + [QGVAR(attach), localize LSTRING(disassemble_attach_display), "", {}, {true}, {[_target] call FUNC(attachStretcher)}] call ace_interact_menu_fnc_createAction ] call ace_interact_menu_fnc_addActionToObject; - true diff --git a/addons/acemisc/functions/fn_treatmentIV.sqf b/addons/acemisc/functions/fnc_treatmentIV.sqf similarity index 80% rename from addons/acemisc/functions/fn_treatmentIV.sqf rename to addons/acemisc/functions/fnc_treatmentIV.sqf index 92bc11c75..95d768755 100644 --- a/addons/acemisc/functions/fn_treatmentIV.sqf +++ b/addons/acemisc/functions/fnc_treatmentIV.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Katalam * Treatment handle function to remove a bag. @@ -9,7 +10,7 @@ * None * * Example: - * [player, cursorTarget, 'hand_r', 'SalineIV'] call kat_aceMisc_fnc_treatmentIV; + * [player, cursorTarget, 'hand_r', 'SalineIV'] call kat_acemisc_fnc_treatmentIV; * * Public: No */ @@ -29,5 +30,5 @@ switch (_className) do { _value = 250; }; }; -[_player, _value] call kat_aceMisc_fnc_removeIVbag; +[_player, _value] call FUNC(removeIVbag); [_player, _target, _selectionName, _className, _item] call ace_medical_fnc_treatmentIV; diff --git a/addons/acemisc/functions/script_component.hpp b/addons/acemisc/functions/script_component.hpp new file mode 100644 index 000000000..f3d7b542b --- /dev/null +++ b/addons/acemisc/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\x\kat_aceAdvMedical\addons\acemisc\script_component.hpp" diff --git a/addons/acemisc/images/vurtual_stretcher.p3d b/addons/acemisc/images/vurtual_stretcher.p3d deleted file mode 100644 index 256545915..000000000 Binary files a/addons/acemisc/images/vurtual_stretcher.p3d and /dev/null differ diff --git a/addons/acemisc/images/Model.cfg b/addons/acemisc/models/stretcher/Model.cfg similarity index 100% rename from addons/acemisc/images/Model.cfg rename to addons/acemisc/models/stretcher/Model.cfg diff --git a/addons/acemisc/images/env_land_co.paa b/addons/acemisc/models/stretcher/env_land_co.paa similarity index 100% rename from addons/acemisc/images/env_land_co.paa rename to addons/acemisc/models/stretcher/env_land_co.paa diff --git a/addons/acemisc/images/seat.rvmat b/addons/acemisc/models/stretcher/seat.rvmat similarity index 78% rename from addons/acemisc/images/seat.rvmat rename to addons/acemisc/models/stretcher/seat.rvmat index 7ad269e7b..e8009139e 100644 --- a/addons/acemisc/images/seat.rvmat +++ b/addons/acemisc/models/stretcher/seat.rvmat @@ -8,7 +8,7 @@ PixelShaderID = "NormalMapSpecularMap"; VertexShaderID = "NormalMap"; class Stage1 { - texture = "kat_aceMisc\images\seat_nohq.paa"; + texture = "x\kat_aceAdvMedical\addons\acemisc\models\stretcher\seat_nohq.paa"; uvSource = "tex"; class uvTransform { @@ -20,7 +20,7 @@ class Stage1 { }; class Stage2 { - texture = "kat_aceMisc\images\seat_smdi.paa"; + texture = "x\kat_aceAdvMedical\addons\acemisc\models\stretcher\seat_smdi.paa"; uvSource = "tex"; class uvTransform { diff --git a/addons/acemisc/images/seat_destruct.rvmat b/addons/acemisc/models/stretcher/seat_destruct.rvmat similarity index 79% rename from addons/acemisc/images/seat_destruct.rvmat rename to addons/acemisc/models/stretcher/seat_destruct.rvmat index c904213c6..a5adb8b8e 100644 --- a/addons/acemisc/images/seat_destruct.rvmat +++ b/addons/acemisc/models/stretcher/seat_destruct.rvmat @@ -8,7 +8,7 @@ PixelShaderID = "NormalMapMacroASSpecularDIMap"; VertexShaderID = "NormalMapAS"; class Stage1 { - texture = "kat_acemisc\images\seat_nohq.paa"; + texture = "x\kat_aceAdvMedical\addons\acemisc\models\stretcher\seat_nohq.paa"; uvSource = "tex"; class uvTransform { @@ -20,7 +20,7 @@ class Stage1 { }; class Stage2 { - texture = "kat_acemisc\images\seat_destruct_mc.paa"; + texture = "x\kat_aceAdvMedical\addons\acemisc\models\stretcher\seat_destruct_mc.paa"; uvSource = "tex"; class uvTransform { @@ -44,7 +44,7 @@ class Stage3 { }; class Stage4 { - texture = "kat_acemisc\images\seat_destruct_smdi.paa"; + texture = "x\kat_aceAdvMedical\addons\acemisc\models\stretcher\seat_destruct_smdi.paa"; uvSource = "tex"; class uvTransform { diff --git a/addons/acemisc/images/seat_destruct_mc.paa b/addons/acemisc/models/stretcher/seat_destruct_mc.paa similarity index 100% rename from addons/acemisc/images/seat_destruct_mc.paa rename to addons/acemisc/models/stretcher/seat_destruct_mc.paa diff --git a/addons/acemisc/images/seat_destruct_smdi.paa b/addons/acemisc/models/stretcher/seat_destruct_smdi.paa similarity index 100% rename from addons/acemisc/images/seat_destruct_smdi.paa rename to addons/acemisc/models/stretcher/seat_destruct_smdi.paa diff --git a/addons/acemisc/images/seat_nohq.paa b/addons/acemisc/models/stretcher/seat_nohq.paa similarity index 100% rename from addons/acemisc/images/seat_nohq.paa rename to addons/acemisc/models/stretcher/seat_nohq.paa diff --git a/addons/acemisc/images/seat_smdi.paa b/addons/acemisc/models/stretcher/seat_smdi.paa similarity index 100% rename from addons/acemisc/images/seat_smdi.paa rename to addons/acemisc/models/stretcher/seat_smdi.paa diff --git a/addons/acemisc/images/stretcher.rvmat b/addons/acemisc/models/stretcher/stretcher.rvmat similarity index 93% rename from addons/acemisc/images/stretcher.rvmat rename to addons/acemisc/models/stretcher/stretcher.rvmat index 91c597b6d..32ac1c24a 100644 --- a/addons/acemisc/images/stretcher.rvmat +++ b/addons/acemisc/models/stretcher/stretcher.rvmat @@ -8,7 +8,7 @@ PixelShaderID="Super"; VertexShaderID="Super"; class Stage1 { - texture="kat_acemisc\images\stretcher_nohq.tga"; + texture="x\kat_aceAdvMedical\addons\acemisc\models\stretcher\stretcher_nohq.tga"; uvSource="tex"; class uvTransform { @@ -80,7 +80,7 @@ class Stage6 }; class Stage7 { - texture="kat_acemisc\images\env_land_co.tga"; + texture="x\kat_aceAdvMedical\addons\acemisc\models\stretcher\env_land_co.tga"; uvSource="tex"; class uvTransform { diff --git a/addons/acemisc/images/stretcher_co.paa b/addons/acemisc/models/stretcher/stretcher_co.paa similarity index 100% rename from addons/acemisc/images/stretcher_co.paa rename to addons/acemisc/models/stretcher/stretcher_co.paa diff --git a/addons/acemisc/images/stretcher_nohq.paa b/addons/acemisc/models/stretcher/stretcher_nohq.paa similarity index 100% rename from addons/acemisc/images/stretcher_nohq.paa rename to addons/acemisc/models/stretcher/stretcher_nohq.paa diff --git a/addons/acemisc/models/stretcher/vurtual_stretcher.p3d b/addons/acemisc/models/stretcher/vurtual_stretcher.p3d new file mode 100644 index 000000000..fa0bf7e9f Binary files /dev/null and b/addons/acemisc/models/stretcher/vurtual_stretcher.p3d differ diff --git a/addons/acemisc/script_component.hpp b/addons/acemisc/script_component.hpp new file mode 100644 index 000000000..eef63bd87 --- /dev/null +++ b/addons/acemisc/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT acemisc +#define COMPONENT_BEAUTIFIED KAT - MISC +#include "\x\kat_aceAdvMedical\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MISC + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MISC + #define DEBUG_SETTINGS DEBUG_SETTINGS_MISC +#endif + +#include "\x\kat_aceAdvMedical\addons\main\script_macros.hpp" diff --git a/addons/acemisc/stringtable.xml b/addons/acemisc/stringtable.xml index aa4384e07..6a85008d3 100644 --- a/addons/acemisc/stringtable.xml +++ b/addons/acemisc/stringtable.xml @@ -1,78 +1,73 @@ - - + + ACE-Misc activated? ACE-Sonstiges aktivieren? ACE-Inne aktywowane? ¿Activar ACE-Misceláneos? - + Attaching IV IV wird angehangen Zakładanie IV Administrando IV - + Attach IV (1000ml) IV anhängen (1000ml) Załóż IV (1000ml) Adminsitrar IV (1000ml) - + Attach IV (500ml) IV anhängen (500ml) Załóż IV (500ml) Adminsitrar IV (500ml) - + Attach IV (250ml) IV anhängen (250ml) Załóż IV (250ml) Adminsitrar IV (250ml) - + Stand: Saline IV (1000ml) Ständer: Saline IV (1000ml) Stojak: Sól fizjologiczna IV (1000ml) Soporte: Salino IV (1000ml) - + Stand: Saline IV (500ml) Ständer: Saline IV (500ml) Stojak: Sól fizjologiczna IV (500ml) Soporte: Salino IV (500ml) - + Stand: Saline IV (250ml) Ständer: Saline IV (250ml) Stojak: Sól fizjologiczna IV (250ml) Soporte: Salino IV (250ml) - + Enable limited wounds Aktiviere limitierte Wunden - Activar heridas limitadas - + Bandage wounds Behandle Wunden - Activar vendaje de heridas - + Use condition limit wounds Bendingung für limitierte Wunden - Usar condición de límite de heridas - + Disassemble stretcher Trage einklappen - Desarmar camilla - + Attach to Anhängen an - Unir camilla a