Merge pull request #1440 from legman/akalegman

IED Class Inheritance Fixes
This commit is contained in:
Nicolás Badano 2015-06-16 13:35:19 -03:00
commit 2afcf92643
7 changed files with 78 additions and 22 deletions

View File

@ -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";
};
};

View File

@ -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";
};
};

View File

@ -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";
};
};
};

View File

@ -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);

View File

@ -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);
};

View File

@ -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.";

View File

@ -540,6 +540,12 @@
<German>Entschärfungszeit für Nicht-Sprengstoffexperten erhöhen? Standard: Ja</German>
<Czech>Zvýšit čas potřebný k dokončení akce pokud není specialista? Výchozí: Ano</Czech>
</Key>
<Key ID="STR_ACE_Explosives_ExplodeOnDefuse_DisplayName">
<English>Explode on defusal?</English>
</Key>
<Key ID="STR_ACE_Explosives_ExplodeOnDefuse_Description">
<English>Enable certain explosives to explode on defusal? Default: Yes</English>
</Key>
<Key ID="STR_ACE_Explosives_Module_Description">
<English></English>
<Polish>Moduł ten pozwala dostosować opcje związane z ładunkami wybuchowymi, ich podkładaniem oraz rozbrajaniem.</Polish>
@ -547,4 +553,4 @@
<Czech>Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin.</Czech>
</Key>
</Package>
</Project>
</Project>