diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 355377102a..65b1ca3fad 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -94,7 +94,7 @@ class CfgAmmo { class PipeBombBase; class DemoCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "DemoCharge_Remote_Mag"; - GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted"; + GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted"; // can probably remove as base ammo now has triggerWhenDestroyed GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055}; soundActivation[] = {"", 0, 0, 0}; @@ -105,7 +105,7 @@ class CfgAmmo { }; class SatchelCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "SatchelCharge_Remote_Mag"; - GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted"; + GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted"; // can probably remove as base ammo now has triggerWhenDestroyed GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.1, 0.1, 0.05}; soundActivation[] = {"", 0, 0, 0}; @@ -169,4 +169,18 @@ class CfgAmmo { class ACE_IEDLandSmall_Range_Ammo: IEDLandBig_Remote_Ammo { mineTrigger = "RangeTriggerShort"; }; + + // Orange DLC: + class APERSMineDispenser_Ammo: PipeBombBase { + GVAR(magazine) = "APERSMineDispenser_Mag"; + GVAR(Explosive) = "APERSMineDispenser_Ammo_Scripted"; // triggerWhenDestroyed = 1; + GVAR(size) = 0; + GVAR(defuseObjectPosition)[] = {0.0, -0.05, 0.15}; + }; + class APERSMine_Range_Ammo; + class TrainingMine_Ammo: APERSMine_Range_Ammo { + GVAR(magazine) = "TrainingMine_Mag"; + GVAR(size) = 0; + GVAR(defuseObjectPosition)[] = {0, 0, 0.15}; + }; }; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 698ed79fcb..1784e80433 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -170,4 +170,29 @@ class CfgMagazines { }; }; }; + + + // Orange DLC: + class APERSMineDispenser_Mag: SatchelCharge_Remote_Mag { + GVAR(SetupObject) = "ACE_Explosives_Place_APERSMineDispenser"; + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter"}; + class Timer { + FuseTime = 0.5; + }; + class Command { + FuseTime = 0.5; + }; + class MK16_Transmitter: Command {}; + }; + }; + class TrainingMine_Mag: APERSMine_Range_Mag { + GVAR(SetupObject) = "ACE_Explosives_Place_TrainingMine"; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.02; + }; + }; + }; }; diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 70499ba809..8d03856e50 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -164,6 +164,27 @@ class CfgVehicles { }; }; + // Orange DLC: + class ACE_Explosives_Place_APERSMineDispenser: ACE_Explosives_Place { + displayName = "APERSMineDispenser"; + model = "\A3\Weapons_F_Orange\Explosives\APERSmineDispenser"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0.0, -0.05, 0.15]"; + }; + }; + }; + class ACE_Explosives_Place_TrainingMine: ACE_Explosives_Place { + displayName = "TrainingMine"; + model = "\A3\Weapons_F_Orange\Explosives\TrainingMine_F"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0, 0, 0.15]"; + }; + }; + }; + + class ACE_Explosives_Place_SLAM: ACE_Explosives_Place { displayName = "SLAM"; model = "\A3\Weapons_F\Explosives\mine_SLAM_directional"; diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index 822a04aeaf..1944918df7 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -51,6 +51,13 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhe }; }; +if (isNull (_item select 0)) then { + WARNING_1("Explosive is null [%1]",_this); +}; +if ((getNumber (configFile >> "CfgAmmo" >> (typeOf (_item select 0)) >> "triggerWhenDestroyed")) != 1) then { + WARNING_1("Explosive is not triggerWhenDestroyed [%1]",typeOf (_item select 0)); +}; + [QGVAR(detonate), [_unit, _item select 0, _item select 1]] call CBA_fnc_serverEvent; _result