From a307a5c93bdc94a357b7b35a686aa02310b973d1 Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 17 Dec 2024 00:17:07 +0100 Subject: [PATCH] rhs usf compat --- .hemtt/launch.toml | 6 +++ addons/compat_rhs_usf3/$PBOPREFIX$ | 1 + addons/compat_rhs_usf3/CfgVehicles.hpp | 46 +++++++++++++++++++ .../compat_rhs_usf3}/config.cpp | 12 ++--- addons/compat_rhs_usf3/script_component.hpp | 5 ++ .../functions/fnc_attachStretcher.sqf | 8 ++-- addons/stretcher/vehicle_stretcher.hpp | 24 +++++----- optionals/usaf/$PBOPREFIX$ | 1 - optionals/usaf/CfgVehicles.hpp | 42 ----------------- optionals/usaf/script_component.hpp | 17 ------- 10 files changed, 79 insertions(+), 83 deletions(-) create mode 100644 addons/compat_rhs_usf3/$PBOPREFIX$ create mode 100644 addons/compat_rhs_usf3/CfgVehicles.hpp rename {optionals/usaf => addons/compat_rhs_usf3}/config.cpp (66%) create mode 100644 addons/compat_rhs_usf3/script_component.hpp delete mode 100644 optionals/usaf/$PBOPREFIX$ delete mode 100644 optionals/usaf/CfgVehicles.hpp delete mode 100644 optionals/usaf/script_component.hpp diff --git a/.hemtt/launch.toml b/.hemtt/launch.toml index 6e2348da9..599ddc3f4 100644 --- a/.hemtt/launch.toml +++ b/.hemtt/launch.toml @@ -4,3 +4,9 @@ workshop = [ "463939057", # ACE3's Workshop ID "2369477168" # Advanced Developer Tools's Workshop ID ] + +[rhs] +extends = "default" +workshop = [ + "843577117", # RHS USAF Workshop ID +] diff --git a/addons/compat_rhs_usf3/$PBOPREFIX$ b/addons/compat_rhs_usf3/$PBOPREFIX$ new file mode 100644 index 000000000..e40cfec20 --- /dev/null +++ b/addons/compat_rhs_usf3/$PBOPREFIX$ @@ -0,0 +1 @@ +x\kat\addons\compat_rhs_usf3 diff --git a/addons/compat_rhs_usf3/CfgVehicles.hpp b/addons/compat_rhs_usf3/CfgVehicles.hpp new file mode 100644 index 000000000..d26f53925 --- /dev/null +++ b/addons/compat_rhs_usf3/CfgVehicles.hpp @@ -0,0 +1,46 @@ +class CfgVehicles { + class Truck_01_base_F; + class rhsusf_fmtv_base: Truck_01_base_F {}; + class rhsusf_M1078A1P2_fmtv_usarmy: rhsusf_fmtv_base {}; + class rhsusf_M1078A1P2_D_fmtv_usarmy: rhsusf_M1078A1P2_fmtv_usarmy { + kat_stretcherPos[] = {0,-1,-0.4}; + kat_stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; + }; + class rhsusf_M1083A1P2_fmtv_usarmy: rhsusf_M1078A1P2_fmtv_usarmy {}; + class rhsusf_M1083A1P2_B_fmtv_usarmy: rhsusf_M1083A1P2_fmtv_usarmy {}; + class rhsusf_M1085A1P2_B_Medical_fmtv_usarmy: rhsusf_M1083A1P2_B_fmtv_usarmy { + kat_stretcherPos[] = {-0.9,3,0.67}; + kat_stretcherVector[] = {{0,0,0},{0,0,0}}; + }; + + class Heli_Transport_01_base_F; + class RHS_UH60_Base: Heli_Transport_01_base_F { + kat_stretcherPos[] = {0,1.25,-1.86}; + kat_stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; + }; + + class Heli_Transport_02_base_F; + class RHS_CH_47F_base: Heli_Transport_02_base_F { + kat_stretcherPos[] = {0,-0.43,-2.63}; + kat_stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; + }; + + class MRAP_01_base_F; + class rhsusf_hmmwe_base: MRAP_01_base_F { + kat_stretcherPos[] = {0,-0.5,-0.85}; + kat_stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; + }; + + class APC_Tracked_03_base_F; + class RHS_M2A2_Base: APC_Tracked_03_base_F { + kat_stretcherPos[] = {-1.19,-0.6,-0.45}; + kat_stretcherVector[] = {{0,0,0},{0,0,0}}; + }; + + class Tank_F; + class APC_Tracked_02_base_F: Tank_F {}; + class rhsusf_m113tank_base: APC_Tracked_02_base_F { + kat_stretcherPos[] = {0,-0.5,-2.05}; + kat_stretcherVector[] = {{0,0,0},{0,0,0}}; + }; +}; diff --git a/optionals/usaf/config.cpp b/addons/compat_rhs_usf3/config.cpp similarity index 66% rename from optionals/usaf/config.cpp rename to addons/compat_rhs_usf3/config.cpp index c09f257f7..98edf92af 100644 --- a/optionals/usaf/config.cpp +++ b/addons/compat_rhs_usf3/config.cpp @@ -3,19 +3,17 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - requiredVersion = REQUIRED_VERSION; units[] = {}; weapons[] = {}; - magazines[] = {}; - requiredAddons[] = { - "kat_misc", - "rhsusf_main" - }; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"kat_main", "rhsusf_main_loadorder"}; + skipWhenMissingDependencies = 1; author = "Katalam"; - authors[] = {"Katalam"}; + authors[] = {"MiszczuZPolski", "Katalam"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgVehicles.hpp" + diff --git a/addons/compat_rhs_usf3/script_component.hpp b/addons/compat_rhs_usf3/script_component.hpp new file mode 100644 index 000000000..14741af1f --- /dev/null +++ b/addons/compat_rhs_usf3/script_component.hpp @@ -0,0 +1,5 @@ +#define COMPONENT compat_rhs_usf3 +#define COMPONENT_BEAUTIFIED RHS USAF Compatibility + +#include "\x\kat\addons\main\script_mod.hpp" +#include "\x\kat\addons\main\script_macros.hpp" diff --git a/addons/stretcher/functions/fnc_attachStretcher.sqf b/addons/stretcher/functions/fnc_attachStretcher.sqf index 3924e372a..3fa8bb147 100644 --- a/addons/stretcher/functions/fnc_attachStretcher.sqf +++ b/addons/stretcher/functions/fnc_attachStretcher.sqf @@ -18,14 +18,14 @@ params [["_target", objNull, [objNull]]]; if !(isNull attachedTo _target) exitWith {}; -private _vehicles = nearestObjects [_target, ["Car", "Helicopter"], 20]; +private _vehicles = nearestObjects [_target, ["Car", "Helicopter", "Tank"], 20]; private _actions = []; { private _type = typeOf _x; private _name = getText (configFile >> "CfgVehicles" >> _type >> "displayName"); private _uniqueName = format ["kat_stretcher_%1", _type]; - if (isArray (configFile >> "CfgVehicles" >> _type >> "stretcherPos")) then { + if (isArray (configFile >> "CfgVehicles" >> _type >> "kat_stretcherPos")) then { _actions pushBack [ [ _uniqueName, @@ -33,8 +33,8 @@ private _actions = []; "", { params ["_target", "", "_parameter"]; - private _pos = getArray (configFile >> "CfgVehicles" >> typeOf (_parameter select 0) >> "stretcherPos"); - private _vector = getArray (configFile >> "CfgVehicles" >> typeOf (_parameter select 0) >> "stretcherVector"); + private _pos = getArray (configFile >> "CfgVehicles" >> typeOf (_parameter select 0) >> "kat_stretcherPos"); + private _vector = getArray (configFile >> "CfgVehicles" >> typeOf (_parameter select 0) >> "kat_stretcherVector"); _target attachTo [(_parameter select 0), _pos]; _target setVectorDirAndUp _vector; }, diff --git a/addons/stretcher/vehicle_stretcher.hpp b/addons/stretcher/vehicle_stretcher.hpp index 2434507ad..d99242cab 100644 --- a/addons/stretcher/vehicle_stretcher.hpp +++ b/addons/stretcher/vehicle_stretcher.hpp @@ -1,33 +1,33 @@ class LSV_01_unarmed_base_F; class B_LSV_01_unarmed_F: LSV_01_unarmed_base_F { - stretcherPos[] = {0.08,-1.5,-0.69}; - stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; + kat_stretcherPos[] = {0.08,-1.5,-0.69}; + kat_stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; }; class Heli_Transport_01_base_F; class B_Heli_Transport_01_F: Heli_Transport_01_base_F { - stretcherPos[] = {0,1.6,-1.55}; - stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; + kat_stretcherPos[] = {0,1.6,-1.55}; + kat_stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; }; class B_Truck_01_transport_F; class B_Truck_01_medical_F: B_Truck_01_transport_F { - stretcherPos[] = {-0.15,-4.7,0}; - stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; + kat_stretcherPos[] = {-0.15,-4.7,0}; + kat_stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; }; class B_APC_Wheeled_01_base_F; class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { - stretcherPos[] = {0.85,1.7,-0.41}; - stretcherVector[] = {{0,0.78,-0.22},{0,0.22,0.78}}; + kat_stretcherPos[] = {0.85,1.7,-0.41}; + kat_stretcherVector[] = {{0,0.78,-0.22},{0,0.22,0.78}}; }; class Heli_Transport_03_base_F; class B_Heli_Transport_03_F: Heli_Transport_03_base_F { - stretcherPos[] = {0,-0.4,-2.08}; - stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; + kat_stretcherPos[] = {0,-0.4,-2.08}; + kat_stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; }; class LandVehicle; class Car: LandVehicle {}; class Car_F: Car {}; class Quadbike_01_base_F: Car_F { - stretcherPos[] = {0,0.8,-0.56}; - stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; + kat_stretcherPos[] = {0,0.8,-0.56}; + kat_stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; }; diff --git a/optionals/usaf/$PBOPREFIX$ b/optionals/usaf/$PBOPREFIX$ deleted file mode 100644 index 150d9eacb..000000000 --- a/optionals/usaf/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -x\kat\addons\usaf diff --git a/optionals/usaf/CfgVehicles.hpp b/optionals/usaf/CfgVehicles.hpp deleted file mode 100644 index e71cbe56d..000000000 --- a/optionals/usaf/CfgVehicles.hpp +++ /dev/null @@ -1,42 +0,0 @@ -class CfgVehicles { - class rhsusf_M1078A1P2_fmtv_usarmy; - class rhsusf_M1078A1P2_D_fmtv_usarmy: rhsusf_M1078A1P2_fmtv_usarmy { - stretcherPos[] = {0,-1,-0.4}; - stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; - }; - class Heli_Transport_01_base_F; - class RHS_UH60_Base: Heli_Transport_01_base_F { - stretcherPos[] = {0,1.25,-1.86}; - stretcherVector[] = {{1, 0, 0}, {0, 0, 1}}; - }; - class Heli_Transport_02_base_F; - class RHS_CH_47F_base: Heli_Transport_02_base_F { - stretcherPos[] = {0,-0.43,-2.63}; - stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; - }; - class MRAP_01_base_F; - class rhsusf_hmmwe_base: MRAP_01_base_F { - stretcherPos[] = {0,-0.5,-0.85}; - stretcherVector[] = {{0, 0, 0}, {0, 0, 0}}; - }; - class Truck_01_base_F; - class rhsusf_M1220_usarmy_d: Truck_01_base_F { - stretcherPos[] = {-0.05,-2.1,-1.5}; - stretcherVector[] = {{0,0,0},{0,0,0}}; - }; - class APC_Tracked_03_base_F; - class RHS_M2A2_Base: APC_Tracked_03_base_F { - stretcherPos[] = {-1.19,-0.6,-0.45}; - stretcherVector[] = {{0,0,0},{0,0,0}}; - }; - class APC_Tracked_02_base_F; - class rhsusf_m113tank_base: APC_Tracked_02_base_F { - stretcherPos[] = {0,-0.5,-2.05}; - stretcherVector[] = {{0,0,0},{0,0,0}}; - }; - class rhsusf_M1083A1P2_B_fmtv_usarmy; - class rhsusf_M1085A1P2_B_Medical_fmtv_usarmy: rhsusf_M1083A1P2_B_fmtv_usarmy { - stretcherPos[] = {-0.9,3,0.67}; - stretcherVector[] = {{0,0,0},{0,0,0}}; - }; -}; diff --git a/optionals/usaf/script_component.hpp b/optionals/usaf/script_component.hpp deleted file mode 100644 index 21bd5dce7..000000000 --- a/optionals/usaf/script_component.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#define COMPONENT usaf -#define COMPONENT_BEAUTIFIED KAT USAF -#include "\x\kat\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_USAF - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_USAF - #define DEBUG_SETTINGS DEBUG_SETTINGS_USAF -#endif - -#include "\x\kat\addons\main\script_macros.hpp"