diff --git a/addons/main/CfgSettings.hpp b/addons/main/CfgSettings.hpp index c3b8b3ee80..3d62f2d224 100644 --- a/addons/main/CfgSettings.hpp +++ b/addons/main/CfgSettings.hpp @@ -13,8 +13,9 @@ class CfgSettings { compat_rhs_gref3[] = {"ace_compat_rhs_gref3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsgref_main')"}; compat_rhs_saf3[] = {"ace_compat_rhs_saf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhssaf_main')"}; - //Warning for missing SOG:PF compat + //Warnings for missing DLC compat ace_compat_sog[] = {"ace_compat_sog", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'data_f_vietnam')"}; + ace_compat_gm[] = {"ace_compat_gm", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'gm_core')"}; }; }; }; diff --git a/addons/medical_treatment/ACE_Medical_Facilities.hpp b/addons/medical_treatment/ACE_Medical_Facilities.hpp index 32ab19d233..443fa93d17 100644 --- a/addons/medical_treatment/ACE_Medical_Facilities.hpp +++ b/addons/medical_treatment/ACE_Medical_Facilities.hpp @@ -23,4 +23,9 @@ class EGVAR(medical,facilities) { "RU_WarfareBFieldhHospital", "USMC_WarfareBFieldhHospital" }; + GM[] = { + "gm_ge_army_shelteraceI_medic", + "gm_ge_army_shelteraceII_medic", + "gm_gc_army_shelterlakII_medic" + }; }; diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index 9ed723e66a..1c9a44d4e5 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -106,6 +106,7 @@ class CfgVehicles { class values { class None { name = "None"; value = 0; default = 1;}; class ToolKit { name = "ToolKit"; value = 1; }; + class gm_repairkit_01 { name = "GM Repair Kit"; value = 1; }; }; }; }; diff --git a/optionals/compat_gm/$PBOPREFIX$ b/optionals/compat_gm/$PBOPREFIX$ new file mode 100644 index 0000000000..6076e73cbf --- /dev/null +++ b/optionals/compat_gm/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_gm diff --git a/optionals/compat_gm/CfgAmmo.hpp b/optionals/compat_gm/CfgAmmo.hpp new file mode 100644 index 0000000000..4b5d53b8e3 --- /dev/null +++ b/optionals/compat_gm/CfgAmmo.hpp @@ -0,0 +1,25 @@ +class CfgAmmo { + class PipeBombBase; + class gm_explosive_petn_charge: PipeBombBase { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + class gm_explosive_plnp_charge: PipeBombBase { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + + class MineBase; + class gm_mine_at_mn111: MineBase { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + class gm_mine_at_dm21: MineBase { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + class gm_mine_at_tm46: MineBase { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + + class APERSMine_Range_Ammo; + class gm_mine_ap_dm31: APERSMine_Range_Ammo { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; +}; diff --git a/optionals/compat_gm/CfgEventHandlers.hpp b/optionals/compat_gm/CfgEventHandlers.hpp new file mode 100644 index 0000000000..e52b5b0b87 --- /dev/null +++ b/optionals/compat_gm/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_InitPost_EventHandlers { + class gm_jerrycan { + class ADDON { + init = QUOTE(call EFUNC(refuel,makeJerryCan)); + }; + }; +}; diff --git a/optionals/compat_gm/CfgMagazines.hpp b/optionals/compat_gm/CfgMagazines.hpp new file mode 100644 index 0000000000..0b87abaf42 --- /dev/null +++ b/optionals/compat_gm/CfgMagazines.hpp @@ -0,0 +1,128 @@ +class cfgMagazines { + class CA_Magazine; + + // MG3 + class gm_120rnd_762x51mm_mg3_grn; + class gm_120Rnd_762x51mm_B_T_DM21_mg3_grn: gm_120rnd_762x51mm_mg3_grn { + ACE_isBelt = 1; + }; + class gm_120Rnd_762x51mm_B_T_DM21A1_mg3_grn: gm_120rnd_762x51mm_mg3_grn { + ACE_isBelt = 1; + }; + class gm_120Rnd_762x51mm_B_T_DM21A2_mg3_grn: gm_120rnd_762x51mm_mg3_grn { + ACE_isBelt = 1; + }; + + // PK + class gm_100rnd_762x54mm_pk_grn; + class gm_100Rnd_762x54mm_API_b32_pk_grn: gm_100rnd_762x54mm_pk_grn { + ACE_isBelt = 1; + }; + class gm_100Rnd_762x54mm_B_T_t46_pk_grn: gm_100rnd_762x54mm_pk_grn { + ACE_isBelt = 1; + }; + class gm_100rnd_762x54mmR_pk_grn; + class gm_100Rnd_762x54mmR_API_7bz3_pk_grn: gm_100rnd_762x54mmR_pk_grn { + ACE_isBelt = 1; + }; + class gm_100Rnd_762x54mmR_B_T_7t2_pk_grn: gm_100rnd_762x54mmR_pk_grn { + ACE_isBelt = 1; + }; + + // Explosives + class gm_explosive_petn_charge: CA_Magazine { + EGVAR(explosive,DelayTime) = 1; + EGVAR(explosive,Placeable) = 1; + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_petn"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; + class Timer { + FuseTime = 0.5; + }; + class Command { + FuseTime = 0.5; + }; + class MK16_Transmitter: Command {}; + class DeadmanSwitch: Command {}; + }; + }; + + class gm_explosive_plnp_charge: gm_explosive_petn_charge { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_plnp"; + }; + + class ATMine_Range_Mag; + class gm_mine_at_tm46: ATMine_Range_Mag { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_mine_tm46"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.03; + }; + }; + }; + class gm_mine_at_dm21: ATMine_Range_Mag { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_dm21"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.03; + }; + }; + }; + class gm_mine_at_mn111: ATMine_Range_Mag { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_m111"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.03; + }; + }; + }; + + // class ATMine_Range_Mag; + class gm_mine_ap_dm31: ATMine_Range_Mag { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_dm31"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"Tripwire"}; + class Tripwire { + digDistance = 0.125; + }; + }; + }; + + + // Vehicle Ammo + class gm_magazine_20x139mm_base; + class gme_320Rnd_20x139mm_hei_t_dm81: gm_magazine_20x139mm_base { + displayName = "20 mm 320Rnd HEI-T DM81"; + descriptionShort = "Caliber: 20x139 mm HEI-T DM81
Rounds: 320
Used in: RH202"; + displaynameshort = "HEI-T"; + ammo = "gm_bullet_20x139mm_hei_t_dm81"; + count = 320; + initSpeed = 1175; + tracersEvery = 1; + lastRoundsTracer = 1; + scope = 1; + scopeCurator = 2; + author = "Global Mobilization"; + }; + class gme_180Rnd_20x139mm_apds_t_dm63: gm_magazine_20x139mm_base { + displayName = "20 mm 180Rnd APDS-T DM63"; + descriptionShort = "Caliber: 20x139 mm APDS-T DM63
Rounds: 120
Used in: RH202"; + displaynameshort = "APDS-T"; + ammo = "gm_bullet_20x139mm_apds_t_dm63"; + count = 180; + initSpeed = 1175; + tracersEvery = 1; + lastRoundsTracer = 1; + scope = 1; + scopeCurator = 2; + author = "Global Mobilization"; + }; +}; diff --git a/optionals/compat_gm/CfgVehicles.hpp b/optionals/compat_gm/CfgVehicles.hpp new file mode 100644 index 0000000000..2ea7f9823d --- /dev/null +++ b/optionals/compat_gm/CfgVehicles.hpp @@ -0,0 +1,464 @@ +class CfgVehicles { + + // EXPLOSIVES + + class Items_base_F; + class ACE_Explosives_Place: Items_base_F { + class ACE_Actions { + class ACE_MainActions; + }; + }; + + // CHARGE + class ACE_Explosives_Place_gm_explosive_petn: ACE_Explosives_Place { + displayName = "PETN Charge"; + model = "gm\gm_weapons\gm_put\gm_explosive_charge_petn"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + class ACE_Explosives_Place_gm_explosive_plnp: ACE_Explosives_Place { + displayName = "PLNP Charge"; + model = "gm\gm_weapons\gm_put\gm_explosive_charge_plnp"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + // AT MINE + class ACE_Explosives_Place_gm_mine_tm46: ACE_Explosives_Place { + displayName = "AT Mine TM46"; + model = "gm\gm_weapons\gm_put\gm_mine_at_tm46"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + class ACE_Explosives_Place_gm_explosive_dm21: ACE_Explosives_Place { + displayName = "AT Mine DM21"; + model = "gm\gm_weapons\gm_put\gm_mine_at_dm21"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + class ACE_Explosives_Place_gm_explosive_m111: ACE_Explosives_Place { + displayName = "MN 111"; + model = "gm\gm_weapons\gm_launchers\gm_platan\gm_mine_at_mn111_disarmed"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + // AP + class ACE_Explosives_Place_gm_explosive_dm31: ACE_Explosives_Place { + displayName = "AP Mine DM31"; + model = "gm\gm_weapons\gm_put\gm_mine_ap_dm31"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + + // REPAIR, REFUEL, REARM + + class ReammoBox_F; + class gm_AmmoBox_base: ReammoBox_F { + EGVAR(cargo,size) = 1; + EGVAR(cargo,canLoad) = 1; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0,1,1}; + EGVAR(dragging,carryDirection) = 0; + + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition)[] = {0,1.2,0}; + EGVAR(dragging,dragDirection) = 0; + }; + + class gm_jerrycan_base; + class gm_jerrycan: gm_jerrycan_base { + EGVAR(cargo,size) = 1; + EGVAR(cargo,canLoad) = 1; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0,1,1}; + EGVAR(dragging,carryDirection) = 0; + + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition)[] = {0,1.2,0}; + EGVAR(dragging,dragDirection) = 0; + }; + + // TOOLKIT + + class ACE_Module; + class ACE_moduleRepairSettings: ACE_Module { + class wheelRepairRequiredItems { + class values { + class gm_repairkit_01 { name = "RepairKit"; value = 1; }; + }; + }; + }; + + // STATIC + + class gm_ge_army_shelteraceII_repair_base; + class gm_ge_army_shelteraceII_repair: gm_ge_army_shelteraceII_repair_base { + EGVAR(repair,canRepair) = 1; + }; + + class gm_gc_army_shelterlakII_repair_base; + class gm_gc_army_shelterlakII_repair: gm_gc_army_shelterlakII_repair_base { + EGVAR(repair,canRepair) = 1; + }; + + + // W H E E L E D + + class gm_wheeled_base; + class gm_wheeled_truck_base; + class gm_wheeled_APC_base; + class gm_wheeled_motorcycle_base; + + // EAST + + class gm_wheeled_car_base: gm_wheeled_base { + EGVAR(cargo,hasCargo) = 1; + EGVAR(cargo,space) = 4; + EGVAR(refuel,canReceive) = 1; + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.03; + EGVAR(vehicle_damage,engineDetonationProb) = 0.03; + EGVAR(vehicle_damage,hullFireProb) = 0.6; + EGVAR(vehicle_damage,turretFireProb) = 0.1; + EGVAR(vehicle_damage,engineFireProb) = 0.2; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; + EGVAR(vehicle_damage,canHaveFireRing) = 0.1; + }; + + class gm_wheeled_bicycle_base: gm_wheeled_base { + EGVAR(cargo,hasCargo) = 0; + EGVAR(refuel,canReceive) = 0; + }; + + class gm_uaz469_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 78; + }; + + class gm_p601_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 26; + }; + + class gm_brdm2_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 290; + }; + + class gm_btr60_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 290; + EGVAR(cookoff,cookoffSelections)[] = {"commanderturret_hatch"}; + }; + + class gm_ural4320_base: gm_wheeled_truck_base { + EGVAR(refuel,fuelCapacity) = 360; + }; + + class gm_ural4320_reammo_base: gm_ural4320_base { + transportAmmo = 0; + EGVAR(rearm,defaultSupply) = 1200; + }; + + class gm_ural4320_refuel_base: gm_ural4320_base { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-0.05,-3.6,-0.45}}; + EGVAR(refuel,fuelCargo) = 10000; + }; + + class gm_ural4320_medic_base: gm_ural4320_base { + EGVAR(medical,medicClass) = 1; + }; + + class gm_ural4320_repair_base: gm_ural4320_base { + transportRepair = 0; + EGVAR(repair,canRepair) = 1; + }; + + + // WEST + + class gm_k125_base: gm_wheeled_motorcycle_base { + EGVAR(refuel,fuelCapacity) = 14.5; + }; + + class gm_typ1_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 47.3; + }; + + class gm_iltis_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 83; + }; + + + class gm_u1300l_base: gm_wheeled_truck_base { + EGVAR(refuel,fuelCapacity) = 90; + }; + + class gm_u1300l_medic_base: gm_u1300l_base { + EGVAR(medical,medicClass) = 1; + }; + + class gm_kat1_base; + class gm_kat1_451_base: gm_kat1_base { + EGVAR(refuel,fuelCapacity) = 270; + }; + class gm_kat1_451_refuel_base: gm_kat1_451_base { + gm_InsigniasDefaultHazardSign = "gm_insignia_hazard_fuelF54_wht"; + EGVAR(refuel,fuelCargo) = 4600; + EGVAR(refuel,hooks)[] = {{-0.60,-3.44,-0.919689},{0.60,-3.44,-0.919689}}; + }; + + class gm_kat1_454_cargo_base: gm_kat1_451_base { + EGVAR(cargo,space) = 10; + }; + + class gm_fuchs_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 390; + }; + + class gm_fuchsa0_base; + class gm_fuchsa0_engineer_base: gm_fuchsa0_base { + transportRepair = 0; + EGVAR(repair,canRepair) = 1; + }; + + class gm_luchs_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 500; + EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch", "commanderturret_hatch"}; + }; + + + // T R A C K E D + + class Tank_F; + class gm_tracked_base: Tank_F { + EGVAR(cargo,hasCargo) = 1; + EGVAR(cargo,space) = 4; + EGVAR(refuel,canReceive) = 1; + }; + class gm_tracked_APC_base: gm_tracked_base { + EGVAR(vehicle_damage,hullDetonationProb) = 0.03; + EGVAR(vehicle_damage,turretDetonationProb) = 0.03; + EGVAR(vehicle_damage,engineDetonationProb) = 0.03; + EGVAR(vehicle_damage,hullFireProb) = 0.3; + EGVAR(vehicle_damage,turretFireProb) = 0.1; + EGVAR(vehicle_damage,engineFireProb) = 0.2; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; + EGVAR(vehicle_damage,canHaveFireRing) = 0.1; + }; + class gm_tracked_Tank_base: gm_tracked_base { + EGVAR(vehicle_damage,hullDetonationProb) = 0.01; + EGVAR(vehicle_damage,turretDetonationProb) = 0.01; + EGVAR(vehicle_damage,engineDetonationProb) = 0.01; + EGVAR(vehicle_damage,hullFireProb) = 0.2; + EGVAR(vehicle_damage,turretFireProb) = 0.1; + EGVAR(vehicle_damage,engineFireProb) = 0.2; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; + EGVAR(vehicle_damage,canHaveFireRing) = 0.1; + }; + + // EAST + class gm_bmp1_base: gm_tracked_APC_base { + EGVAR(map,vehicleLightColor)[] = {0,1,0,0.1}; + EGVAR(refuel,fuelCapacity) = 460; + EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch","commanderturret_hatch"}; + }; + + class gm_pt76_base: gm_tracked_APC_base { + EGVAR(refuel,fuelCapacity) = 250; + }; + + class gm_t55_base: gm_tracked_Tank_base { + EGVAR(refuel,fuelCapacity) = 900; // only with external tanks + EGVAR(cookoff,cookoffSelections)[] = {"machinegunturret_01_hatch","commanderturret_hatch"}; + }; + + class gm_zsu234_base: gm_tracked_Tank_base { + EGVAR(refuel,fuelCapacity) = 812; + }; + + // WEST + class gm_Leopard1_base; + class gm_Leopard1a0_base: gm_Leopard1_base { + EGVAR(refuel,fuelCapacity) = 955; + EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch_1","commanderturret_hatch"}; + }; + + class gm_Gepard_base: gm_Leopard1_base { + EGVAR(refuel,fuelCapacity) = 985; + }; + + class gm_BPz2_base; + class gm_BPz2a0_base: gm_BPz2_base { + EGVAR(refuel,fuelCapacity) = 1160; + EGVAR(cookoff,cookoffSelections)[] = {"commanderturret_hatch"}; + }; + + class gm_marder1_base: gm_tracked_APC_base { + EGVAR(refuel,fuelCapacity) = 652; + EGVAR(cookoff,cookoffSelections)[] = {"observerturret_hatch", "commanderturret_hatch"}; + }; + + class gm_m113_base: gm_tracked_APC_base { + EGVAR(refuel,fuelCapacity) = 360; + }; + + class gm_m113a1g_base; + class gm_m113a1g_medic_base: gm_m113a1g_base { + EGVAR(medical,medicClass) = 1; + }; + + class gm_m113a1dk_base; + class gm_m113a1dk_engineer_base: gm_m113a1dk_base { + transportRepair = 0; + EGVAR(repair,canRepair) = 1; + }; + + class gm_m113a1dk_medic_base: gm_m113a1dk_base { + EGVAR(medical,medicClass) = 1; + }; + + // H E L I C O P T E R S + + class Helicopter_Base_F; + class Helicopter_Base_H: Helicopter_Base_F { + class EventHandlers; + }; + class gm_helicopter_base: Helicopter_Base_H {}; + + // WEST + + class gm_bo105_base: gm_helicopter_base { + EGVAR(map,vehicleLightColor)[] = {1,0,0,0.1}; + EGVAR(refuel,fuelCapacity) = 3700; + EGVAR(fastroping,enabled) = 0; + + class UserActions { + class openDoor_L + { + displayNameDefault = "Open left Door"; + displayName = "Open left Door"; + position = ""; + radius = 2.7; + onlyForPlayer = 1; + condition = QUOTE((this animationSourcePhase 'door_2_1_unhide' > 0.5) && (this doorPhase 'door_2_1_source' < 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_1_source',1]"; + }; + + class openDoor_R: openDoor_L + { + displayNameDefault = "Open right Door"; + displayName = "Open right Door"; + condition = QUOTE((this animationSourcePhase 'door_2_2_unhide' > 0.5) && (this doorPhase 'door_2_2_source' < 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_2_source',1]"; + }; + + class closeDoor_L + { + displayNameDefault = "Close left Door"; + displayName = "Close left Door"; + position = ""; + radius = 2.7; + onlyForPlayer = 1; + condition = QUOTE((this animationSourcePhase 'door_2_1_unhide' > 0.5) && (this doorPhase 'door_2_1_source' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_1_source',0]"; + }; + + class closeDoor_R: closeDoor_L + { + displayNameDefault = "Close right Door"; + displayName = "Close right Door"; + condition = QUOTE((this animationSourcePhase 'door_2_2_unhide' > 0.5) && (this doorPhase 'door_2_2_source' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_2_source',0]"; + }; + }; + }; + class gm_bo105p1m_vbh_base; + class gm_bo105p1m_vbh_swooper_base: gm_bo105p1m_vbh_base { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{-1.34,0.695,-0.0757732},{1.34,0.695,-0.0973468}}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onCutRopes) = QFUNC(onCutRopes); + EGVAR(fastroping,onDeployRopes) = QFUNC(onDeployRopes); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + }; + + class gm_ch53_base:gm_helicopter_base { + EGVAR(map,vehicleLightColor)[] = {1,0,0,0.1}; + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{0.6, -5.2, -0.8},{-0.6, -5.2, -0.8}}; + EGVAR(refuel,fuelCapacity) = 3850; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + }; + + class gm_ch53g_base: gm_ch53_base { + EGVAR(refuel,fuelCapacity) = 8770; + }; + + // EAST + class gm_mi2_base:gm_helicopter_base { + EGVAR(map,vehicleLightColor)[] = {1,0,0,0.1}; + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{-1.17969,0.0205078,-0.178533}}; + EGVAR(refuel,fuelCapacity) = 600; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + }; + + + class gm_mi2sr_base: gm_mi2_base { + EGVAR(refuel,fuelCapacity) = 1076; + }; + + class gm_mi2p_base: gm_mi2_base { + EGVAR(refuel,fuelCapacity) = 1076; + }; + + class gm_mi2ch_base: gm_mi2_base { + EGVAR(refuel,fuelCapacity) = 1076; + }; + + class gm_mi2platan_base: gm_mi2_base{ + EGVAR(refuel,fuelCapacity) = 1076; + }; + + // P L A N E S + + class Plane_Base_F; + class gm_plane_base: Plane_Base_F { + EGVAR(refuel,canReceive) = 1; + EGVAR(cargo,hasCargo) = 1; + EGVAR(cargo,space) = 4; + }; + + // EAST + class gm_l410_base: gm_plane_base { + EGVAR(refuel,fuelCapacity) = 1300; + }; + + // WEST + class gm_do28d2_base: gm_plane_base { + EGVAR(refuel,fuelCapacity) = 894; // source mondkalb + }; + + class gm_do28d2_medevac_base: gm_do28d2_base { + EGVAR(medical,medicClass) = 1; + }; +}; diff --git a/optionals/compat_gm/CfgWeapons.hpp b/optionals/compat_gm/CfgWeapons.hpp new file mode 100644 index 0000000000..6bc6578e90 --- /dev/null +++ b/optionals/compat_gm/CfgWeapons.hpp @@ -0,0 +1,124 @@ +class CfgWeapons { + + // MACHINE GUNS + class gm_pk_base; + class gm_pkm_base: gm_pk_base { + EGVAR(overheating,mrbs) = 3000; + EGVAR(overheating,slowdownFactor) = 1; + EGVAR(overheating,allowSwapBarrel) = 1; + EGVAR(overheating,dispersion) = 0.25; + }; + class gm_machineGun_base; + class gm_mg3_base: gm_machineGun_base { + EGVAR(overheating,mrbs) = 3000; + EGVAR(overheating,slowdownFactor) = 1; + EGVAR(overheating,allowSwapBarrel) = 1; + EGVAR(overheating,dispersion) = 0.25; + }; + class gm_mg3_veh_base: gm_mg3_base { + EGVAR(overheating,allowSwapBarrel) = 0; + }; + class gm_launcher_base; + class gm_carlgustaf_m2_base: gm_launcher_base { + EGVAR(reloadlaunchers,enabled) = 1; + EGVAR(overpressure,angle) = 60; + EGVAR(overpressure,damage) = 0.7; + EGVAR(overpressure,priority) = 1; + EGVAR(overpressure,range) = 10; + }; + + + // HELMETS + #define HEARING_PROTECTION_OPEN EGVAR(hearing,protection) = 0; EGVAR(hearing,lowerVolume) = 0; + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; + + + class gm_ge_headgear_headset_crew_base; + class gm_ge_headgear_headset_crew_oli: gm_ge_headgear_headset_crew_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_ge_headgear_sph4_base; + class gm_ge_headgear_sph4_oli: gm_ge_headgear_sph4_base{ + HEARING_PROTECTION_PELTOR + }; + + class gm_pl_headgear_wz63_base; + class gm_pl_army_headgear_wz63_oli: gm_pl_headgear_wz63_base { + HEARING_PROTECTION_PELTOR + }; + class gm_pl_army_headgear_wz63_net_oli: gm_pl_headgear_wz63_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_ge_headgear_crewhat_80_base; + class gm_ge_headgear_crewhat_80_blk: gm_ge_headgear_crewhat_80_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_gc_headgear_crewhat_80_base; + class gm_gc_army_headgear_crewhat_80_blk: gm_gc_headgear_crewhat_80_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_gc_headgear_zsh3_base; + class gm_gc_headgear_zsh3_wht: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR + }; + class gm_gc_headgear_zsh3_blu: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR + }; + class gm_gc_headgear_zsh3_orn: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR + }; + + + class gm_ge_headgear_beret_base; + class gm_ge_headgear_beret_crew_red_antiair: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_antitank: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_armor: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_armorrecon: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_artillery: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_engineer: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_maintenance: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_grn_mechinf: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_militarypolice: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_nbc: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_opcom: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_bdx_paratrooper: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_recon: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_supply: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_signals: gm_ge_headgear_beret_base { + HEARING_PROTECTION_PELTOR + }; +}; diff --git a/optionals/compat_gm/XEH_PREP.hpp b/optionals/compat_gm/XEH_PREP.hpp new file mode 100644 index 0000000000..b93865ad78 --- /dev/null +++ b/optionals/compat_gm/XEH_PREP.hpp @@ -0,0 +1,4 @@ +PREP(onCut); +PREP(onCutRopes); +PREP(onDeployRopes); +PREP(onPrepare); diff --git a/optionals/compat_gm/XEH_preStart.sqf b/optionals/compat_gm/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/optionals/compat_gm/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/optionals/compat_gm/XEH_preinit.sqf b/optionals/compat_gm/XEH_preinit.sqf new file mode 100644 index 0000000000..b47cf6628d --- /dev/null +++ b/optionals/compat_gm/XEH_preinit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/optionals/compat_gm/config.cpp b/optionals/compat_gm/config.cpp new file mode 100644 index 0000000000..fa94cccace --- /dev/null +++ b/optionals/compat_gm/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_csw", "ace_explosives", "ace_rearm", "ace_refuel", "ace_repair", "gm_core"}; + author = ECSTRING(common,ACETeam); + authors[] = {"nomisum"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgAmmo.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgMagazines.hpp" +#include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" diff --git a/optionals/compat_gm/functions/fnc_onCut.sqf b/optionals/compat_gm/functions/fnc_onCut.sqf new file mode 100644 index 0000000000..0ceffeb63a --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onCut.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for closing doors for GM helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before cutting ropes + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onCut + * + * Public: No + */ +params ["_vehicle"]; + +switch (true) do { + case (_vehicle isKindOf "gm_ge_army_bo105p1m_vbh_swooper"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; + _vehicle animateDoor ["door_2_1_source", 0]; + _vehicle animateDoor ["door_2_2_source", 0]; + }; + case (_vehicle isKindOf "gm_ch53_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; + _vehicle animateDoor ["cargoramp_source", 0]; + _vehicle animateSource ["slingloadlights_source", 0]; + }; + case (_vehicle isKindOf "gm_mi2_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; + _vehicle animate ["door_2_1_anim", 0]; // animateSource/animateDoor didnt work + }; + default {}; +}; + +2 diff --git a/optionals/compat_gm/functions/fnc_onCutRopes.sqf b/optionals/compat_gm/functions/fnc_onCutRopes.sqf new file mode 100644 index 0000000000..1116072f13 --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onCutRopes.sqf @@ -0,0 +1,22 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for animating ropes (first introduced for GM Bo 105). + * Original onCut runs when _stowing_ FRIES. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait for animation to finish + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onCutRopes + * + * Public: No + */ +params ["_vehicle"]; + +_vehicle animateSource ["swooperRopes_unhide", 1, true]; + +0 diff --git a/optionals/compat_gm/functions/fnc_onDeployRopes.sqf b/optionals/compat_gm/functions/fnc_onDeployRopes.sqf new file mode 100644 index 0000000000..9fb4e192bd --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onDeployRopes.sqf @@ -0,0 +1,22 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for animating ropes when actually dropping (first introduced for GM Bo 105). + * Original onPrepare already animates when preparing FRIES. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait for animation to finish + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onDeployRopes + * + * Public: No + */ +params ["_vehicle"]; + +_vehicle animateSource ["swooperRopes_unhide", 0, true]; + +0 diff --git a/optionals/compat_gm/functions/fnc_onPrepare.sqf b/optionals/compat_gm/functions/fnc_onPrepare.sqf new file mode 100644 index 0000000000..6dc24932e7 --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onPrepare.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for opening doors for most GM helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before deploying ropes + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onPrepare + * + * Public: No + */ +params ["_vehicle"]; + +switch (true) do { + case (_vehicle isKindOf "gm_ge_army_bo105p1m_vbh_swooper"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; + _vehicle animateDoor ["door_2_1_source", 1]; + _vehicle animateDoor ["door_2_2_source", 1]; + }; + case (_vehicle isKindOf "gm_ch53_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; + _vehicle animateDoor ["cargoramp_source", 1]; + _vehicle animateSource ["slingloadlights_source", 1]; + }; + case (_vehicle isKindOf "gm_mi2_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; + _vehicle animate ["door_2_1_anim", 1]; // animateSource/animateDoor didnt work + _vehicle animateSource ["winch_unhide", 1]; // just in case this wasnt already set + }; + default {}; +}; + +2 diff --git a/optionals/compat_gm/functions/script_component.hpp b/optionals/compat_gm/functions/script_component.hpp new file mode 100644 index 0000000000..8d01d047c9 --- /dev/null +++ b/optionals/compat_gm/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\compat_gm\script_component.hpp" diff --git a/optionals/compat_gm/script_component.hpp b/optionals/compat_gm/script_component.hpp new file mode 100644 index 0000000000..1d5854d451 --- /dev/null +++ b/optionals/compat_gm/script_component.hpp @@ -0,0 +1,7 @@ +#define COMPONENT compat_gm +#define COMPONENT_BEAUTIFIED GM Compatibility + +#include "\z\ace\addons\main\script_mod.hpp" +#include "\z\ace\addons\main\script_macros.hpp" + +#include "\z\ace\addons\csw\script_config_macros_csw.hpp" diff --git a/tools/pDummies/gm/gm_weapons/gm_launchers/gm_platan/gm_mine_at_mn111_disarmed b/tools/pDummies/gm/gm_weapons/gm_launchers/gm_platan/gm_mine_at_mn111_disarmed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_petn b/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_petn new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_plnp b/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_plnp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_ap_dm31 b/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_ap_dm31 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_dm21 b/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_dm21 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_tm46 b/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_tm46 new file mode 100644 index 0000000000..e69de29bb2