From 61f288c9cc1e1bbccd06ce5a9a65ed92fb10a7be Mon Sep 17 00:00:00 2001 From: VKing Date: Tue, 12 Jan 2016 23:16:49 +0100 Subject: [PATCH 01/21] Rename custom classes with ACE_ prefix --- addons/explosives/CfgAmmo.hpp | 26 ++++++++++++-------------- addons/explosives/CfgMagazines.hpp | 22 +++++++++++----------- addons/explosives/config.cpp | 2 +- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 843ecdb8e3..7f9356b93e 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -44,16 +44,16 @@ class CfgAmmo { indirectHitRange = 20; ACE_explodeOnDefuse = 1; }; - class SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { + class ACE_SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "RemoteTrigger"; ACE_explodeOnDefuse = 0; }; - class SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo { + class ACE_SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "TimeTrigger"; ACE_explodeOnDefuse = 0; }; - class SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { - mineTrigger = "MagneticTrigger"; + class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { + mineTrigger = "ACE_MagneticTrigger"; }; class PipeBombBase; @@ -81,10 +81,10 @@ class CfgAmmo { ACE_explodeOnDefuse = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { + class ACE_IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo { + class ACE_IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo { mineTrigger = "RangeTrigger"; }; @@ -93,11 +93,10 @@ class CfgAmmo { ACE_explodeOnDefuse = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { + class ACE_IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { - mineTrigger = "RangeTrigger"; + class ACE_IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { }; class IEDLandBig_Remote_Ammo: PipeBombBase { @@ -105,10 +104,10 @@ class CfgAmmo { ACE_explodeOnDefuse = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { + class ACE_IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo { + class ACE_IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo { mineTrigger = "RangeTrigger"; }; @@ -117,10 +116,9 @@ class CfgAmmo { ACE_explodeOnDefuse = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { + class ACE_IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo { - mineTrigger = "RangeTrigger"; + class ACE_IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo { }; }; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 686dd83ee8..38cd1314ed 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -81,17 +81,17 @@ class CfgMagazines { class PressurePlate{ displayName = CSTRING(SLAME_Magnetic); digDistance = 0; - ammo = "SLAMDirectionalMine_Magnetic_Ammo"; + ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; pitch = 90; }; class IRSensor{ displayName = CSTRING(SLAME_IRSensor); }; class Timer { - ammo = "SLAMDirectionalMine_Timer_Ammo"; + ammo = "ACE_SLAMDirectionalMine_Timer_Ammo"; }; class Command { - ammo = "SLAMDirectionalMine_Command_Ammo"; + ammo = "ACE_SLAMDirectionalMine_Command_Ammo"; fuseTime = 0.5; }; }; @@ -103,14 +103,14 @@ class CfgMagazines { SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { FuseTime = 0.5; - ammo = "IEDUrbanBig_Command_Ammo"; + ammo = "ACE_IEDUrbanBig_Command_Ammo"; }; class DeadmanSwitch:Command {}; class Cellphone:Command {}; class PressurePlate { displayName = CSTRING(PressurePlate); digDistance = 0; - ammo = "IEDUrbanBig_Range_Ammo"; + ammo = "ACE_IEDUrbanBig_Range_Ammo"; pitch = 0; }; }; @@ -120,10 +120,10 @@ class CfgMagazines { ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig"; class ACE_Triggers: ACE_Triggers { class Command: Command { - ammo = "IEDLandBig_Command_Ammo"; + ammo = "ACE_IEDLandBig_Command_Ammo"; }; class PressurePlate: PressurePlate { - ammo = "IEDLandBig_Range_Ammo"; + ammo = "ACE_IEDLandBig_Range_Ammo"; }; }; }; @@ -133,14 +133,14 @@ class CfgMagazines { SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { FuseTime = 0.5; - ammo = "IEDUrbanSmall_Command_Ammo"; + ammo = "ACE_IEDUrbanSmall_Command_Ammo"; }; class DeadmanSwitch: Command {}; class Cellphone: Command {}; class PressurePlate { displayName = CSTRING(PressurePlate); digDistance = 0; - ammo = "IEDUrbanSmall_Range_Ammo"; + ammo = "ACE_IEDUrbanSmall_Range_Ammo"; pitch = 0; }; }; @@ -149,10 +149,10 @@ class CfgMagazines { ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall"; class ACE_Triggers: ACE_Triggers { class Command: Command { - ammo = "IEDLandSmall_Command_Ammo"; + ammo = "ACE_IEDLandSmall_Command_Ammo"; }; class PressurePlate: PressurePlate { - ammo = "IEDLandSmall_Range_Ammo"; + ammo = "ACE_IEDLandSmall_Range_Ammo"; }; }; }; diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index 99544213d3..4353e008a8 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -37,7 +37,7 @@ class CfgActions { class CfgMineTriggers { class RangeTrigger; - class MagneticTrigger: RangeTrigger { + class ACE_MagneticTrigger: RangeTrigger { mineMagnetic = 1; mineTriggerRange = 1; }; From a07d456476ead55f2c9ab55cf913f7bc85d72a39 Mon Sep 17 00:00:00 2001 From: VKing Date: Tue, 12 Jan 2016 23:17:10 +0100 Subject: [PATCH 02/21] Change small IEDs to use smaller pressure plates --- addons/explosives/CfgAmmo.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 7f9356b93e..b717db5d89 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -97,6 +97,7 @@ class CfgAmmo { mineTrigger = "RemoteTrigger"; }; class ACE_IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { + mineTrigger = "RangeTriggerShort"; }; class IEDLandBig_Remote_Ammo: PipeBombBase { @@ -120,5 +121,6 @@ class CfgAmmo { mineTrigger = "RemoteTrigger"; }; class ACE_IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo { + mineTrigger = "RangeTriggerShort"; }; }; From 46643d44d0733c2bc43ca09365df34f7a45e465e Mon Sep 17 00:00:00 2001 From: VKing Date: Wed, 13 Jan 2016 00:13:56 +0100 Subject: [PATCH 03/21] Add editor/zeus modules for different trigger options --- addons/explosives/CfgVehicles.hpp | 56 ++++++++++++++++++++------ addons/explosives/stringtable.xml | 66 +++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 12 deletions(-) diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 24de2f5a44..1a0259587b 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -117,7 +117,7 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_DemoCharge:ACE_Explosives_Place { + class ACE_Explosives_Place_DemoCharge: ACE_Explosives_Place { displayName = "Demo Charge"; model = "\A3\Weapons_F\explosives\c4_charge_small_d"; class ACE_Actions: ACE_Actions { @@ -126,15 +126,15 @@ class CfgVehicles { }; }; }; - class ACE_Explosives_Place_APERSBoundingMine:ACE_Explosives_Place { + class ACE_Explosives_Place_APERSBoundingMine: ACE_Explosives_Place { displayName = "APERS Bounding Mine"; model = "\A3\Weapons_F\explosives\mine_AP_bouncing"; }; - class ACE_Explosives_Place_APERSMine:ACE_Explosives_Place { + class ACE_Explosives_Place_APERSMine: ACE_Explosives_Place { displayName = "APERS Mine"; model = "\A3\Weapons_F\explosives\mine_ap"; }; - class ACE_Explosives_Place_APERSTripwireMine:ACE_Explosives_Place { + class ACE_Explosives_Place_APERSTripwireMine: ACE_Explosives_Place { displayName = "APERS Tripwire Mine"; model = "\A3\Weapons_F\explosives\mine_AP_tripwire"; class ACE_Actions: ACE_Actions { @@ -144,12 +144,12 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_ATMine:ACE_Explosives_Place { + class ACE_Explosives_Place_ATMine: ACE_Explosives_Place { displayName = "AT Mine"; model = "\A3\Weapons_f\Explosives\mine_at"; }; - class ACE_Explosives_Place_Claymore:ACE_Explosives_Place { + class ACE_Explosives_Place_Claymore: ACE_Explosives_Place { displayName = "Claymore"; model = "\A3\Weapons_F\explosives\mine_AP_miniclaymore"; class ACE_Actions: ACE_Actions { @@ -159,7 +159,7 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_SatchelCharge:ACE_Explosives_Place { + class ACE_Explosives_Place_SatchelCharge: ACE_Explosives_Place { displayName = "Satchel Charge"; model = "\A3\Weapons_F\Explosives\satchel"; class ACE_Actions: ACE_Actions { @@ -169,28 +169,28 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_SLAM:ACE_Explosives_Place { + class ACE_Explosives_Place_SLAM: ACE_Explosives_Place { displayName = "SLAM"; model = "\A3\Weapons_F\Explosives\mine_SLAM_directional"; }; // IEDs - class ACE_Explosives_Place_IEDUrbanBig:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDUrbanBig: ACE_Explosives_Place { displayName = "IED Urban Big"; model = "\A3\Weapons_F\Explosives\IED_urban_big"; }; - class ACE_Explosives_Place_IEDLandBig:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDLandBig: ACE_Explosives_Place { displayName = "IED Land Big"; model = "\A3\Weapons_F\Explosives\IED_land_big"; }; - class ACE_Explosives_Place_IEDUrbanSmall:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDUrbanSmall: ACE_Explosives_Place { displayName = "IED Urban Small"; model = "\A3\Weapons_F\Explosives\IED_urban_small"; }; - class ACE_Explosives_Place_IEDLandSmall:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDLandSmall: ACE_Explosives_Place { displayName = "IED Land Small"; model = "\A3\Weapons_F\Explosives\IED_land_small"; }; @@ -338,4 +338,36 @@ class CfgVehicles { class O_Soldier_sniper_base_F; class O_sniper_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; class O_spotter_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + + class ModuleMine_F; + class ModuleMine_SLAMDirectionalMine_F: ModuleMine_F { + displayName = CSTRING(Module_SLAMSideAttack_DisplayName); + }; + class ACE_ModuleMine_SLAMBottomMine: ModuleMine_SLAMDirectionalMine_F { + author = ECSTRING(common,aceteam); + displayName = CSTRING(Module_SLAMBottomAttack_DisplayName); + explosive = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; + }; + + class ModuleExplosive_IEDUrbanBig_F; + class ACE_ModuleExplosive_IEDUrbanBig_Range: ModuleExplosive_IEDUrbanBig_F { + displayName = QUOTE(Module_IEDUrbanBig_Range_DisplayName); + explosive = "ACE_IEDUrbanBig_Range_Ammo"; + }; + class ModuleExplosive_IEDLandBig_F; + class ACE_ModuleExplosive_IEDLandBig_Range: ModuleExplosive_IEDLandBig_F { + displayName = QUOTE(Module_IEDLandBig_Range_DisplayName); + explosive = "ACE_IEDLandBig_Range_Ammo"; + }; + class ModuleExplosive_IEDUrbanSmall_F; + class ACE_ModuleExplosive_IEDUrbanSmall_Range: ModuleExplosive_IEDUrbanSmall_F { + displayName = CSTRING(Module_IEDUrbanSmall_Range_DisplayName); + explosive = "ACE_IEDUrbanSmall_Range_Ammo"; + }; + class ModuleExplosive_IEDLandSmall_F; + class ACE_ModuleExplosive_IEDLandSmall_Range: ModuleExplosive_IEDLandSmall_F { + displayName = QUOTE(Module_IEDLandSmall_Range_DisplayName); + explosive = "ACE_IEDLandSmall_Range_Ammo"; + }; + }; diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 6cf03d7be2..263bd492da 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -613,5 +613,71 @@ Этот модуль управляет настройками, связанными со взрывными устройствами Este módulo ajusta las configuraciones relacionadas con explosivos. + + M6 SLAM Mine (Bottom Attack) + + + + M6 SLAM Mine (Side Attack) + Mina M6 SLAM + Mine M6 SLAM + M6-SLAM-Mine + Mina M6 SLAM + Mina M6 SLAM + Mina SLAM M6 + ПТ-мина M6 SLAM + Mina M6 SLAM + + + Small IED (Urban, Pressure Plate) + + + + Large IED (Urban, Pressure Plate) + + + + Small IED (Dug-in, Pressure Plate) + + + + Large IED (Dug-in, Pressure Plate) + + From f90dd9fed8d85435fa216cefba6fe2c85eacf517 Mon Sep 17 00:00:00 2001 From: VKing Date: Wed, 13 Jan 2016 00:14:17 +0100 Subject: [PATCH 04/21] Allow SLAMs to use long range transmitter --- addons/explosives/CfgMagazines.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 38cd1314ed..eb5e863391 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -58,7 +58,7 @@ class CfgMagazines { ACE_SetupObject = "ACE_Explosives_Place_SatchelCharge"; ACE_DelayTime = 1; class ACE_Triggers { - SupportedTriggers[] = {"Timer","Command", "MK16_Transmitter", "DeadmanSwitch"}; + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; class Timer { FuseTime = 0.5; }; @@ -77,7 +77,7 @@ class CfgMagazines { class SLAMDirectionalMine_Wire_Mag: ATMine_Range_Mag { ACE_SetupObject = "ACE_Explosives_Place_SLAM"; class ACE_Triggers { - SupportedTriggers[] = {"IRSensor","PressurePlate","Timer","Command"}; + SupportedTriggers[] = {"IRSensor", "PressurePlate", "Timer", "Command", "MK16_Transmitter"}; class PressurePlate{ displayName = CSTRING(SLAME_Magnetic); digDistance = 0; @@ -94,6 +94,7 @@ class CfgMagazines { ammo = "ACE_SLAMDirectionalMine_Command_Ammo"; fuseTime = 0.5; }; + class MK16_Transmitter: Command {}; }; }; From 058ea4e8f4b13f7817cc8475cedc92e357c355b1 Mon Sep 17 00:00:00 2001 From: VKing Date: Wed, 13 Jan 2016 01:03:50 +0100 Subject: [PATCH 05/21] Actual editor mines --- addons/explosives/CfgVehicles.hpp | 48 +++++++++++++++++++++++++++++-- addons/explosives/stringtable.xml | 4 +-- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 1a0259587b..5c90894eb5 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -339,6 +339,43 @@ class CfgVehicles { class O_sniper_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; class O_spotter_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + // Editor placed mines + class MineBase; + class SLAMDirectionalMine: MineBase { + displayName = CSTRING(Module_SLAMSideAttack_DisplayName); + }; + class ACE_SLAMBottomMine: SLAMDirectionalMine { + author = ECSTRING(common,aceteam); + ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; + displayName = CSTRING(Module_SLAMBottomAttack_DisplayName); + // TODO: Find a way to place the mine laying down instead of standing up + }; + class IEDUrbanBig_F; + class ACE_IEDUrbanBig_Range: IEDUrbanBig_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDUrbanBig_Range_Ammo"; + displayName = CSTRING(Module_IEDUrbanBig_Range_DisplayName); + }; + class IEDLandBig_F; + class ACE_IEDLandBig_Range: IEDLandBig_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDLandBig_Range_Ammo"; + displayName = CSTRING(Module_IEDLandBig_Range_DisplayName); + }; + class IEDUrbanSmall_F; + class ACE_IEDUrbanSmall_Range: IEDUrbanSmall_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDUrbanSmall_Range_Ammo"; + displayName = CSTRING(Module_IEDUrbanSmall_Range_DisplayName); + }; + class IEDLandSmall_F; + class ACE_IEDLandSmall_Range: IEDLandSmall_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDLandSmall_Range_Ammo"; + displayName = CSTRING(Module_IEDLandSmall_Range_DisplayName); + }; + + // Zeus placed mines class ModuleMine_F; class ModuleMine_SLAMDirectionalMine_F: ModuleMine_F { displayName = CSTRING(Module_SLAMSideAttack_DisplayName); @@ -347,27 +384,34 @@ class CfgVehicles { author = ECSTRING(common,aceteam); displayName = CSTRING(Module_SLAMBottomAttack_DisplayName); explosive = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; + scopeCurator = 2; }; - class ModuleExplosive_IEDUrbanBig_F; class ACE_ModuleExplosive_IEDUrbanBig_Range: ModuleExplosive_IEDUrbanBig_F { + author = ECSTRING(common,aceteam); displayName = QUOTE(Module_IEDUrbanBig_Range_DisplayName); explosive = "ACE_IEDUrbanBig_Range_Ammo"; + scopeCurator = 2; }; class ModuleExplosive_IEDLandBig_F; class ACE_ModuleExplosive_IEDLandBig_Range: ModuleExplosive_IEDLandBig_F { + author = ECSTRING(common,aceteam); displayName = QUOTE(Module_IEDLandBig_Range_DisplayName); explosive = "ACE_IEDLandBig_Range_Ammo"; + scopeCurator = 2; }; class ModuleExplosive_IEDUrbanSmall_F; class ACE_ModuleExplosive_IEDUrbanSmall_Range: ModuleExplosive_IEDUrbanSmall_F { + author = ECSTRING(common,aceteam); displayName = CSTRING(Module_IEDUrbanSmall_Range_DisplayName); explosive = "ACE_IEDUrbanSmall_Range_Ammo"; + scopeCurator = 2; }; class ModuleExplosive_IEDLandSmall_F; class ACE_ModuleExplosive_IEDLandSmall_Range: ModuleExplosive_IEDLandSmall_F { + author = ECSTRING(common,aceteam); displayName = QUOTE(Module_IEDLandSmall_Range_DisplayName); explosive = "ACE_IEDLandSmall_Range_Ammo"; + scopeCurator = 2; }; - }; diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 263bd492da..bcec5127fd 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -646,7 +646,7 @@ Малое СВУ (городское) IED pequeño (Urbano) --> - + Large IED (Urban, Pressure Plate) - + Large IED (Dug-in, Pressure Plate) + + + + + + + + M6 SLAM Mine (Side Attack) - Mina M6 SLAM - Mine M6 SLAM - M6-SLAM-Mine - Mina M6 SLAM - Mina M6 SLAM - Mina SLAM M6 - ПТ-мина M6 SLAM - Mina M6 SLAM + + + + + + + + - - Small IED (Urban, Pressure Plate) - - - + Large IED (Urban, Pressure Plate) - - - - Small IED (Dug-in, Pressure Plate) - - - + + + + + + + + + + Large IED (Dug-in, Pressure Plate) - - + + + + + + + + + + + Small IED (Urban, Pressure Plate) + + + + + + + + + + + Small IED (Dug-in, Pressure Plate) + + + + + + + + + From 575f37c8fdc2b5755948c979cb6e62c9d4693d3a Mon Sep 17 00:00:00 2001 From: VKing Date: Thu, 14 Jan 2016 23:05:26 +0100 Subject: [PATCH 10/21] Add fnc_connectExplosive to add editor explosives to unit triggers --- addons/explosives/CfgVehicles.hpp | 31 ++++++++++++++++--- addons/explosives/CfgWeapons.hpp | 4 +++ .../functions/fnc_connectExplosive.sqf | 27 ++++++++++++++++ 3 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 addons/explosives/functions/fnc_connectExplosive.sqf diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 585066370c..b6421a4730 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -341,8 +341,18 @@ class CfgVehicles { // Editor placed mines class MineBase; + class SatchelCharge_F: MineBase { + GVAR(magazine) = "SatchelCharge_Remote_Mag"; + }; + class DemoCharge_F: MineBase { + GVAR(magazine) = "DemoCharge_Remote_Mag"; + }; + class Claymore_F: MineBase { + GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; + }; class SLAMDirectionalMine: MineBase { displayName = CSTRING(Module_SLAMSideAttack_DisplayName); + GVAR(magazine) = "SLAMDirectionalMine_Wire_Mag"; }; class ACE_SLAMBottomMine: SLAMDirectionalMine { author = ECSTRING(common,aceteam); @@ -350,28 +360,41 @@ class CfgVehicles { displayName = CSTRING(Module_SLAMBottomAttack_DisplayName); // TODO: Find a way to place the mine laying down instead of standing up }; - class IEDUrbanBig_F; + + class IEDUrbanBig_F: MineBase { + GVAR(magazine) = "IEDUrbanBig_Remote_Mag"; + }; class ACE_IEDUrbanBig_Range: IEDUrbanBig_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDUrbanBig_Range_Ammo"; + GVAR(magazine) = "IEDUrbanBig_Remote_Mag"; displayName = CSTRING(Module_IEDUrbanBig_Range_DisplayName); }; - class IEDLandBig_F; + class IEDLandBig_F: MineBase { + GVAR(magazine) = "IEDLandBig_Remote_Mag"; + }; class ACE_IEDLandBig_Range: IEDLandBig_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDLandBig_Range_Ammo"; + GVAR(magazine) = "IEDLandBig_Remote_Mag"; displayName = CSTRING(Module_IEDLandBig_Range_DisplayName); }; - class IEDUrbanSmall_F; + class IEDUrbanSmall_F: MineBase { + GVAR(magazine) = "IEDUrbanSmall_Remote_Mag"; + }; class ACE_IEDUrbanSmall_Range: IEDUrbanSmall_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDUrbanSmall_Range_Ammo"; + GVAR(magazine) = "IEDUrbanSmall_Remote_Mag"; displayName = CSTRING(Module_IEDUrbanSmall_Range_DisplayName); }; - class IEDLandSmall_F; + class IEDLandSmall_F: MineBase { + GVAR(magazine) = "IEDLandSmall_Remote_Mag"; + }; class ACE_IEDLandSmall_Range: IEDLandSmall_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDLandSmall_Range_Ammo"; + GVAR(magazine) = "IEDLandSmall_Remote_Mag"; displayName = CSTRING(Module_IEDLandSmall_Range_DisplayName); }; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index f6ee8ec65e..1ee76a7964 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -15,6 +15,7 @@ class CfgWeapons { model = QUOTE(PATHTOF(data\ace_m57.p3d)); ACE_Range = 250; ACE_Detonator = 1; + GVAR(triggerType) = "Command"; class ItemInfo: ACE_ExplosiveItem { mass = 3; @@ -25,6 +26,7 @@ class CfgWeapons { displayName = CSTRING(M26_displayName); picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); ACE_Range = 5000; + GVAR(triggerType) = "MK16_Transmitter"; }; class ACE_DefusalKit: ACE_ItemCore { scope = 2; @@ -46,6 +48,7 @@ class CfgWeapons { model = "\A3\weapons_F\ammo\mag_univ.p3d"; ACE_Range = 100; ACE_Detonator = 1; + GVAR(triggerType) = "DeadManSwitch"; class ItemInfo: ACE_ExplosiveItem { mass = 2; @@ -60,6 +63,7 @@ class CfgWeapons { model = "\A3\weapons_F\ammo\mag_univ.p3d"; ACE_Range = 15000; ACE_Detonator = 1; + GVAR(triggerType) = "Cellphone"; class ItemInfo: ACE_ExplosiveItem { mass = 2; diff --git a/addons/explosives/functions/fnc_connectExplosive.sqf b/addons/explosives/functions/fnc_connectExplosive.sqf new file mode 100644 index 0000000000..bc9680e68c --- /dev/null +++ b/addons/explosives/functions/fnc_connectExplosive.sqf @@ -0,0 +1,27 @@ +/* + * Author: VKing + * Add preplaced explosives to a unit's detonator. + * + * Arguments: + * 0: Unit + * 1: Explosive object + * 2: Detonator type + * + * Return Value: + * None + * + * Example: + * [player, claymore1, "ACE_Clacker"] call ace_explosives_fnc_connectExplosive + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit", "_object", "_detonator"]; +TRACE_3("Params",_unit,_object,_detonator); + +private _detonatorConfig = getText (configFile >> "CfgWeapons" >> _detonator >> QGVAR(triggerType)); + +private _magazineClass = getText (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(magazine)); + +[_unit, _object, _magazineClass, [configFile >> "ACE_Triggers" >> _detonatorConfig]] call FUNC(addClacker); From 8bdb2cb7f7ef5a1ecf260b6211787a0e11c16a82 Mon Sep 17 00:00:00 2001 From: VKing Date: Thu, 14 Jan 2016 23:05:56 +0100 Subject: [PATCH 11/21] GVAR it. --- addons/explosives/CfgAmmo.hpp | 54 +++++++++---------- addons/explosives/CfgMagazines.hpp | 36 ++++++------- addons/explosives/CfgWeapons.hpp | 14 ++--- .../functions/fnc_addDetonateActions.sqf | 2 +- .../functions/fnc_addExplosiveActions.sqf | 2 +- .../functions/fnc_defuseExplosive.sqf | 2 +- .../functions/fnc_detonateExplosive.sqf | 2 +- .../functions/fnc_getDetonators.sqf | 2 +- .../functions/fnc_hasExplosives.sqf | 2 +- .../functions/fnc_onInventoryChanged.sqf | 2 +- .../functions/fnc_setupExplosive.sqf | 2 +- .../explosives/functions/fnc_startDefuse.sqf | 4 +- 12 files changed, 60 insertions(+), 64 deletions(-) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index ee9e05c42e..36f83066c7 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -3,7 +3,7 @@ class CfgAmmo { class Default; class TimeBombCore: Default { - ACE_DefuseTime = 5; + GVAR(DefuseTime) = 5; }; /* class BoundingMineCore: TimeBombCore; @@ -29,7 +29,7 @@ class CfgAmmo { */ class DirectionalBombBase; class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase { - ACE_Explosive = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; + GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; GVAR(defuseObjectPosition[]) = {0, 0, 0.038}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; @@ -42,27 +42,23 @@ class CfgAmmo { class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase { indirectHitRange = 20; - ACE_explodeOnDefuse = 1; + GVAR(explodeOnDefuseChance) = 1; }; - class ACE_SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { + class SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "RemoteTrigger"; - ACE_explodeOnDefuse = 0; + GVAR(explodeOnDefuseChance) = 0; }; - class ACE_SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo { + class SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "TimeTrigger"; - ACE_explodeOnDefuse = 0; + GVAR(explodeOnDefuseChance) = 0; }; - class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { - mineTrigger = "ACE_MagneticTrigger"; - explosionAngle = 360; - indirectHitRange = 1; - mineInconspicuousness = 25; - icon = "iconExplosiveGP"; + class SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { + mineTrigger = "MagneticTrigger"; }; class PipeBombBase; class DemoCharge_Remote_Ammo: PipeBombBase { - ACE_Explosive = "DemoCharge_Remote_Ammo_Scripted"; + GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted"; GVAR(defuseObjectPosition[]) = {0.07, 0, 0.055}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; @@ -71,7 +67,7 @@ class CfgAmmo { indirectHitRange = 7; }; class SatchelCharge_Remote_Ammo: PipeBombBase { - ACE_Explosive = "SatchelCharge_Remote_Ammo_Scripted"; + GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted"; GVAR(defuseObjectPosition[]) = {0.1, 0.1, 0.05}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; @@ -82,49 +78,49 @@ class CfgAmmo { class IEDUrbanBig_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; - ACE_explodeOnDefuse = 0.02; + GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class ACE_IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { + class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class ACE_IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo { + class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo { mineTrigger = "RangeTrigger"; }; class IEDUrbanSmall_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; - ACE_explodeOnDefuse = 0.02; + GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class ACE_IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { + class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class ACE_IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { - mineTrigger = "RangeTriggerShort"; + class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { + mineTrigger = "RangeTrigger"; }; class IEDLandBig_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; - ACE_explodeOnDefuse = 0.02; + GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class ACE_IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { + class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class ACE_IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo { + class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo { mineTrigger = "RangeTrigger"; }; class IEDLandSmall_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; - ACE_explodeOnDefuse = 0.02; + GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class ACE_IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { + class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class ACE_IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo { - mineTrigger = "RangeTriggerShort"; + class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo { + mineTrigger = "RangeTrigger"; }; }; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index eb5e863391..17122c60bd 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -1,10 +1,10 @@ class CfgMagazines { class CA_Magazine; class ATMine_Range_Mag: CA_Magazine { - ACE_Placeable = 1; + GVAR(Placeable) = 1; useAction = 0; - ACE_SetupObject = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object. - ACE_DelayTime = 2.5; + GVAR(SetupObject) = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object. + GVAR(DelayTime) = 2.5; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -13,7 +13,7 @@ class CfgMagazines { }; }; class APERSBoundingMine_Range_Mag: ATMine_Range_Mag { - ACE_SetupObject = "ACE_Explosives_Place_APERSBoundingMine"; + GVAR(SetupObject) = "ACE_Explosives_Place_APERSBoundingMine"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -22,7 +22,7 @@ class CfgMagazines { }; }; class APERSMine_Range_Mag: ATMine_Range_Mag { - ACE_SetupObject = "ACE_Explosives_Place_APERSMine"; + GVAR(SetupObject) = "ACE_Explosives_Place_APERSMine"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -31,7 +31,7 @@ class CfgMagazines { }; }; class APERSTripMine_Wire_Mag: ATMine_Range_Mag { - ACE_SetupObject = "ACE_Explosives_Place_APERSTripwireMine"; + GVAR(SetupObject) = "ACE_Explosives_Place_APERSTripwireMine"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire; @@ -39,10 +39,10 @@ class CfgMagazines { }; class ClaymoreDirectionalMine_Remote_Mag: CA_Magazine { - ACE_Placeable = 1; + GVAR(Placeable) = 1; useAction = 0; - ACE_SetupObject = "ACE_Explosives_Place_Claymore"; - ACE_DelayTime = 1.5; + GVAR(SetupObject) = "ACE_Explosives_Place_Claymore"; + GVAR(DelayTime) = 1.5; class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; class Command { @@ -53,10 +53,10 @@ class CfgMagazines { }; class SatchelCharge_Remote_Mag: CA_Magazine { - ACE_Placeable = 1; + GVAR(Placeable) = 1; useAction = 0; - ACE_SetupObject = "ACE_Explosives_Place_SatchelCharge"; - ACE_DelayTime = 1; + GVAR(SetupObject) = "ACE_Explosives_Place_SatchelCharge"; + GVAR(DelayTime) = 1; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; class Timer { @@ -70,12 +70,12 @@ class CfgMagazines { }; }; class DemoCharge_Remote_Mag: SatchelCharge_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_DemoCharge"; + GVAR(SetupObject) = "ACE_Explosives_Place_DemoCharge"; model = "\A3\Weapons_F\explosives\c4_charge_small_d"; }; class SLAMDirectionalMine_Wire_Mag: ATMine_Range_Mag { - ACE_SetupObject = "ACE_Explosives_Place_SLAM"; + GVAR(SetupObject) = "ACE_Explosives_Place_SLAM"; class ACE_Triggers { SupportedTriggers[] = {"IRSensor", "PressurePlate", "Timer", "Command", "MK16_Transmitter"}; class PressurePlate{ @@ -99,7 +99,7 @@ class CfgMagazines { }; class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig"; + GVAR(SetupObject) = "ACE_Explosives_Place_IEDUrbanBig"; class ACE_Triggers { SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { @@ -118,7 +118,7 @@ class CfgMagazines { }; class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig"; + GVAR(SetupObject) = "ACE_Explosives_Place_IEDLandBig"; class ACE_Triggers: ACE_Triggers { class Command: Command { ammo = "ACE_IEDLandBig_Command_Ammo"; @@ -129,7 +129,7 @@ class CfgMagazines { }; }; class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall"; + GVAR(SetupObject) = "ACE_Explosives_Place_IEDUrbanSmall"; class ACE_Triggers { SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { @@ -147,7 +147,7 @@ class CfgMagazines { }; }; class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall"; + GVAR(SetupObject) = "ACE_Explosives_Place_IEDLandSmall"; class ACE_Triggers: ACE_Triggers { class Command: Command { ammo = "ACE_IEDLandSmall_Command_Ammo"; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 1ee76a7964..325f87ed7e 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -13,8 +13,8 @@ class CfgWeapons { descriptionShort = CSTRING(clacker_description); picture = PATHTOF(Data\UI\Clacker.paa); model = QUOTE(PATHTOF(data\ace_m57.p3d)); - ACE_Range = 250; - ACE_Detonator = 1; + GVAR(Range) = 250; + GVAR(Detonator) = 1; GVAR(triggerType) = "Command"; class ItemInfo: ACE_ExplosiveItem { @@ -25,7 +25,7 @@ class CfgWeapons { class ACE_M26_Clacker: ACE_Clacker { displayName = CSTRING(M26_displayName); picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); - ACE_Range = 5000; + GVAR(Range) = 5000; GVAR(triggerType) = "MK16_Transmitter"; }; class ACE_DefusalKit: ACE_ItemCore { @@ -46,8 +46,8 @@ class CfgWeapons { descriptionShort = CSTRING(DeadManSwitch_description); picture = PATHTOF(Data\UI\DeadmanSwitch.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; - ACE_Range = 100; - ACE_Detonator = 1; + GVAR(Range) = 100; + GVAR(Detonator) = 1; GVAR(triggerType) = "DeadManSwitch"; class ItemInfo: ACE_ExplosiveItem { @@ -61,8 +61,8 @@ class CfgWeapons { descriptionShort = CSTRING(cellphone_description); picture = PATHTOF(Data\UI\Cellphone_UI.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; - ACE_Range = 15000; - ACE_Detonator = 1; + GVAR(Range) = 15000; + GVAR(Detonator) = 1; GVAR(triggerType) = "Cellphone"; class ItemInfo: ACE_ExplosiveItem { diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf index 04e78f0f82..66701d18a8 100644 --- a/addons/explosives/functions/fnc_addDetonateActions.sqf +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -21,7 +21,7 @@ TRACE_2("params",_unit,_detonator); private ["_result", "_item", "_children", "_range", "_required"]; -_range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range"); +_range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> QGVAR(Range)); _result = [_unit] call FUNC(getPlacedExplosives); _children = []; diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf index fa00fdd207..e744af6bce 100644 --- a/addons/explosives/functions/fnc_addExplosiveActions.sqf +++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf @@ -22,7 +22,7 @@ _list = []; _itemCount = []; { _item = ConfigFile >> "CfgMagazines" >> _x; - if (getNumber(_item >> "ACE_Placeable") == 1) then { + if (getNumber(_item >> QGVAR(Placeable)) == 1) then { _index = _list find _item; if (_index != -1) then { _itemCount set [_index, (_itemCount select _index) + 1]; diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index 0af28788b3..9efd122682 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -19,7 +19,7 @@ params ["_unit", "_explosive"]; TRACE_2("params",_unit,_explosive); -if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse"))}) exitWith { +if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith { TRACE_1("exploding on defuse",_explosive); [_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive); }; diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index d204ad7bad..a01f181635 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -33,7 +33,7 @@ if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRA if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then { private ["_exp", "_previousExp"]; _previousExp = _item select 0; - _exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> "ACE_Explosive"); + _exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> QGVAR(Explosive)); if (_exp != "") then { _exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"]; _exp setDir (getDir _previousExp); diff --git a/addons/explosives/functions/fnc_getDetonators.sqf b/addons/explosives/functions/fnc_getDetonators.sqf index 54c942e9de..22360c875e 100644 --- a/addons/explosives/functions/fnc_getDetonators.sqf +++ b/addons/explosives/functions/fnc_getDetonators.sqf @@ -26,7 +26,7 @@ _result = []; { _config = ConfigFile >> "CfgWeapons" >> _x; - if (getNumber (_config >> "ACE_Detonator") == 1 && {!(_x in _result)}) then { + if (getNumber (_config >> QGVAR(Detonator)) == 1 && {!(_x in _result)}) then { _result pushBack _x; }; } forEach _items; diff --git a/addons/explosives/functions/fnc_hasExplosives.sqf b/addons/explosives/functions/fnc_hasExplosives.sqf index 4a626e9c63..c9da5e59d1 100644 --- a/addons/explosives/functions/fnc_hasExplosives.sqf +++ b/addons/explosives/functions/fnc_hasExplosives.sqf @@ -23,7 +23,7 @@ private ["_result", "_magazines"]; _result = false; _magazines = magazines _unit; { - if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith { + if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> QGVAR(Placeable)) == 1) exitWith { _result = true; }; } count _magazines; diff --git a/addons/explosives/functions/fnc_onInventoryChanged.sqf b/addons/explosives/functions/fnc_onInventoryChanged.sqf index 127cd8c105..889e9e2186 100644 --- a/addons/explosives/functions/fnc_onInventoryChanged.sqf +++ b/addons/explosives/functions/fnc_onInventoryChanged.sqf @@ -26,7 +26,7 @@ private ["_config", "_detonators"]; if (_receiver != ace_player) exitWith {}; _config = ConfigFile >> "CfgWeapons" >> _item; -if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then { +if (isClass _config && {getNumber(_config >> QGVAR(Detonator)) == 1}) then { private ["_clackerItems"]; _clackerItems = _giver getVariable [QGVAR(Clackers), []]; _receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true]; diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index b104761fac..cda8286546 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -27,7 +27,7 @@ TRACE_3("params",_vehicle,_unit,_magClassname); private["_isAttachable", "_setupObjectClass", "_supportedTriggers", "_p3dModel"]; //Get setup object vehicle and model: -_setupObjectClass = getText(ConfigFile >> "CfgMagazines" >> _magClassname >> "ACE_SetupObject"); +_setupObjectClass = getText(ConfigFile >> "CfgMagazines" >> _magClassname >> QGVAR(SetupObject)); if (!isClass (configFile >> "CfgVehicles" >> _setupObjectClass)) exitWith {ERROR("Bad Vehicle");}; _p3dModel = getText (configFile >> "CfgVehicles" >> _setupObjectClass >> "model"); if (_p3dModel == "") exitWith {ERROR("No Model");}; //"" - will crash game! diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index 2c394a997a..84d7274069 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -28,8 +28,8 @@ _fnc_DefuseTime = { TRACE_2("defuseTime",_specialist,_target); private ["_defuseTime"]; _defuseTime = 5; - if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime")) then { - _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime"); + if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime))) then { + _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime)); }; if (!_specialist && {GVAR(PunishNonSpecialists)}) then { _defuseTime = _defuseTime * 1.5; From 32b33d7792b7382068e25adf57e0b528c23ddb12 Mon Sep 17 00:00:00 2001 From: VKing Date: Thu, 14 Jan 2016 23:58:07 +0100 Subject: [PATCH 12/21] How the feck did this happen --- addons/explosives/CfgAmmo.hpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 36f83066c7..5d38fffb81 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -44,16 +44,20 @@ class CfgAmmo { indirectHitRange = 20; GVAR(explodeOnDefuseChance) = 1; }; - class SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { + class ACE_SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "RemoteTrigger"; GVAR(explodeOnDefuseChance) = 0; }; - class SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo { + class ACE_SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "TimeTrigger"; GVAR(explodeOnDefuseChance) = 0; + explosionAngle = 360; + indirectHitRange = 1; + mineInconspicuousness = 25; + icon = "iconExplosiveGP"; }; - class SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { - mineTrigger = "MagneticTrigger"; + class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { + mineTrigger = "ACE_MagneticTrigger"; }; class PipeBombBase; @@ -81,10 +85,10 @@ class CfgAmmo { GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { + class ACE_IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo { + class ACE_IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo { mineTrigger = "RangeTrigger"; }; @@ -93,11 +97,11 @@ class CfgAmmo { GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { + class ACE_IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { - mineTrigger = "RangeTrigger"; + class ACE_IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { + mineTrigger = "RangeTriggerSmall"; }; class IEDLandBig_Remote_Ammo: PipeBombBase { @@ -105,10 +109,10 @@ class CfgAmmo { GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { + class ACE_IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo { + class ACE_IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo { mineTrigger = "RangeTrigger"; }; @@ -117,10 +121,10 @@ class CfgAmmo { GVAR(explodeOnDefuseChance) = 0.02; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { + class ACE_IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { mineTrigger = "RemoteTrigger"; }; - class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo { - mineTrigger = "RangeTrigger"; + class ACE_IEDLandSmall_Range_Ammo: IEDLandBig_Remote_Ammo { + mineTrigger = "RangeTriggerShort"; }; }; From ed8b437a8f91da25288e85f4d3ae884f39cb452f Mon Sep 17 00:00:00 2001 From: VKing Date: Thu, 14 Jan 2016 23:58:31 +0100 Subject: [PATCH 13/21] Prep function --- addons/explosives/XEH_preInit.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 470cae661d..ba9626bbff 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -26,6 +26,7 @@ PREP(addTransmitterActions); PREP(addTriggerActions); PREP(canDefuse); PREP(canDetonate); +PREP(connectExplosive); PREP(defuseExplosive); PREP(detonateExplosive); PREP(dialPhone); From 05c80c2368bd826681ee03bf6ed7c8d9351d0fcf Mon Sep 17 00:00:00 2001 From: VKing Date: Fri, 15 Jan 2016 00:04:12 +0100 Subject: [PATCH 14/21] Gah stop that you jerk! --- addons/explosives/CfgAmmo.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 5d38fffb81..e1c6a72308 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -101,7 +101,7 @@ class CfgAmmo { mineTrigger = "RemoteTrigger"; }; class ACE_IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { - mineTrigger = "RangeTriggerSmall"; + mineTrigger = "RangeTriggerShort"; }; class IEDLandBig_Remote_Ammo: PipeBombBase { From 4e8ea4f8e60eaf36d447c96d5400585e83a5f883 Mon Sep 17 00:00:00 2001 From: VKing Date: Fri, 15 Jan 2016 00:25:02 +0100 Subject: [PATCH 15/21] Fix detonate action pictures --- addons/explosives/CfgAmmo.hpp | 20 +++++++++++-- addons/explosives/CfgVehicles.hpp | 30 +++---------------- .../functions/fnc_connectExplosive.sqf | 2 +- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index e1c6a72308..0074742119 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -29,12 +29,15 @@ class CfgAmmo { */ class DirectionalBombBase; class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase { + GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; GVAR(defuseObjectPosition[]) = {0, 0, 0.038}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; - //class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo; + class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo { + GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; + }; class APERSTripMine_Wire_Ammo: DirectionalBombBase { GVAR(defuseObjectPosition[]) = {-1.415, 0, 0.12}; @@ -43,6 +46,7 @@ class CfgAmmo { class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase { indirectHitRange = 20; GVAR(explodeOnDefuseChance) = 1; + GVAR(magazine) = "SLAMDirectionalMine_Wire_Mag"; }; class ACE_SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "RemoteTrigger"; @@ -62,6 +66,7 @@ class CfgAmmo { class PipeBombBase; class DemoCharge_Remote_Ammo: PipeBombBase { + GVAR(magazine) = "DemoCharge_Remote_Mag"; GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted"; GVAR(defuseObjectPosition[]) = {0.07, 0, 0.055}; soundActivation[] = {"", 0, 0, 0}; @@ -71,18 +76,24 @@ class CfgAmmo { indirectHitRange = 7; }; class SatchelCharge_Remote_Ammo: PipeBombBase { + GVAR(magazine) = "SatchelCharge_Remote_Mag"; GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted"; GVAR(defuseObjectPosition[]) = {0.1, 0.1, 0.05}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; - /*class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo; - class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo;*/ + class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo { + GVAR(magazine) = "DemoCharge_Remote_Mag"; + }; + class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo { + GVAR(magazine) = "SatchelCharge_Remote_Mag"; + }; class IEDUrbanBig_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; + GVAR(magazine) = "IEDUrbanBig_Remote_Mag"; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { @@ -95,6 +106,7 @@ class CfgAmmo { class IEDUrbanSmall_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; + GVAR(magazine) = "IEDUrbanSmall_Remote_Mag"; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { @@ -107,6 +119,7 @@ class CfgAmmo { class IEDLandBig_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; + GVAR(magazine) = "IEDLandBig_Remote_Mag"; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { @@ -119,6 +132,7 @@ class CfgAmmo { class IEDLandSmall_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; + GVAR(magazine) = "IEDLandSmall_Remote_Mag"; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index b6421a4730..4d464968e0 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -341,18 +341,8 @@ class CfgVehicles { // Editor placed mines class MineBase; - class SatchelCharge_F: MineBase { - GVAR(magazine) = "SatchelCharge_Remote_Mag"; - }; - class DemoCharge_F: MineBase { - GVAR(magazine) = "DemoCharge_Remote_Mag"; - }; - class Claymore_F: MineBase { - GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; - }; class SLAMDirectionalMine: MineBase { displayName = CSTRING(Module_SLAMSideAttack_DisplayName); - GVAR(magazine) = "SLAMDirectionalMine_Wire_Mag"; }; class ACE_SLAMBottomMine: SLAMDirectionalMine { author = ECSTRING(common,aceteam); @@ -361,40 +351,28 @@ class CfgVehicles { // TODO: Find a way to place the mine laying down instead of standing up }; - class IEDUrbanBig_F: MineBase { - GVAR(magazine) = "IEDUrbanBig_Remote_Mag"; - }; + class IEDUrbanBig_F; class ACE_IEDUrbanBig_Range: IEDUrbanBig_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDUrbanBig_Range_Ammo"; - GVAR(magazine) = "IEDUrbanBig_Remote_Mag"; displayName = CSTRING(Module_IEDUrbanBig_Range_DisplayName); }; - class IEDLandBig_F: MineBase { - GVAR(magazine) = "IEDLandBig_Remote_Mag"; - }; + class IEDLandBig_F; class ACE_IEDLandBig_Range: IEDLandBig_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDLandBig_Range_Ammo"; - GVAR(magazine) = "IEDLandBig_Remote_Mag"; displayName = CSTRING(Module_IEDLandBig_Range_DisplayName); }; - class IEDUrbanSmall_F: MineBase { - GVAR(magazine) = "IEDUrbanSmall_Remote_Mag"; - }; + class IEDUrbanSmall_F; class ACE_IEDUrbanSmall_Range: IEDUrbanSmall_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDUrbanSmall_Range_Ammo"; - GVAR(magazine) = "IEDUrbanSmall_Remote_Mag"; displayName = CSTRING(Module_IEDUrbanSmall_Range_DisplayName); }; - class IEDLandSmall_F: MineBase { - GVAR(magazine) = "IEDLandSmall_Remote_Mag"; - }; + class IEDLandSmall_F; class ACE_IEDLandSmall_Range: IEDLandSmall_F { author = ECSTRING(common,aceteam); ammo = "ACE_IEDLandSmall_Range_Ammo"; - GVAR(magazine) = "IEDLandSmall_Remote_Mag"; displayName = CSTRING(Module_IEDLandSmall_Range_DisplayName); }; diff --git a/addons/explosives/functions/fnc_connectExplosive.sqf b/addons/explosives/functions/fnc_connectExplosive.sqf index bc9680e68c..aab7ca2c4d 100644 --- a/addons/explosives/functions/fnc_connectExplosive.sqf +++ b/addons/explosives/functions/fnc_connectExplosive.sqf @@ -22,6 +22,6 @@ TRACE_3("Params",_unit,_object,_detonator); private _detonatorConfig = getText (configFile >> "CfgWeapons" >> _detonator >> QGVAR(triggerType)); -private _magazineClass = getText (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(magazine)); +private _magazineClass = getText (configFile >> "CfgAmmo" >> typeOf _object >> QGVAR(magazine)); [_unit, _object, _magazineClass, [configFile >> "ACE_Triggers" >> _detonatorConfig]] call FUNC(addClacker); From 0078ad862adf2f804aa3b643b86823f69d2460a6 Mon Sep 17 00:00:00 2001 From: VKing Date: Fri, 15 Jan 2016 09:33:01 +0100 Subject: [PATCH 16/21] Remove redundant entries. Not removing them as it can be useful to have a reminder that those classes exist. --- addons/explosives/CfgAmmo.hpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 0074742119..367633c233 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -35,9 +35,7 @@ class CfgAmmo { soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; - class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo { - GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; - }; + // class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo {}; class APERSTripMine_Wire_Ammo: DirectionalBombBase { GVAR(defuseObjectPosition[]) = {-1.415, 0, 0.12}; @@ -82,13 +80,8 @@ class CfgAmmo { soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; - - class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo { - GVAR(magazine) = "DemoCharge_Remote_Mag"; - }; - class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo { - GVAR(magazine) = "SatchelCharge_Remote_Mag"; - }; + // class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo {}; + // class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo {}; class IEDUrbanBig_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; From 248eb2143bbec0031ffde21115a351522ab886c6 Mon Sep 17 00:00:00 2001 From: VKing Date: Fri, 15 Jan 2016 10:20:49 +0100 Subject: [PATCH 17/21] Fix inconsistent detonator pictures for some IEDs --- addons/explosives/ACE_Triggers.hpp | 6 +++--- addons/explosives/CfgMagazines.hpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index 952f360f22..108ac80f7d 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -15,19 +15,19 @@ onSetup parameters: onPlace = QUOTE(_this call FUNC(AddClacker);false); requires[] = {"ACE_Clacker"}; }; - class MK16_Transmitter:Command { + class MK16_Transmitter: Command { isAttachable = 1; displayName = CSTRING(MK16_displayName); picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa); requires[] = {"ACE_M26_Clacker"}; }; - class DeadManSwitch:Command { + class DeadManSwitch: Command { isAttachable = 1; displayName = CSTRING(DeadManSwitch_displayName); picture = PATHTOF(Data\UI\DeadmanSwitch.paa); requires[] = {"ACE_DeadManSwitch"}; }; - class Cellphone:Command { + class Cellphone: Command { isAttachable = 1; displayName = CSTRING(cellphone_displayName); picture = PATHTOF(Data\UI\Cellphone_UI.paa); diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 17122c60bd..6d2282bacb 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -116,9 +116,9 @@ class CfgMagazines { }; }; }; - class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag { GVAR(SetupObject) = "ACE_Explosives_Place_IEDLandBig"; + picture = "\A3\Weapons_F\Data\UI\gear_mine_AT_CA.paa"; // Fix inconsistent picture class ACE_Triggers: ACE_Triggers { class Command: Command { ammo = "ACE_IEDLandBig_Command_Ammo"; @@ -130,6 +130,7 @@ class CfgMagazines { }; class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { GVAR(SetupObject) = "ACE_Explosives_Place_IEDUrbanSmall"; + picture = "\A3\Weapons_F\Data\UI\gear_mine_AP_bouncing_CA.paa"; // Fix inconsistent picture class ACE_Triggers { SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { From cfea80bec8bd136b3324d3fd6a6ab76e003a52a8 Mon Sep 17 00:00:00 2001 From: VKing Date: Fri, 15 Jan 2016 10:49:22 +0100 Subject: [PATCH 18/21] Animate preplaced bottom attack SLAMs --- addons/explosives/CfgAmmo.hpp | 6 +++--- addons/explosives/XEH_postInit.sqf | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 367633c233..977e01e3af 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -52,15 +52,15 @@ class CfgAmmo { }; class ACE_SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "TimeTrigger"; + }; + class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { + mineTrigger = "ACE_MagneticTrigger"; GVAR(explodeOnDefuseChance) = 0; explosionAngle = 360; indirectHitRange = 1; mineInconspicuousness = 25; icon = "iconExplosiveGP"; }; - class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { - mineTrigger = "ACE_MagneticTrigger"; - }; class PipeBombBase; class DemoCharge_Remote_Ammo: PipeBombBase { diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index af105b5879..f8f3bb3042 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -36,6 +36,14 @@ GVAR(Setup) = objNull; GVAR(pfeh_running) = false; GVAR(CurrentSpeedDial) = 0; +// Properly angle preplaced bottom-attack SLAMs +{ + switch (typeOf _x) do { + case ("ACE_SLAMDirectionalMine_Magnetic_Ammo"): { + [_x, getDir _x, 90] call FUNC(setPosition); + }; + }; +} forEach allMines; ["interactMenuOpened", { //Cancel placement if interact menu opened From 17aaf477fe8b2a24bbd72c9ca22560856a246ee8 Mon Sep 17 00:00:00 2001 From: VKing Date: Fri, 15 Jan 2016 11:47:40 +0100 Subject: [PATCH 19/21] Standardize displayName for the M26/Mk26/M152/whatever this is --- addons/explosives/ACE_Triggers.hpp | 2 +- addons/explosives/CfgWeapons.hpp | 2 +- addons/explosives/stringtable.xml | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index 108ac80f7d..280906432f 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -17,7 +17,7 @@ onSetup parameters: }; class MK16_Transmitter: Command { isAttachable = 1; - displayName = CSTRING(MK16_displayName); + displayName = CSTRING(M152_displayName); picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa); requires[] = {"ACE_M26_Clacker"}; }; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 325f87ed7e..cd900b2da3 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -23,7 +23,7 @@ class CfgWeapons { }; }; class ACE_M26_Clacker: ACE_Clacker { - displayName = CSTRING(M26_displayName); + displayName = CSTRING(M152_Clacker_displayName); picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); GVAR(Range) = 5000; GVAR(triggerType) = "MK16_Transmitter"; diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 8c60a42a69..e29c3e93bd 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -177,19 +177,19 @@ Usado para acionar explosivos remotamente Используется для удаленной детонации зарядов - - M26 Firing Device - M26 Zündvorrichtung - Dispositivo de detonación MK26 - Zapalnik M26 - Dispositif de mise à feu M26 - Odpalovací zařízení M26 - Detonatore M26 - M26 Gyújtóeszköz - M26 Dispositivo de Detonação - Взрыватель M26 + + M152 Firing Device + M152 Zündvorrichtung + Dispositivo de detonación M152 + Zapalnik M152 + Dispositif de mise à feu M152 + Odpalovací zařízení M152 + Detonatore M152 + M152 Gyújtóeszköz + M152 Dispositivo de Detonação + Взрыватель M152 - + M152 RAMS M152 RAMS M152 RAMS From e3123b3f568a7eb38304d2e554c59cdfcc1aac51 Mon Sep 17 00:00:00 2001 From: VKing Date: Sat, 16 Jan 2016 01:13:01 +0100 Subject: [PATCH 20/21] Local check before setPosition --- addons/explosives/XEH_postInit.sqf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index f8f3bb3042..651f704a6a 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -38,9 +38,11 @@ GVAR(CurrentSpeedDial) = 0; // Properly angle preplaced bottom-attack SLAMs { - switch (typeOf _x) do { - case ("ACE_SLAMDirectionalMine_Magnetic_Ammo"): { - [_x, getDir _x, 90] call FUNC(setPosition); + if (local _x) then { + switch (typeOf _x) do { + case ("ACE_SLAMDirectionalMine_Magnetic_Ammo"): { + [_x, getDir _x, 90] call FUNC(setPosition); + }; }; }; } forEach allMines; From 9501c54530dcb3d1fa78e7426ce5e40a8d5b4055 Mon Sep 17 00:00:00 2001 From: VKing Date: Fri, 22 Jan 2016 14:21:25 +0100 Subject: [PATCH 21/21] Fix #3203 IEDs magically changing shape --- addons/explosives/CfgMagazines.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 6d2282bacb..eec0dadfa3 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -106,8 +106,8 @@ class CfgMagazines { FuseTime = 0.5; ammo = "ACE_IEDUrbanBig_Command_Ammo"; }; - class DeadmanSwitch:Command {}; - class Cellphone:Command {}; + class DeadmanSwitch: Command {}; + class Cellphone: Command {}; class PressurePlate { displayName = CSTRING(PressurePlate); digDistance = 0; @@ -123,6 +123,8 @@ class CfgMagazines { class Command: Command { ammo = "ACE_IEDLandBig_Command_Ammo"; }; + class DeadmanSwitch: Command {}; + class Cellphone: Command {}; class PressurePlate: PressurePlate { ammo = "ACE_IEDLandBig_Range_Ammo"; }; @@ -153,6 +155,8 @@ class CfgMagazines { class Command: Command { ammo = "ACE_IEDLandSmall_Command_Ammo"; }; + class DeadmanSwitch: Command {}; + class Cellphone: Command {}; class PressurePlate: PressurePlate { ammo = "ACE_IEDLandSmall_Range_Ammo"; };