Skip to content

Commit

Permalink
Merge pull request #3151 from acemod/explosives_cleanup_plus_minetrig…
Browse files Browse the repository at this point in the history
…gers

Various explosives enhancements
  • Loading branch information
thojkooi committed Feb 4, 2016
2 parents e0946c3 + 9501c54 commit 8c9523e
Show file tree
Hide file tree
Showing 19 changed files with 310 additions and 112 deletions.
8 changes: 4 additions & 4 deletions addons/explosives/ACE_Triggers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
displayName = CSTRING(M152_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);
Expand Down
69 changes: 40 additions & 29 deletions addons/explosives/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class CfgAmmo {
class Default;

class TimeBombCore: Default {
ACE_DefuseTime = 5;
GVAR(DefuseTime) = 5;
};
/*
class BoundingMineCore: TimeBombCore;
Expand All @@ -29,36 +29,43 @@ class CfgAmmo {
*/
class DirectionalBombBase;
class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase {
ACE_Explosive = "ClaymoreDirectionalMine_Remote_Ammo_Scripted";
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 {};

class APERSTripMine_Wire_Ammo: DirectionalBombBase {
GVAR(defuseObjectPosition[]) = {-1.415, 0, 0.12};
};

class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase {
indirectHitRange = 20;
ACE_explodeOnDefuse = 1;
GVAR(explodeOnDefuseChance) = 1;
GVAR(magazine) = "SLAMDirectionalMine_Wire_Mag";
};
class SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo {
class ACE_SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "RemoteTrigger";
ACE_explodeOnDefuse = 0;
GVAR(explodeOnDefuseChance) = 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";
GVAR(explodeOnDefuseChance) = 0;
explosionAngle = 360;
indirectHitRange = 1;
mineInconspicuousness = 25;
icon = "iconExplosiveGP";
};

class PipeBombBase;
class DemoCharge_Remote_Ammo: PipeBombBase {
ACE_Explosive = "DemoCharge_Remote_Ammo_Scripted";
GVAR(magazine) = "DemoCharge_Remote_Mag";
GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted";
GVAR(defuseObjectPosition[]) = {0.07, 0, 0.055};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
Expand All @@ -67,60 +74,64 @@ class CfgAmmo {
indirectHitRange = 7;
};
class SatchelCharge_Remote_Ammo: PipeBombBase {
ACE_Explosive = "SatchelCharge_Remote_Ammo_Scripted";
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 {};
// class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo {};

class IEDUrbanBig_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
GVAR(magazine) = "IEDUrbanBig_Remote_Mag";
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";
};

class IEDUrbanSmall_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
GVAR(magazine) = "IEDUrbanSmall_Remote_Mag";
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 = "RangeTriggerShort";
};

class IEDLandBig_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
GVAR(magazine) = "IEDLandBig_Remote_Mag";
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";
};

class IEDLandSmall_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
GVAR(magazine) = "IEDLandSmall_Remote_Mag";
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";
};
};
74 changes: 40 additions & 34 deletions addons/explosives/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -31,18 +31,18 @@ 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;
};
};

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 {
Expand All @@ -53,12 +53,12 @@ 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"};
SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"};
class Timer {
FuseTime = 0.5;
};
Expand All @@ -70,89 +70,95 @@ 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"};
SupportedTriggers[] = {"IRSensor", "PressurePlate", "Timer", "Command", "MK16_Transmitter"};
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;
};
class MK16_Transmitter: Command {};
};
};

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 {
FuseTime = 0.5;
ammo = "IEDUrbanBig_Command_Ammo";
ammo = "ACE_IEDUrbanBig_Command_Ammo";
};
class DeadmanSwitch:Command {};
class Cellphone:Command {};
class DeadmanSwitch: Command {};
class Cellphone: Command {};
class PressurePlate {
displayName = CSTRING(PressurePlate);
digDistance = 0;
ammo = "IEDUrbanBig_Range_Ammo";
ammo = "ACE_IEDUrbanBig_Range_Ammo";
pitch = 0;
};
};
};

class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig";
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 = "IEDLandBig_Command_Ammo";
ammo = "ACE_IEDLandBig_Command_Ammo";
};
class DeadmanSwitch: Command {};
class Cellphone: Command {};
class PressurePlate: PressurePlate {
ammo = "IEDLandBig_Range_Ammo";
ammo = "ACE_IEDLandBig_Range_Ammo";
};
};
};
class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall";
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 {
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;
};
};
};
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 = "IEDLandSmall_Command_Ammo";
ammo = "ACE_IEDLandSmall_Command_Ammo";
};
class DeadmanSwitch: Command {};
class Cellphone: Command {};
class PressurePlate: PressurePlate {
ammo = "IEDLandSmall_Range_Ammo";
ammo = "ACE_IEDLandSmall_Range_Ammo";
};
};
};
Expand Down
Loading

0 comments on commit 8c9523e

Please sign in to comment.