ACE3/optionals/compat_sog/CfgVehicles/turrets.hpp
Filip Maciejewski 10881fc5bd
SOG Compat - Add 1.2 update support (#8974)
* Update vn_mine_tripwire_m16_02_ammo base class

* Fix fnc_handlePunjiTrapDamage

Hopefully once and for all

* Remove placement actions from punji traps

* Add Explosives compat for 1.2 content

TODO testing

* Add quoting to stringtable config usage

* Prevent bike mine placement object from swinging all over the place

* Add non attachable ACE_Triggers for big mines

Bike mine looks kinda stupid when it's attached to a car...

* Bike mine triggers

* Cartridge mine triggers

* Lighter mine triggers

* Pot mine triggers

* Jerrycan mine triggers

* Mortar shell mine triggers

* Grenade board mine triggers

* Inheritance fixes

* Update damage handler for new punji traps

* Improve interaction points and dig distances

* Dh10 mine triggers

* Bump damage of vn_mine_cartridge_ammo

* Add incendiary features to lighter and jerry can explosives

WIP

* SOG Compat - Added fuel tank volumes for SOG update 1.2 vehicles (#8978)

* Added fuel tank volumes for SOG update 1.2 vehicles

* Type 55A is similar in fuel capacity to the PTF Nasty, not the PBR

* Add missing EOLs

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>

* Improve placement feedback of Whip punji

* Add inheritance to custom wound handlers

* Fix doorway punji position

* Add spikes offset for affected units of doorway trap

* Prevent spiderholes from being loaded into cargo

* Add missing continue digging action to spiderholes

* Fix spiderholes physics while being dug up via trenches system

Depends on #8998

* Add missing params

* Fix parenthesis

* Add pDrive dummy files

This is stupid.

* Enable Melee weapons in the arsenal

* Add Entrenching tool capabilities to Shovel and ETool

Depends on #8999

* Add incendiary features to Molotov and M14

* Tweak chance of being set ablaze

Now sums all hitpoints damage.

* Add ACE_damageType to napalm and he bombs

* Do not change cartridge mine damage and range if no ACE Medical

* Simplify variable config values

* Swap cartridge mine hit values

Whoopsie.

* Add overpressure configs to launchers

* Fixed an issue preventing the M1919A6 CSW from being disassembled (#8970)

* Remove disassembleTo from CSW weapons

This config property is meant for tripods.

* Add CSW config for MG42

* Simplify requiredAddons

* Remove proxy weapons from most of the CSW, adjust loading times

The animations are pretty important in case of SOGPF turrets, the ammo load times were adjusted accordingly so the total loading times is similar.

* Add vn_pavn_30_can.p3d pDrive dummy

* Fix missing MG42 mag icon

* Add field_rations values to food props/mags

Needs #9008 to be usable.

* Add more field_rations values to food props/mags

Send help.

* More food configs

* Even more food configs

Fooooood.

* More fooood

Even more foooooood.

* Fix food inheritance

* Add SGM CSW compatibility

* Various fixes for CSW

Wrong tripods for opfor guns, missing translation

* Improve TOW interaction position

* Add dragging and interaction configs to recoilles rifles

* Cleanup SGM CSW config

* Add MK18 CSW config

* Add H-12 MLRS CSW config

* Add missing Mk18 stringtable

* Add function header and logging to fnc_woundsHandlerIncendiary

* Add missing weapons in CfgPatches array

* Add entrenching tool config to backpacks

* Fix Hammer and Fire axe melee weapons

* Add missing CSW images

Thanks @BaerMitUmlaut

Co-authored-by: Samuel Deutsch <Quantx@users.noreply.github.com>
2022-09-08 14:41:52 +02:00

542 lines
15 KiB
C++

class LandVehicle;
class StaticWeapon: LandVehicle {
class ACE_Actions {
class ACE_MainActions;
};
};
class StaticCannon: StaticWeapon {};
class StaticMGWeapon: StaticWeapon {};
// --- Gun Turrets -------------------------------------------------------------
// M2 Browning - High
class vn_static_m2_high_base: StaticMGWeapon {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "mg1_otochlaven";
};
};
class ACE_CSW {
enabled = 1;
proxyWeapon = "vn_m2_v_01";
magazineLocation = "_target selectionPosition 'mg1_magazine'";
disassembleWeapon = QGVAR(m2_carry);
disassembleTurret = QEGVAR(csw,m3Tripod);
ammoLoadTime = 4;
ammoUnloadTime = 8;
desiredAmmo = 100;
};
};
// M2 Browning - Low
class vn_static_m2_low_base: vn_static_m2_high_base {
class ACE_CSW: ACE_CSW {
disassembleTurret = QEGVAR(csw,m3TripodLow);
};
};
// M1919A6 - No tripod
class vn_static_m1919a6_base: vn_static_m2_low_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "";
selection = "mg1_otochlaven_recoil";
};
};
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = "vn_m1919_v_01";
magazineLocation = "_target selectionPosition 'mg1_magazine' vectorAdd [-0.3, 0, 0]";
disassembleWeapon = QGVAR(m1919A6_carry);
disassembleTurret = "";
ammoLoadTime = 2;
ammoUnloadTime = 8;
desiredAmmo = 250;
};
};
// M1919A4 - High
class vn_static_m1919a4_high_base: vn_static_m1919a6_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "";
selection = "mg1_otochlaven_recoil";
};
};
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = "vn_m1919_v_01";
magazineLocation = "_target selectionPosition 'mg1_magazine'";
disassembleWeapon = QGVAR(m1919A4_carry);
disassembleTurret = QEGVAR(csw,m3Tripod);
ammoLoadTime = 2;
ammoUnloadTime = 8;
desiredAmmo = 250;
};
};
// M1919A4 - Low
class vn_static_m1919a4_low_base: vn_static_m1919a4_high_base {
class ACE_CSW: ACE_CSW {
disassembleTurret = QEGVAR(csw,m3TripodLow);
};
};
// M60 - High
class vn_static_m60_high_base: vn_static_m2_low_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.15, 0.532, -1.06]";
};
};
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = "vn_m60_v_01";
magazineLocation = "_target selectionPosition 'mg1_trigger'";
disassembleWeapon = QGVAR(m60_carry);
disassembleTurret = QEGVAR(csw,m3Tripod);
ammoLoadTime = 3;
ammoUnloadTime = 8;
desiredAmmo = 250;
};
};
// M60 - Low
class vn_static_m60_low_base: vn_static_m60_high_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.25, 0.15, -1.06]";
};
};
class ACE_CSW: ACE_CSW {
magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'";
disassembleTurret = QEGVAR(csw,m3TripodLow);
};
};
// TOW
class vn_static_at3_base: StaticMGWeapon {};
class vn_static_tow_base: vn_static_at3_base {
EGVAR(dragging,canCarry) = 0;
EGVAR(dragging,dragPosition)[] = {0.8, 1.3, 0};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-1.04, 0.3, -0.5]";
};
};
class ACE_CSW {
enabled = 1;
proxyWeapon = "vn_missile_tow_launcher";
magazineLocation = "_target selectionPosition 'magazine'";
disassembleWeapon = QGVAR(tow_carry);
disassembleTurret = QEGVAR(csw,m220Tripod);
ammoLoadTime = 2;
ammoUnloadTime = 5;
desiredAmmo = 1;
};
};
// DShKM - High
class vn_static_dp28_high_base: vn_static_m2_high_base {
class ACE_CSW: ACE_CSW {
enabled = 0;
};
};
class vn_static_dshkm_high_01_base: vn_static_dp28_high_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.15, 0.532, -1.06]";
};
};
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = "vn_dshkm_v_01";
magazineLocation = "_target selectionPosition 'mg1_boxmag'";
disassembleWeapon = QGVAR(dshkm_carry);
disassembleTurret = QEGVAR(csw,kordTripod);
ammoLoadTime = 1;
ammoUnloadTime = 8;
desiredAmmo = 50;
};
};
// DShKM - High, with AA sight
class vn_static_dshkm_high_02_base: vn_static_dshkm_high_01_base {
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(dshkm_AA_carry);
};
};
// DShKM - Low, with shield
class vn_static_dshkm_low_01_base: vn_static_dshkm_high_01_base {
EGVAR(dragging,canCarry) = 0;
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.3, 0.75, -1]";
};
};
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(dshkm_shield_carry);
disassembleTurret = QEGVAR(csw,kordTripodLow);
};
};
// DShKM - Low
class vn_static_dshkm_low_02_base: vn_static_dshkm_low_01_base {
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(dshkm_carry);
};
};
// RPD - High
class vn_static_rpd_high_base: vn_static_dp28_high_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.158, 0.745, -0.7]";
};
};
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = "vn_rpd_v_01";
magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'";
disassembleWeapon = QGVAR(rpd_carry);
disassembleTurret = QEGVAR(csw,kordTripod);
ammoLoadTime = 10;
ammoUnloadTime = 8;
desiredAmmo = 100;
};
};
// PK - High
class vn_static_pk_high_base: vn_static_rpd_high_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.156, 0.755, -1.05]";
};
};
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = "vn_pk_v_01";
magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'";
disassembleWeapon = QGVAR(pk_carry);
disassembleTurret = QEGVAR(csw,kordTripod);
ammoLoadTime = 2;
ammoUnloadTime = 8;
desiredAmmo = 100;
};
};
// PK - Low
class vn_static_pk_low_base: vn_static_pk_high_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.35, 0.43, -0.9]";
};
};
class ACE_CSW: ACE_CSW {
disassembleTurret = QEGVAR(csw,kordTripodLow);
};
};
// MG42 - High
class vn_static_mg42_high_base: vn_static_rpd_high_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.18, 0.5, -0.3]";
};
};
class ACE_CSW {
enabled = 1;
proxyWeapon = "vn_mg42_v_01";
magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'";
disassembleWeapon = QGVAR(mg42_carry);
disassembleTurret = QEGVAR(csw,kordTripod);
ammoLoadTime = 2;
ammoUnloadTime = 8;
desiredAmmo = 250;
};
};
class vn_static_mg42_low_base: vn_static_mg42_high_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "[-0.1, 0.3, -0.9]";
};
};
class ACE_CSW: ACE_CSW {
disassembleTurret = "";
};
};
// SGM - High
class vn_static_sgm_base: StaticMGWeapon {
class ACE_Actions: ACE_Actions {};
};
class vn_static_sgm_high_base: vn_static_sgm_base {
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "mg1_otocvez";
};
};
class ACE_CSW {
enabled = 1;
proxyWeapon = "vn_sgm_v_01";
magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'";
disassembleWeapon = QGVAR(sgm_carry);
disassembleTurret = QEGVAR(csw,kordTripod);
ammoLoadTime = 2;
ammoUnloadTime = 8;
desiredAmmo = 250;
};
};
// SGM - Low
class vn_static_sgm_low_base: vn_static_sgm_high_base {
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(sgm_carry);
disassembleTurret = QEGVAR(csw,kordTripodLow);
};
};
// SGM - Shield
class vn_o_pl_static_sgm_low_01: vn_static_sgm_low_base {
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(sgm_shield_carry);
disassembleTurret = QEGVAR(csw,kordTripodLow);
};
};
class vn_o_nva_65_static_sgm_low_01: vn_static_sgm_low_base {
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(sgm_shield_carry);
disassembleTurret = QEGVAR(csw,kordTripodLow);
};
};
class vn_o_nva_static_sgm_low_01: vn_static_sgm_low_base {
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(sgm_shield_carry);
disassembleTurret = QEGVAR(csw,kordTripodLow);
};
};
class vn_o_nva_navy_static_sgm_low_01: vn_static_sgm_low_base {
class ACE_CSW: ACE_CSW {
disassembleWeapon = QGVAR(sgm_shield_carry);
disassembleTurret = QEGVAR(csw,kordTripodLow);
};
};
// Mk18 Grenade laucher
class vn_static_mk18_base: StaticCannon {
EGVAR(dragging,canCarry) = 1;
EGVAR(dragging,canDrag) = 1;
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "mg1_otochlaven";
};
};
class ACE_CSW {
enabled = 1;
proxyWeapon = "vn_mk18_v_01";
magazineLocation = "_target selectionPosition 'mg1_magazine'";
disassembleWeapon = QGVAR(mk18_carry);
disassembleTurret = QEGVAR(csw,m3TripodLow);
ammoLoadTime = 1;
ammoUnloadTime = 8;
desiredAmmo = 24;
};
};
// --- Mortars -----------------------------------------------------------------
// M29 Mortar
class StaticMortar: StaticWeapon {};
class Mortar_01_base_F: StaticMortar {};
class vn_static_mortar_m29_base: Mortar_01_base_F {
EGVAR(dragging,canCarry) = 0;
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "";
selection = "otochlaven";
};
};
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(vn_mortar_m29);
magazineLocation = "_target selectionPosition 'pohon'";
disassembleWeapon = QGVAR(mortar_m29_carry);
disassembleTurret = QEGVAR(csw,mortarBaseplate);
ammoLoadTime = 3;
ammoUnloadTime = 3;
desiredAmmo = 1;
};
};
// M2 / Type 63 Mortar
class vn_static_mortar_m2_base: vn_static_mortar_m29_base {
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(vn_mortar_m2);
magazineLocation = "_target selectionPosition 'pohon'";
disassembleWeapon = QGVAR(mortar_m2_carry);
disassembleTurret = QEGVAR(csw,mortarBaseplate);
ammoLoadTime = 3;
ammoUnloadTime = 3;
desiredAmmo = 1;
};
};
// Type 53 Mortar
class vn_static_mortar_type53_base: vn_static_mortar_m29_base {
class ACE_CSW: ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(vn_mortar_type53);
magazineLocation = "_target selectionPosition 'pohon'";
disassembleWeapon = QGVAR(mortar_type53_carry);
disassembleTurret = QEGVAR(csw,mortarBaseplate);
ammoLoadTime = 3;
ammoUnloadTime = 3;
desiredAmmo = 1;
};
};
// H-12 MLRS
class vn_static_h12_base: Mortar_01_base_F {
EGVAR(dragging,canCarry) = 0;
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition)[] = {0.4, 2.1, 0};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "damagegun";
};
};
class ACE_CSW {
enabled = 0;
};
};
// --- Non-CSW Static Weapons --------------------------------------------------
class vn_static_m45_base: vn_static_m2_high_base {
EGVAR(dragging,canCarry) = 0;
EGVAR(dragging,canDrag) = 0;
class ACE_CSW: ACE_CSW {
enabled = 0;
};
};
class vn_static_zpu4_base: vn_static_m2_high_base {
EGVAR(dragging,canCarry) = 0;
EGVAR(dragging,canDrag) = 0;
class ACE_CSW: ACE_CSW {
enabled = 0;
};
};
class vn_o_static_rsna75: StaticMGWeapon {
EGVAR(dragging,canCarry) = 0;
EGVAR(dragging,canDrag) = 0;
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
position = "";
selection = "mainturret";
};
};
class ACE_CSW {
enabled = 0;
};
};
class vn_sa2: StaticMGWeapon {
EGVAR(dragging,canCarry) = 0;
EGVAR(dragging,canDrag) = 0;
};
class vn_static_m40a1rr_base: StaticCannon {
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition)[] = {-0.3, 1.9, 0};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "mg1_otochlaven";
};
};
};
class vn_static_type56rr_base: StaticCannon {
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition)[] = {-0.1, 0.5, 0};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "mg1_otocvez";
};
};
};
// --- Spiderholes -------------------------------------------------------------
class vn_o_vc_spiderhole_01: StaticWeapon {
EGVAR(dragging,canCarry) = 0;
EGVAR(dragging,canDrag) = 0;
EGVAR(cargo,canLoad) = 0;
EGVAR(trenches,diggingDuration) = QEGVAR(trenches,smallEnvelopeDigDuration);
EGVAR(trenches,removalDuration) = QEGVAR(trenches,smallEnvelopeRemoveDuration);
EGVAR(trenches,noGeoClass) = QGVAR(spiderhole_01_nogeo);
EGVAR(trenches,placementData)[] = {1.5, 1.5, 0.1};
EGVAR(trenches,grassCuttingPoints)[] = {};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
class ACE_ContinueDiggingTrench {
displayName = ECSTRING(trenches,ContinueDiggingTrench);
condition = QUOTE([ARR_2(_target,_player)] call EFUNC(trenches,canContinueDiggingTrench));
statement = QUOTE([ARR_2(_target,_player)] call EFUNC(trenches,continueDiggingTrench););
};
};
};
};
class vn_o_vc_spiderhole_02: vn_o_vc_spiderhole_01 {
EGVAR(trenches,noGeoClass) = QGVAR(spiderhole_02_nogeo);
};
class vn_o_vc_spiderhole_03: vn_o_vc_spiderhole_01 {
EGVAR(trenches,noGeoClass) = QGVAR(spiderhole_03_nogeo);
EGVAR(trenches,placementData)[] = {1.5, 2.5, 0.1};
};
class GVAR(spiderhole_01_nogeo): vn_o_vc_spiderhole_01 {
scope = 1;
};
class GVAR(spiderhole_02_nogeo): vn_o_vc_spiderhole_02 {
scope = 1;
};
class GVAR(spiderhole_03_nogeo): vn_o_vc_spiderhole_03 {
scope = 1;
};