-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interaction - Add actions based on animations (#6144)
* Add actions based on animations * Add setting * Add ability to set items for users * Add actions for 1.82 changes Add actions for backpacks, canisters, entrench tool. Move items and backpack to WeaponHolder. * Add RHS 0.4.6 ZIL spare * Update to new standards * Handle RHS BTR retread system * Make init faster: move condition to configClasses * Fix CUP fake anims * Refactor * Rework * Rename init function * Decrease number of classes to init * Fix merge mistake * Apply suggestions from code review * Updated code for current mod structure * Multiple fixes & tweaks - Made anim setting require a mission restart - Handle more types of items that can be spawned - Prioritise adding items to inventory and only drop on ground if no inventory space - Add more position checks to make certain no valid position are present before stopping - If 1 item was spawned in, it's considered as success - Disable RHS' wheel replacement only if ace_repair is loaded * Update CfgVehicles.hpp * cache config lookup at preStart * Fix error * Add text config entry for progress bar title * Restructure interactions, improved some locations & added interaction to some missing vehicles * Reverted preInit change --------- Co-authored-by: jonpas <jonpas33@gmail.com> Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
- Loading branch information
1 parent
e36363e
commit 96f81f1
Showing
24 changed files
with
939 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/CfgVehicles.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}; | ||
}; | ||
}; | ||
}; |
21 changes: 21 additions & 0 deletions
21
addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/config.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#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 "CfgVehicles.hpp" |
3 changes: 3 additions & 0 deletions
3
addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/script_component.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
addons/compat_rhs_usf3/compat_rhs_usf3_refuel/CfgVehicles.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ class CfgPatches { | |
}; | ||
|
||
#include "CfgEventHandlers.hpp" | ||
#include "CfgVehicles.hpp" |
126 changes: 126 additions & 0 deletions
126
addons/compat_rhs_usf3/compat_rhs_usf3_repair/CfgVehicles.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
3 changes: 3 additions & 0 deletions
3
addons/compat_rhs_usf3/compat_rhs_usf3_repair/script_component.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.