From abb400562683dc5e421cf3a8d7c7230255a3e6cf Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:30:07 +0200 Subject: [PATCH] Add interaction anims to WS --- addons/compat_ws/CfgVehicles.hpp | 45 +++++++++++++++++++ .../compat_ws_repair/CfgVehicles.hpp | 34 ++++++++++++++ addons/compat_ws/compat_ws_repair/config.cpp | 20 +++++++++ .../compat_ws_repair/script_component.hpp | 3 ++ addons/compat_ws/config.cpp | 3 +- 5 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 addons/compat_ws/CfgVehicles.hpp create mode 100644 addons/compat_ws/compat_ws_repair/CfgVehicles.hpp create mode 100644 addons/compat_ws/compat_ws_repair/config.cpp create mode 100644 addons/compat_ws/compat_ws_repair/script_component.hpp diff --git a/addons/compat_ws/CfgVehicles.hpp b/addons/compat_ws/CfgVehicles.hpp new file mode 100644 index 00000000000..9c2f3184c07 --- /dev/null +++ b/addons/compat_ws/CfgVehicles.hpp @@ -0,0 +1,45 @@ +class CfgVehicles { + // Vehicle animation interactions + class Offroad_01_base_lxWS; + class Offroad_01_armor_base_lxWS: Offroad_01_base_lxWS { + class EGVAR(interaction,anims) { + class HideBackpacks { + positions[] = {{-1.15, -1.15, -0.7}, {1.1, -1.15, -0.7}, {1.1, -2.5, -0.7}}; + items[] = {"B_TacticalPack_blk", "B_TacticalPack_blk", "B_Carryall_khk", "B_Carryall_khk"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + + class I_G_Offroad_01_AT_F; + class Offroad_01_AT_lxWS: I_G_Offroad_01_AT_F { + class EGVAR(interaction,anims) { + class HideBackpacks { + positions[] = {{-1.15, -1.25, -0.2}, {1.1, -1.25, -0.2}, {1.1, -2.6, -0.2}}; + items[] = {"B_TacticalPack_blk", "B_TacticalPack_blk", "B_Carryall_khk", "B_Carryall_khk"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + class Offroad_01_armor_AT_lxWS: Offroad_01_AT_lxWS { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class HideBackpacks: HideBackpacks { + positions[] = {{-1.15, -1.25, -0.7}, {1.1, -1.25, -0.7}, {1.1, -2.6, -0.7}}; + }; + }; + }; + + class I_G_Offroad_01_armed_F; + class Offroad_01_armed_lxWS: I_G_Offroad_01_armed_F { + class EGVAR(interaction,anims) { + class HideBackpacks { + positions[] = {{-1.15, -1.03, -0.8}, {1.1, -1.03, -0.8}, {1.1, -2.38, -0.8}}; + items[] = {"B_TacticalPack_blk", "B_TacticalPack_blk", "B_Carryall_khk", "B_Carryall_khk"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; +}; diff --git a/addons/compat_ws/compat_ws_repair/CfgVehicles.hpp b/addons/compat_ws/compat_ws_repair/CfgVehicles.hpp new file mode 100644 index 00000000000..d7fcbc7cd97 --- /dev/null +++ b/addons/compat_ws/compat_ws_repair/CfgVehicles.hpp @@ -0,0 +1,34 @@ +class CfgVehicles { + // Vehicle animation interactions + class Truck_02_base_F; + class Truck_02_aa_base_lxWS: Truck_02_base_F { + class EGVAR(interaction,anims) { + class hideSpareWheel { + positions[] = {{1, 1.93, -0.85}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + class Truck_02_cargo_base_lxWS: Truck_02_base_F { + class EGVAR(interaction,anims) { + class hideSpareWheel { + positions[] = {{1, 1.93, -0.35}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + class Truck_02_box_base_lxWS: Truck_02_base_F { + class EGVAR(interaction,anims) { + class hideSpareWheel { + positions[] = {{1, 1.7, -0.35}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; +}; diff --git a/addons/compat_ws/compat_ws_repair/config.cpp b/addons/compat_ws/compat_ws_repair/config.cpp new file mode 100644 index 00000000000..4f37c831cb6 --- /dev/null +++ b/addons/compat_ws/compat_ws_repair/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"data_f_lxWS_Loadorder", "ace_repair"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_ws/compat_ws_repair/script_component.hpp b/addons/compat_ws/compat_ws_repair/script_component.hpp new file mode 100644 index 00000000000..1af928486c3 --- /dev/null +++ b/addons/compat_ws/compat_ws_repair/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT repair +#define SUBCOMPONENT_BEAUTIFIED Repair +#include "..\script_component.hpp" diff --git a/addons/compat_ws/config.cpp b/addons/compat_ws/config.cpp index 32a3f6f73cb..54a6df99eec 100644 --- a/addons/compat_ws/config.cpp +++ b/addons/compat_ws/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"data_f_lxWS_Loadorder"}; + requiredAddons[] = {"data_f_lxWS_Loadorder", "ace_common"}; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Mike"}; @@ -15,4 +15,5 @@ class CfgPatches { }; }; +#include "CfgVehicles.hpp" #include "CfgWeapons.hpp"