Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat RHS USF - Add compatibility for stretcher #663

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .hemtt/launch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
1 change: 1 addition & 0 deletions addons/compat_rhs_usf3/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x\kat\addons\compat_rhs_usf3
46 changes: 46 additions & 0 deletions addons/compat_rhs_usf3/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -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}};
};
};
12 changes: 5 additions & 7 deletions optionals/usaf/config.cpp → addons/compat_rhs_usf3/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

5 changes: 5 additions & 0 deletions addons/compat_rhs_usf3/script_component.hpp
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 4 additions & 4 deletions addons/stretcher/functions/fnc_attachStretcher.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@
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,
_name,
"",
{
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;
},
Expand Down
24 changes: 12 additions & 12 deletions addons/stretcher/vehicle_stretcher.hpp
Original file line number Diff line number Diff line change
@@ -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}};
};
1 change: 0 additions & 1 deletion optionals/usaf/$PBOPREFIX$

This file was deleted.

42 changes: 0 additions & 42 deletions optionals/usaf/CfgVehicles.hpp

This file was deleted.

17 changes: 0 additions & 17 deletions optionals/usaf/script_component.hpp

This file was deleted.

Loading