diff --git a/addons/explosives/ACE_Settings.hpp b/addons/explosives/ACE_Settings.hpp
index 038f06291d..ef6a723d5b 100644
--- a/addons/explosives/ACE_Settings.hpp
+++ b/addons/explosives/ACE_Settings.hpp
@@ -7,4 +7,10 @@ class ACE_Settings {
value = 1;
typeName = "BOOL";
};
+ class GVAR(ExplodeOnDefuse) {
+ displayName = CSTRING(ExplodeOnDefuse_DisplayName);
+ description = CSTRING(ExplodeOnDefuse_Description);
+ value = 1;
+ typeName = "BOOL";
+ };
};
diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp
index c6d70bc64a..8299a979b3 100644
--- a/addons/explosives/CfgAmmo.hpp
+++ b/addons/explosives/CfgAmmo.hpp
@@ -69,25 +69,52 @@ class CfgAmmo {
/*class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo;
class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo;*/
-
+
class IEDUrbanBig_Remote_Ammo: PipeBombBase {
- mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
- soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
+ ACE_explodeOnDefuse = 0.02;
+ soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
};
- class IEDLandBig_Remote_Ammo: PipeBombBase {
+ class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo {
+ mineTrigger = "RemoteTrigger";
+ };
+ class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo {
mineTrigger = "RangeTrigger";
- triggerWhenDestroyed = 1;
- soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
};
+
class IEDUrbanSmall_Remote_Ammo: PipeBombBase {
- mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
- soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
+ ACE_explodeOnDefuse = 0.02;
+ soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
+ };
+ class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo {
+ mineTrigger = "RemoteTrigger";
};
- class IEDLandSmall_Remote_Ammo: PipeBombBase {
+ class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo {
mineTrigger = "RangeTrigger";
+ };
+
+ class IEDLandBig_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
- soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
+ ACE_explodeOnDefuse = 0.02;
+ soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
+ };
+ class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo {
+ mineTrigger = "RemoteTrigger";
+ };
+ class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo {
+ mineTrigger = "RangeTrigger";
+ };
+
+ class IEDLandSmall_Remote_Ammo: PipeBombBase {
+ triggerWhenDestroyed = 1;
+ ACE_explodeOnDefuse = 0.02;
+ soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
+ };
+ class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo {
+ mineTrigger = "RemoteTrigger";
+ };
+ class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo {
+ mineTrigger = "RangeTrigger";
};
};
diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp
index 03162ef4ae..39d08917c3 100644
--- a/addons/explosives/CfgMagazines.hpp
+++ b/addons/explosives/CfgMagazines.hpp
@@ -96,45 +96,51 @@ class CfgMagazines {
};
};
};
-
+
class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig";
class ACE_Triggers {
- SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
+ SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
class Command {
FuseTime = 0.5;
+ ammo = "IEDUrbanBig_Command_Ammo";
};
class DeadmanSwitch:Command {};
class Cellphone:Command {};
class PressurePlate {
- displayName = CSTRING(SLAME_Magnetic);
+ displayName = CSTRING(PressurePlate);
digDistance = 0;
- ammo = "IEDUrbanBig_Remote_Ammo";
+ ammo = "IEDUrbanBig_Range_Ammo";
pitch = 0;
};
- };
+ };
};
+
class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig";
class ACE_Triggers: ACE_Triggers {
+ class Command: Command {
+ ammo = "IEDLandBig_Command_Ammo";
+ };
class PressurePlate: PressurePlate {
- ammo = "IEDLandBig_Remote_Ammo";
+ ammo = "IEDLandBig_Range_Ammo";
};
};
};
class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall";
class ACE_Triggers {
- SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
+ SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
class Command {
FuseTime = 0.5;
+ ammo = "IEDUrbanSmall_Command_Ammo";
};
class DeadmanSwitch: Command {};
class Cellphone: Command {};
class PressurePlate {
- displayName = CSTRING(SLAME_Magnetic);
+ displayName = CSTRING(PressurePlate);
digDistance = 0;
- ammo = "IEDUrbanSmall_Remote_Ammo";
+ ammo = "IEDUrbanSmall_Range_Ammo";
pitch = 0;
};
};
@@ -142,8 +148,11 @@ class CfgMagazines {
class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall";
class ACE_Triggers: ACE_Triggers {
+ class Command: Command {
+ ammo = "IEDLandSmall_Command_Ammo";
+ };
class PressurePlate: PressurePlate {
- ammo = "IEDLandSmall_Remote_Ammo";
+ ammo = "IEDLandSmall_Range_Ammo";
};
};
};
diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp
index d5bad207a5..239ecd4e17 100644
--- a/addons/explosives/CfgModule.hpp
+++ b/addons/explosives/CfgModule.hpp
@@ -20,6 +20,12 @@ class ACE_ModuleExplosive: ACE_Module {
typeName = "BOOL";
defaultValue = 1;
};
+ class ExplodeOnDefuse {
+ displayName = "$STR_ACE_Explosive_ExplodeOnDefuse_DisplayName";
+ description = "$STR_ACE_Explosive_ExplodeOnDefuse_Description";
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
};
class ModuleDescription {
description = CSTRING(Module_Description);
diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf
index 28a14b25a5..e0c7f7c85d 100644
--- a/addons/explosives/functions/fnc_defuseExplosive.sqf
+++ b/addons/explosives/functions/fnc_defuseExplosive.sqf
@@ -17,7 +17,7 @@
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_unit,_explosive);
-if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith {
+if (GVAR(ExplodeOnDefuse) && (random 1.0) < getNumber(ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse")) exitWith {
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
};
diff --git a/addons/explosives/functions/fnc_module.sqf b/addons/explosives/functions/fnc_module.sqf
index 4080b41bde..56225d8ca8 100644
--- a/addons/explosives/functions/fnc_module.sqf
+++ b/addons/explosives/functions/fnc_module.sqf
@@ -27,5 +27,7 @@ if !(_activated) exitWith {};
call EFUNC(Common,readSettingFromModule);
[_logic, QGVAR(PunishNonSpecialists),"PunishNonSpecialists"]
call EFUNC(Common,readSettingFromModule);
+[_logic, QGVAR(ExplodeOnDefuse),"ExplodeOnDefuse"]
+ call EFUNC(Common,readSettingFromModule);
diag_log text "[ACE]: Explosive Module Initialized.";
diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml
index da6759386d..abd6d83e26 100644
--- a/addons/explosives/stringtable.xml
+++ b/addons/explosives/stringtable.xml
@@ -540,6 +540,12 @@
Entschärfungszeit für Nicht-Sprengstoffexperten erhöhen? Standard: Ja
Zvýšit čas potřebný k dokončení akce pokud není specialista? Výchozí: Ano
+
+ Explode on defusal?
+
+
+ Enable certain explosives to explode on defusal? Default: Yes
+
Moduł ten pozwala dostosować opcje związane z ładunkami wybuchowymi, ich podkładaniem oraz rozbrajaniem.
@@ -547,4 +553,4 @@
Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin.
-
\ No newline at end of file
+