Add CUP Vehicles Compatibility (#9602)

Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
Mike-MF 2024-02-28 15:50:07 +00:00 committed by GitHub
parent 147f28d443
commit 5111062e6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 559 additions and 0 deletions

View File

@ -0,0 +1 @@
z\ace\addons\compat_cup_vehicles

View File

@ -0,0 +1,17 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -0,0 +1,152 @@
class CfgVehicles {
class CUP_MTVR_Base;
class CUP_MTVR_Reammo_Base: CUP_MTVR_Base {
EGVAR(rearm,defaultSupply) = 1200;
};
class CUP_V3S_Open_Base;
class CUP_V3S_Rearm_Base: CUP_V3S_Open_Base {
EGVAR(rearm,defaultSupply) = 1200;
};
class CUP_Kamaz_5350_Base;
class CUP_Kamaz_5350_ReAmmo_Base: CUP_Kamaz_5350_Base {
EGVAR(rearm,defaultSupply) = 1200;
};
class CUP_T810_Unarmed_Base;
class CUP_T810_Reammo_Base: CUP_T810_Unarmed_Base {
EGVAR(rearm,defaultSupply) = 1200;
};
class Wheeled_APC_F;
class CUP_BTR80_Common_Base: Wheeled_APC_F {
class ace_viewports {
class view_0 {
camLocation[] = {0.734863, 0.143927, -0.291199};
camAttach = 45;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_1 {
camLocation[] = {0.950684, -0.00122738, -0.344391};
camAttach = 90;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_2 {
camLocation[] = {0.932129, -0.729811, -0.319};
camAttach = 90;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_3 {
camLocation[] = {-0.963379, -0.749183, -0.351501};
camAttach = -90;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_4 {
camLocation[] = {-0.973145, 0.0148516, -0.364868};
camAttach = -90;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_5 {
camLocation[] = {-0.73584, 0.119176, -0.291229};
camAttach = -45;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
};
};
class CUP_BTR90_Base: Wheeled_APC_F {
class ace_viewports {
class view_0 {
camLocation[] = {0.533417, 2.4613, -0.309951};
camAttach = 0;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_1 {
camLocation[] = {0.877106, 2.38684, -0.306068};
camAttach = 30;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_2 {
camLocation[] = {1.04312, 0.0909424, -0.281996};
camAttach = 60;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_3 {
type = "";
camLocation[] = {1.03799, -0.928223, -0.282196};
camAttach = 80;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_4 {
type = "";
camLocation[] = {-0.90097, -0.913086, -0.282192};
camAttach = -80;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
class view_5 {
type = "";
camLocation[] = {-0.939301, 0.109985, -0.281992};
camAttach = -60;
compartments[]={"Compartment1"};
roles[]={"cargo"};
};
};
};
class CUP_BTR90_HQ_Base: CUP_BTR90_Base { delete ace_viewports; }; // no cargo seats
class Tank_F;
class CUP_M2Bradley_Base: Tank_F {
ace_hunterkiller = 1;
class ace_viewports {
class view_0 {
camLocation[] = {0.987915, -0.324707, -0.0673385};
camAttach = 70;
roles[]={"cargo"};
};
class view_1 {
camLocation[] = {0.90979, -0.970215, -0.043139};
camAttach = 120;
roles[]={"cargo"};
};
class view_2 {
camLocation[] = {0.328003, -1.87402, -0.0408039};
camAttach = 160;
roles[]={"cargo"};
};
class view_3 {
camLocation[] = {-0.357178, -1.89063, -0.0480237};
camAttach = 175;
roles[]={"cargo"};
};
class view_4 {
camLocation[] = {-0.752075, -1.87061, -0.0522318};
camAttach = 190;
roles[]={"cargo"};
};
class view_5 {
camLocation[] = {-0.936401, -0.0942383, -0.107764};
camAttach = -75;
roles[]={"cargo"};
};
class SLD { // suppose to only be only on A3, but the A2s have the screen on the model?
screenLocation[] = {0.729126,-0.191597,-0.573349};
maxDistance = 5;
type = "screen";
camLocation[] = {0,0,0.05};
camAttach[] = {0,0};
roles[]={"cargo"};
};
};
};
};

View File

@ -0,0 +1,4 @@
PREP(onCutHC3);
PREP(onCutUH1Y);
PREP(onPrepareHC3);
PREP(onPrepareUH1Y);

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
if (["CUP_Vehicles_ACE_compat"] call EFUNC(common,isModLoaded)) exitWith {
ERROR_WITH_TITLE("Duplicate CUP/ACE Compats","Compats are now part of ACE - Uninstall 'CUP ACE3 Compatibility Addon - Vehicles'");
};

View File

@ -0,0 +1,9 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -0,0 +1,143 @@
class CfgVehicles {
class CUP_AH6_BASE;
class CUP_MH6_TRANSPORT: CUP_AH6_BASE {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
};
class CUP_B_MH6M_OBS_USA: CUP_MH6_TRANSPORT {
EGVAR(fastroping,enabled) = 0;
};
class CUP_B_MH6J_OBS_USA: CUP_MH6_TRANSPORT {
EGVAR(fastroping,enabled) = 0;
};
class Helicopter_Base_H;
class CUP_AW159_Unarmed_Base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 2;
EGVAR(fastroping,friesType) = "ACE_friesGantry";
EGVAR(fastroping,friesAttachmentPoint)[] = {1.05, 1, 1.3};
EGVAR(fastroping,onCut) = QEFUNC(fastroping,onCutCommon);
EGVAR(fastroping,onPrepare) = QEFUNC(fastroping,onPrepareCommon);
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
EQUIP_FRIES_ATTRIBUTE;
class UserActions {
class CloseRdoor {
condition = QUOTE(this doorPhase 'CargoDoorR' > 0.5 && ((this getCargoIndex player) isEqualTo 0) && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]));
};
};
};
class CUP_CH47F_base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight", "ropeOriginMid"};
};
class CUP_CH53E_base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
class UserActions {
class RampClose {
condition = QUOTE(this animationPhase 'ramp_bottom' >= 0.56 && player == driver this && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]));
};
};
};
class CUP_Merlin_HC3_Base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginRight"};
EGVAR(fastroping,onPrepare) = QEFUNC(compat_cup_vehicles,onPrepareHC3);
EGVAR(fastroping,onCut) = QEFUNC(compat_cup_vehicles,onCutHC3);
class UserActions {
class CloseRdoor {
condition = QUOTE(this doorPhase 'dvere_p' > 0.5 && {(this getCargoIndex player) isEqualTo 0} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
};
class OutWinch {
condition = "false";
};
class InWinch {
condition = "false";
};
};
};
class CUP_Ka60_Base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
};
class CUP_MH60S_Base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginRight"};
class UserActions {
class OpenDoors;
class CloseDoors: OpenDoors {
condition = QUOTE(this animationPhase 'doors' > 0.5 && driver this == player && alive (this) && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]));
};
};
};
class CUP_Mi8_base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft"};
};
class CUP_Mi8_medevac_base: CUP_Mi8_base {
EGVAR(fastroping,enabled) = 0;
};
class CUP_Mi171Sh_Base: CUP_Mi8_base {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
};
class CUP_SA330_Base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
class UserActions {
class CloseRdoor {
condition = QUOTE(alive this && {this doorPhase 'ofrp_puma_porte_droite' > 0.5} && {(this getCargoIndex player) isEqualTo 0} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
};
class CloseLdoor {
condition = QUOTE(alive this && {this doorPhase 'ofrp_puma_porte_gauche' > 0.5} && {(this getCargoIndex player) isEqualTo 1} && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]));
};
};
};
class CUP_UH1H_base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 2;
EGVAR(fastroping,friesType) = "ACE_friesAnchorBar";
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.45, -0.3};
EGVAR(fastroping,onCut) = QEFUNC(fastroping,onCutCommon);
EGVAR(fastroping,onPrepare) = QEFUNC(fastroping,onPrepareCommon);
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
EQUIP_FRIES_ATTRIBUTE;
};
class CUP_B_UH1Y_Base;
class CUP_B_UH1Y_UNA_USMC: CUP_B_UH1Y_Base {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
EGVAR(fastroping,onPrepare) = QEFUNC(compat_cup_vehicles,onPrepareUH1Y);
EGVAR(fastroping,onCut) = QEFUNC(compat_cup_vehicles,onCutUH1Y);
};
class CUP_B_UH1Y_MEV_USMC: CUP_B_UH1Y_UNA_USMC {
EGVAR(fastroping,enabled) = 0;
};
class CUP_UH60_Base: Helicopter_Base_H {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginRight"};
class UserActions {
class OpenDoors;
class CloseDoors: OpenDoors {
condition = QUOTE(this animationPhase 'doors' > 0.5 && driver this == player && alive (this) && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]));
};
};
};
};

View File

@ -0,0 +1,21 @@
#include "script_component.hpp"
class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"CUP_Vehicles_LoadOrder",
"ace_fastroping"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Community Upgrade Project", "Mike"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,3 @@
#define SUBCOMPONENT fastroping
#define SUBCOMPONENT_BEAUTIFIED Fastroping
#include "..\script_component.hpp"

View File

@ -0,0 +1,36 @@
class CfgVehicles {
class CUP_T810_Unarmed_Base;
class CUP_T810_Refuel_Base: CUP_T810_Unarmed_Base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{-1.01, 0.21, -0.5},{1.08, 0.2, -0.5}};
EGVAR(refuel,fuelCargo) = 10000;
};
class Truck_02_fuel_base_F;
class CUP_Kamaz_5350_Refuel_Base: Truck_02_fuel_base_F {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{-0.02, -3.33, -1.05}};
EGVAR(refuel,fuelCargo) = 10000;
};
class CUP_Ural_Support_Base;
class CUP_Ural_Refuel_Base: CUP_Ural_Support_Base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{-0.05, -3.65, -0.42}};
EGVAR(refuel,fuelCargo) = 10000;
};
class CUP_V3S_Open_Base;
class CUP_V3S_Refuel_Base: CUP_V3S_Open_Base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{-0.35, -3.35, -0.4},{0.40, -3.35, -0.4}};
EGVAR(refuel,fuelCargo) = 6500;
};
class CUP_MTVR_Base;
class CUP_MTVR_Refuel_Base: CUP_MTVR_Base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{-1.09, -0.01, -0.5},{1, -0.01, -0.5}};
EGVAR(refuel,fuelCargo) = 10000;
};
};

View File

@ -0,0 +1,23 @@
#include "script_component.hpp"
class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"CUP_Vehicles_LoadOrder",
"ace_refuel"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Community Upgrade Project", "Mike"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
addonRootClass = QUOTE(ADDON);
};
};
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,3 @@
#define SUBCOMPONENT refuel
#define SUBCOMPONENT_BEAUTIFIED Refuel
#include "..\script_component.hpp"

View File

@ -0,0 +1,22 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"CUP_Vehicles_LoadOrder",
"ace_interaction"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Community Upgrade Project", "Mike"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,26 @@
#include "..\script_component.hpp"
/*
* Author: Unknown
* Function for retracting the hooks for CUP HC3 helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before cutting ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_cup_vehicles_fnc_onCutHC3
*
* Public: No
*/
params ["_vehicle"];
_vehicle setVariable ["ace_fastroping_doorsLocked", false, true];
_vehicle animateSource ["Winchsection", 0];
_vehicle animateSource ["Winchsection2", 0];
_vehicle animateDoor ["dvere_p", 1];
2

View File

@ -0,0 +1,22 @@
#include "..\script_component.hpp"
/*
* Author: Unknown
* Function for retracting the hooks for CUP UH-1Y helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before cutting ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_cup_vehicles_fnc_onCutUH1Y
*
* Public: No
*/
params ["_vehicle"];
_vehicle setVariable ["ace_fastroping_doorsLocked", false, true];
_vehicle animateSource ["fries_extend", 0];
2

View File

@ -0,0 +1,26 @@
#include "..\script_component.hpp"
/*
* Author: Unknown
* Function for opening doors and extending the hook for HC3 helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before deploying ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_cup_vehicles_fnc_onPrepareUH1Y
*
* Public: No
*/
params ["_vehicle"];
_vehicle setVariable ["ace_fastroping_doorsLocked", true, true];
_vehicle animateSource ["Winchsection", 1];
_vehicle animateSource ["Winchsection2", 1];
_vehicle animateDoor ["dvere_p", 0];
2

View File

@ -0,0 +1,23 @@
#include "..\script_component.hpp"
/*
* Author: Unknown
* Function for extending the hook for the CUP UH-1Y Helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before deploying ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_cup_vehicles_fnc_onPrepareUH1Y
*
* Public: No
*/
params ["_vehicle"];
_vehicle setVariable ["ace_fastroping_doorsLocked", true, true];
_vehicle animateSource ["fries_extend", 1];
2

View File

@ -0,0 +1,20 @@
#define COMPONENT compat_cup_vehicles
#define COMPONENT_BEAUTIFIED CUP Vehicles Compatibility
#include "\z\ace\addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_macros.hpp"
// Fries Macro
#define EQUIP_FRIES_ATTRIBUTE \
class Attributes { \
class ace_fastroping_equipFRIES { \
property = "ace_fastroping_equipFRIES"; \
control = "Checkbox"; \
displayName = ECSTRING(fastroping,Eden_equipFRIES); \
tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
expression = "[_this] call ace_fastroping_fnc_equipFRIES"; \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = 0; \
}; \
}