Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various explosives enhancements #3151

Merged
merged 22 commits into from
Feb 4, 2016
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 46 additions & 28 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,45 @@ 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 {
GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary, won't it be inherited from the parent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, you're right. I added that because I thought there was something that didn't work properly. Turns out it was the wrong config in getConfig ... -.-

};

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;
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;
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 +76,69 @@ 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 {
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;
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";
};
};
63 changes: 32 additions & 31 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,90 @@ 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 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";
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";
};
};
};
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 {
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 PressurePlate: PressurePlate {
ammo = "IEDLandSmall_Range_Ammo";
ammo = "ACE_IEDLandSmall_Range_Ammo";
};
};
};
Expand Down
Loading