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

Interaction - Add actions based on animations #6144

Merged
merged 34 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c9cdf70
Add actions based on animations
Dystopian Feb 10, 2018
019417a
Add setting
Dystopian Feb 12, 2018
eecc496
Add ability to set items for users
Dystopian Feb 12, 2018
0803c32
Merge remote-tracking branch 'upstream/master' into anim_actions
Dystopian Apr 21, 2018
1e336e0
Add actions for 1.82 changes
Dystopian Apr 22, 2018
982705c
Merge remote-tracking branch 'upstream/master' into anim_actions
Dystopian Aug 14, 2018
a9067c5
Add RHS 0.4.6 ZIL spare
Dystopian Aug 14, 2018
0fa0f1f
Merge remote-tracking branch 'upstream/master' into anim_actions
Dystopian Sep 19, 2018
70d7c9e
Update to new standards
Dystopian Sep 19, 2018
5c2ced1
Handle RHS BTR retread system
Dystopian Sep 19, 2018
30dfa0e
Make init faster: move condition to configClasses
Dystopian Sep 23, 2018
bc7a2e4
Fix CUP fake anims
Dystopian Sep 23, 2018
2711901
Merge remote-tracking branch 'upstream/master' into anim_actions
Dystopian Dec 9, 2018
36c6846
Merge branch 'my2' into anim_actions
Dystopian Mar 17, 2019
b9c73ab
Merge remote-tracking branch 'upstream/master' into anim_actions
Dystopian Apr 22, 2021
d0f3aa5
Refactor
Dystopian Apr 23, 2021
724d127
Rework
Dystopian Apr 25, 2021
233e4c4
Rename init function
Dystopian Apr 25, 2021
34fd0d8
Decrease number of classes to init
Dystopian Apr 25, 2021
d7922b8
Merge branch 'master' into anim_actions
Dystopian Jul 25, 2021
69fb345
Fix merge mistake
Dystopian Jul 25, 2021
7f929bb
Apply suggestions from code review
jonpas Oct 12, 2021
25adfec
Merge branch 'master' into anim_actions
jonpas Oct 12, 2021
be26111
Merge branch 'master' into pr/6144
johnb432 Jul 20, 2024
f291fe1
Updated code for current mod structure
johnb432 Jul 20, 2024
6d80dcc
Multiple fixes & tweaks
johnb432 Jul 20, 2024
b50119f
Merge branch 'master' into pr/6144
johnb432 Jul 20, 2024
b160189
Update CfgVehicles.hpp
johnb432 Jul 22, 2024
2b0faa7
cache config lookup at preStart
PabstMirror Aug 9, 2024
76937f9
Merge branch 'master' into pr/6144
johnb432 Aug 9, 2024
dd7df53
Fix error
johnb432 Aug 9, 2024
dccb240
Add text config entry for progress bar title
johnb432 Aug 9, 2024
e36682a
Restructure interactions, improved some locations & added interaction…
johnb432 Aug 9, 2024
1d0aa16
Reverted preInit change
johnb432 Aug 9, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
johnb432 marked this conversation as resolved.
Show resolved Hide resolved
johnb432 marked this conversation as resolved.
Show resolved Hide resolved
};
};
123 changes: 123 additions & 0 deletions addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
class CfgVehicles {
class Wheeled_APC_F;
class rhs_btr_base: Wheeled_APC_F {
class EGVAR(interaction,anims) {
class wheel_1_unhide {
positions[] = {{-0.8, -1.7, 0}};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
class wheel_2_unhide {
positions[] = {{0.35, -2.9, -0.1}};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};
class rhs_btr70_vmf: rhs_btr_base {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class wheel_1_unhide: wheel_1_unhide {
positions[] = {{-1.2, -2.6, 0.2}};
};
class wheel_2_unhide: wheel_2_unhide {
positions[] = {{-0.3, -3.8, 0}};
};
};
};

class rhs_btr70_msv: rhs_btr70_vmf {};
class rhs_btr80_msv: rhs_btr70_msv {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class wheel_1_unhide: wheel_1_unhide {
positions[] = {{-1, -2.5, 0.6}};
};
class wheel_2_unhide: wheel_2_unhide {
enabled = 0;
};
};
};

class Truck_F;
class rhs_truck: Truck_F {
class EGVAR(interaction,anims) {
class spare_hide {
selections[] = {"spare"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class RHS_Ural_BaseTurret: Truck_F {
class EGVAR(interaction,anims) {
class spare_hide {
selections[] = {"spare"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class rhs_zil131_base: Truck_F {
class EGVAR(interaction,anims) {
class spare_hide {
selections[] = {"spare"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class rhs_kraz255_base;
class rhs_kraz255b1_base: rhs_kraz255_base {
class EGVAR(interaction,anims) {
class spare_hide {
selections[] = {"spare"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class O_Truck_02_covered_F;
class rhs_kamaz5350: O_Truck_02_covered_F {
class EGVAR(interaction,anims) {
class spare_hide {
selections[] = {"spare"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class MRAP_02_base_F;
class rhs_tigr_base: MRAP_02_base_F {
class EGVAR(interaction,anims) {
class spare_hide {
selections[] = {"spare"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class Offroad_01_base_f;
class RHS_UAZ_Base: Offroad_01_base_f {
class EGVAR(interaction,anims) {
class spare_hide {
selections[] = {"spare"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};
};
11 changes: 11 additions & 0 deletions addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "script_component.hpp"

ADDON = false;

// Disable RHS' wheel replacement mechanic
RHS_Retread_Enabled = false;
rhs_btr70_EnableRetread = false;
rhs_TypeTirePressure = 1;
RHS_BTR_Effects_Init = true;

ADDON = true;
22 changes: 22 additions & 0 deletions addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "script_component.hpp"

class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"rhs_main_loadorder",
"ace_repair"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Dystopian", "johnb43"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define SUBCOMPONENT repair
#define SUBCOMPONENT_BEAUTIFIED Repair
#include "..\script_component.hpp"
6 changes: 2 additions & 4 deletions addons/compat_rhs_usf3/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class CfgVehicles {
EGVAR(refuel,fuelCapacity) = 302;
};

class Truck_F;
class Truck_01_base_F: Truck_F {};
class Truck_01_base_F;
class rhsusf_fmtv_base: Truck_01_base_F {
EGVAR(refuel,fuelCapacity) = 219;
};
Expand All @@ -55,8 +54,7 @@ class CfgVehicles {
EGVAR(refuel,fuelCargo) = 900; // 45 jerrycans
};

class rhsusf_HEMTT_A4_base: Truck_01_base_F {};
class rhsusf_M977A4_usarmy_wd: rhsusf_HEMTT_A4_base {};
class rhsusf_M977A4_usarmy_wd;
class rhsusf_M977A4_AMMO_usarmy_wd: rhsusf_M977A4_usarmy_wd {
EGVAR(rearm,defaultSupply) = 1200;
};
Expand Down
52 changes: 52 additions & 0 deletions addons/compat_rhs_usf3/compat_rhs_usf3_refuel/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
class CfgVehicles {
class rhsusf_stryker_base;
class rhsusf_stryker_m1126_base: rhsusf_stryker_base {
class EGVAR(interaction,anims) {
class Hide_FCans {
positions[] = {{-0.7, -3, -0.4}};
items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F"};
name = ECSTRING(refuel,TakeFuelCanister);
text = ECSTRING(refuel,TakeFuelCanisterAction);
};
};
};
class rhsusf_stryker_m1127_base: rhsusf_stryker_m1126_base {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class Hide_FCans: Hide_FCans {
positions[] = {{-0.5, -3, -0.4}};
};
};
};

class rhsusf_stryker_m1126_m2_base: rhsusf_stryker_m1126_base {};
class rhsusf_stryker_m1132_m2_base: rhsusf_stryker_m1126_m2_base {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class Hide_FCans: Hide_FCans {
positions[] = {{-1, -4, -0.4}};
};
};
};
class rhsusf_stryker_m1134_base: rhsusf_stryker_m1132_m2_base {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class Hide_FCans: Hide_FCans {
positions[] = {{-0.7, -3, -0.7}};
};
};
};

class rhsusf_m1a2tank_base;
class rhsusf_m1a2sep2_base: rhsusf_m1a2tank_base {
class EGVAR(interaction,anims) {
class fuelcans_hide {
// Rotate interactions with turret rotation
positions[] = {
"[0.23, -0.6, 0] vectorAdd ([[1.1, -3.6, 0.6], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)",
"[0.23, -0.6, 0] vectorAdd ([[-1.1, -3.6, 0.6], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)"
};
items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F"};
name = ECSTRING(refuel,TakeFuelCanister);
text = ECSTRING(refuel,TakeFuelCanisterAction);
};
};
};
};
1 change: 1 addition & 0 deletions addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ class CfgPatches {
};

#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
126 changes: 126 additions & 0 deletions addons/compat_rhs_usf3/compat_rhs_usf3_repair/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
class CfgVehicles {
class Truck_01_base_F;
class rhsusf_fmtv_base: Truck_01_base_F {
class EGVAR(interaction,anims) {
class hide_spare {
positions[] = {{1, 1.4, 0}};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};
class rhsusf_M1078A1P2_fmtv_usarmy: rhsusf_fmtv_base {};
class rhsusf_M1078A1P2_B_fmtv_usarmy: rhsusf_M1078A1P2_fmtv_usarmy {};
class rhsusf_M1078A1P2_B_M2_fmtv_usarmy: rhsusf_M1078A1P2_B_fmtv_usarmy {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class hide_spare: hide_spare {
positions[] = {{1, 1.4, -0.5}};
};
};
};
class rhsusf_M1078A1R_SOV_M2_D_fmtv_socom: rhsusf_M1078A1P2_B_M2_fmtv_usarmy {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class hide_spare: hide_spare {
positions[] = {{1, 1, -0.5}};
};
};
};
class rhsusf_M1083A1P2_fmtv_usarmy: rhsusf_M1078A1P2_fmtv_usarmy {};
class rhsusf_M1083A1P2_B_fmtv_usarmy: rhsusf_M1083A1P2_fmtv_usarmy {};
class rhsusf_M1083A1P2_B_M2_fmtv_usarmy: rhsusf_M1083A1P2_B_fmtv_usarmy {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class hide_spare: hide_spare {
positions[] = {{1, 1.4, -0.5}};
};
};
};
class rhsusf_M1084A1P2_fmtv_usarmy: rhsusf_M1083A1P2_fmtv_usarmy {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class hide_spare: hide_spare {
positions[] = {{1, 1.8, 0}};
};
};
};
class rhsusf_M1084A1P2_B_M2_fmtv_usarmy: rhsusf_M1083A1P2_B_M2_fmtv_usarmy {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class hide_spare: hide_spare {
positions[] = {{1, 1.8, -0.5}};
};
};
};
class rhsusf_M1085A1P2_B_Medical_fmtv_usarmy: rhsusf_M1083A1P2_B_fmtv_usarmy {
class EGVAR(interaction,anims): EGVAR(interaction,anims) {
class hide_spare: hide_spare {
positions[] = {{1, 6.1, 0}};
};
};
};

class rhsusf_HEMTT_A4_base: Truck_01_base_F {
class EGVAR(interaction,anims) {
class hide_spare {
positions[] = {"_target selectionPosition 'sparewheel' vectorAdd [0.6, 0.6, -0.4]"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class MRAP_01_base_F;
class rhsusf_m1151_base: MRAP_01_base_F {
class EGVAR(interaction,anims) {
class hide_spare {
positions[] = {"_target selectionPosition 'sparewheel' vectorAdd [-0.465, 0, 0]"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};
// Don't inherit, as it's easier for the trenches compat
class rhsusf_M1165A1_GMV_SAG2_base: rhsusf_m1151_base {
class EGVAR(interaction,anims) {
class hide_spare {
positions[] = {"_target selectionPosition 'sparewheel_gmv' vectorAdd [0, -0.44, 0]"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class rhsusf_rg33_base: MRAP_01_base_F {
class EGVAR(interaction,anims) {
class hide_spare {
selections[] = {"sparewheel"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class rhsusf_M1239_base: MRAP_01_base_F {
class EGVAR(interaction,anims) {
class hide_spare {
selections[] = {"sparewheel"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};

class rhsusf_MATV_base: MRAP_01_base_F {
class EGVAR(interaction,anims) {
class hide_spare {
selections[] = {"sparewheel"};
items[] = {"ACE_Wheel"};
name = ECSTRING(repair,RemoveWheel);
text = ECSTRING(repair,RemovingWheel);
};
};
};
};
23 changes: 23 additions & 0 deletions addons/compat_rhs_usf3/compat_rhs_usf3_repair/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "script_component.hpp"

class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"rhsusf_main_loadorder",
"ace_repair"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"johnb43"};
url = ECSTRING(main,URL);
VERSION_CONFIG;

addonRootClass = QUOTE(ADDON);
};
};

#include "CfgVehicles.hpp"
Loading