diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index 952f360f22..280906432f 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -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); diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 843ecdb8e3..977e01e3af 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -3,7 +3,7 @@ class CfgAmmo { class Default; class TimeBombCore: Default { - ACE_DefuseTime = 5; + GVAR(DefuseTime) = 5; }; /* class BoundingMineCore: TimeBombCore; @@ -29,12 +29,13 @@ 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}; @@ -42,23 +43,29 @@ class CfgAmmo { 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}; @@ -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"; }; }; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 686dd83ee8..eec0dadfa3 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -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 { @@ -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 { @@ -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 { @@ -31,7 +31,7 @@ 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; @@ -39,10 +39,10 @@ class CfgMagazines { }; 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 { @@ -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; }; @@ -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"; - }; - class DeadmanSwitch:Command {}; - class Cellphone:Command {}; - class PressurePlate { - displayName = CSTRING(PressurePlate); - digDistance = 0; - 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_Range_Ammo"; - }; - }; - }; - class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall"; - class ACE_Triggers { - SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; - class Command { - FuseTime = 0.5; - ammo = "IEDUrbanSmall_Command_Ammo"; + ammo = "ACE_IEDUrbanBig_Command_Ammo"; }; class DeadmanSwitch: Command {}; class Cellphone: Command {}; class PressurePlate { displayName = CSTRING(PressurePlate); digDistance = 0; - ammo = "IEDUrbanSmall_Range_Ammo"; + ammo = "ACE_IEDUrbanBig_Range_Ammo"; + pitch = 0; + }; + }; + }; + class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag { + 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 = "ACE_IEDLandBig_Command_Ammo"; + }; + class DeadmanSwitch: Command {}; + class Cellphone: Command {}; + class PressurePlate: PressurePlate { + ammo = "ACE_IEDLandBig_Range_Ammo"; + }; + }; + }; + class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { + 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 = "ACE_IEDUrbanSmall_Command_Ammo"; + }; + class DeadmanSwitch: Command {}; + class Cellphone: Command {}; + class PressurePlate { + displayName = CSTRING(PressurePlate); + digDistance = 0; + 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"; }; }; }; diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 38e44ee4cb..9be3a936e5 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -108,7 +108,7 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_DemoCharge:ACE_Explosives_Place { + class ACE_Explosives_Place_DemoCharge: ACE_Explosives_Place { displayName = "Demo Charge"; model = "\A3\Weapons_F\explosives\c4_charge_small_d"; class ACE_Actions: ACE_Actions { @@ -117,15 +117,15 @@ class CfgVehicles { }; }; }; - class ACE_Explosives_Place_APERSBoundingMine:ACE_Explosives_Place { + class ACE_Explosives_Place_APERSBoundingMine: ACE_Explosives_Place { displayName = "APERS Bounding Mine"; model = "\A3\Weapons_F\explosives\mine_AP_bouncing"; }; - class ACE_Explosives_Place_APERSMine:ACE_Explosives_Place { + class ACE_Explosives_Place_APERSMine: ACE_Explosives_Place { displayName = "APERS Mine"; model = "\A3\Weapons_F\explosives\mine_ap"; }; - class ACE_Explosives_Place_APERSTripwireMine:ACE_Explosives_Place { + class ACE_Explosives_Place_APERSTripwireMine: ACE_Explosives_Place { displayName = "APERS Tripwire Mine"; model = "\A3\Weapons_F\explosives\mine_AP_tripwire"; class ACE_Actions: ACE_Actions { @@ -135,12 +135,12 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_ATMine:ACE_Explosives_Place { + class ACE_Explosives_Place_ATMine: ACE_Explosives_Place { displayName = "AT Mine"; model = "\A3\Weapons_f\Explosives\mine_at"; }; - class ACE_Explosives_Place_Claymore:ACE_Explosives_Place { + class ACE_Explosives_Place_Claymore: ACE_Explosives_Place { displayName = "Claymore"; model = "\A3\Weapons_F\explosives\mine_AP_miniclaymore"; class ACE_Actions: ACE_Actions { @@ -150,7 +150,7 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_SatchelCharge:ACE_Explosives_Place { + class ACE_Explosives_Place_SatchelCharge: ACE_Explosives_Place { displayName = "Satchel Charge"; model = "\A3\Weapons_F\Explosives\satchel"; class ACE_Actions: ACE_Actions { @@ -160,28 +160,28 @@ class CfgVehicles { }; }; - class ACE_Explosives_Place_SLAM:ACE_Explosives_Place { + class ACE_Explosives_Place_SLAM: ACE_Explosives_Place { displayName = "SLAM"; model = "\A3\Weapons_F\Explosives\mine_SLAM_directional"; }; // IEDs - class ACE_Explosives_Place_IEDUrbanBig:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDUrbanBig: ACE_Explosives_Place { displayName = "IED Urban Big"; model = "\A3\Weapons_F\Explosives\IED_urban_big"; }; - class ACE_Explosives_Place_IEDLandBig:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDLandBig: ACE_Explosives_Place { displayName = "IED Land Big"; model = "\A3\Weapons_F\Explosives\IED_land_big"; }; - class ACE_Explosives_Place_IEDUrbanSmall:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDUrbanSmall: ACE_Explosives_Place { displayName = "IED Urban Small"; model = "\A3\Weapons_F\Explosives\IED_urban_small"; }; - class ACE_Explosives_Place_IEDLandSmall:ACE_Explosives_Place { + class ACE_Explosives_Place_IEDLandSmall: ACE_Explosives_Place { displayName = "IED Land Small"; model = "\A3\Weapons_F\Explosives\IED_land_small"; }; @@ -329,4 +329,77 @@ class CfgVehicles { class O_Soldier_sniper_base_F; class O_sniper_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; class O_spotter_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + + // Editor placed mines + class MineBase; + class SLAMDirectionalMine: MineBase { + displayName = CSTRING(Module_SLAMSideAttack_DisplayName); + }; + class ACE_SLAMBottomMine: SLAMDirectionalMine { + author = ECSTRING(common,aceteam); + ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; + displayName = CSTRING(Module_SLAMBottomAttack_DisplayName); + // TODO: Find a way to place the mine laying down instead of standing up + }; + + class IEDUrbanBig_F; + class ACE_IEDUrbanBig_Range: IEDUrbanBig_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDUrbanBig_Range_Ammo"; + displayName = CSTRING(Module_IEDUrbanBig_Range_DisplayName); + }; + class IEDLandBig_F; + class ACE_IEDLandBig_Range: IEDLandBig_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDLandBig_Range_Ammo"; + displayName = CSTRING(Module_IEDLandBig_Range_DisplayName); + }; + class IEDUrbanSmall_F; + class ACE_IEDUrbanSmall_Range: IEDUrbanSmall_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDUrbanSmall_Range_Ammo"; + displayName = CSTRING(Module_IEDUrbanSmall_Range_DisplayName); + }; + class IEDLandSmall_F; + class ACE_IEDLandSmall_Range: IEDLandSmall_F { + author = ECSTRING(common,aceteam); + ammo = "ACE_IEDLandSmall_Range_Ammo"; + displayName = CSTRING(Module_IEDLandSmall_Range_DisplayName); + }; + + // Zeus placed mines + class ModuleMine_F; + class ModuleMine_SLAMDirectionalMine_F: ModuleMine_F { + displayName = CSTRING(Module_SLAMSideAttack_DisplayName); + }; + class ACE_ModuleMine_SLAMBottomMine: ModuleMine_SLAMDirectionalMine_F { + author = ECSTRING(common,aceteam); + displayName = CSTRING(Module_SLAMBottomAttack_DisplayName); + explosive = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; + icon = "iconExplosiveGP"; + }; + class ModuleExplosive_IEDUrbanBig_F; + class ACE_ModuleExplosive_IEDUrbanBig_Range: ModuleExplosive_IEDUrbanBig_F { + author = ECSTRING(common,aceteam); + displayName = CSTRING(Module_IEDUrbanBig_Range_DisplayName); + explosive = "ACE_IEDUrbanBig_Range_Ammo"; + }; + class ModuleExplosive_IEDLandBig_F; + class ACE_ModuleExplosive_IEDLandBig_Range: ModuleExplosive_IEDLandBig_F { + author = ECSTRING(common,aceteam); + displayName = CSTRING(Module_IEDLandBig_Range_DisplayName); + explosive = "ACE_IEDLandBig_Range_Ammo"; + }; + class ModuleExplosive_IEDUrbanSmall_F; + class ACE_ModuleExplosive_IEDUrbanSmall_Range: ModuleExplosive_IEDUrbanSmall_F { + author = ECSTRING(common,aceteam); + displayName = CSTRING(Module_IEDUrbanSmall_Range_DisplayName); + explosive = "ACE_IEDUrbanSmall_Range_Ammo"; + }; + class ModuleExplosive_IEDLandSmall_F; + class ACE_ModuleExplosive_IEDLandSmall_Range: ModuleExplosive_IEDLandSmall_F { + author = ECSTRING(common,aceteam); + displayName = CSTRING(Module_IEDLandSmall_Range_DisplayName); + explosive = "ACE_IEDLandSmall_Range_Ammo"; + }; }; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index f6ee8ec65e..cd900b2da3 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -13,8 +13,9 @@ class CfgWeapons { descriptionShort = CSTRING(clacker_description); picture = PATHTOF(Data\UI\Clacker.paa); model = QUOTE(PATHTOF(data\ace_m57.p3d)); - ACE_Range = 250; - ACE_Detonator = 1; + GVAR(Range) = 250; + GVAR(Detonator) = 1; + GVAR(triggerType) = "Command"; class ItemInfo: ACE_ExplosiveItem { mass = 3; @@ -22,9 +23,10 @@ class CfgWeapons { }; }; class ACE_M26_Clacker: ACE_Clacker { - displayName = CSTRING(M26_displayName); + displayName = CSTRING(M152_Clacker_displayName); picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); - ACE_Range = 5000; + GVAR(Range) = 5000; + GVAR(triggerType) = "MK16_Transmitter"; }; class ACE_DefusalKit: ACE_ItemCore { scope = 2; @@ -44,8 +46,9 @@ class CfgWeapons { descriptionShort = CSTRING(DeadManSwitch_description); picture = PATHTOF(Data\UI\DeadmanSwitch.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; - ACE_Range = 100; - ACE_Detonator = 1; + GVAR(Range) = 100; + GVAR(Detonator) = 1; + GVAR(triggerType) = "DeadManSwitch"; class ItemInfo: ACE_ExplosiveItem { mass = 2; @@ -58,8 +61,9 @@ class CfgWeapons { descriptionShort = CSTRING(cellphone_description); picture = PATHTOF(Data\UI\Cellphone_UI.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; - ACE_Range = 15000; - ACE_Detonator = 1; + GVAR(Range) = 15000; + GVAR(Detonator) = 1; + GVAR(triggerType) = "Cellphone"; class ItemInfo: ACE_ExplosiveItem { mass = 2; diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index af105b5879..651f704a6a 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -36,6 +36,16 @@ GVAR(Setup) = objNull; GVAR(pfeh_running) = false; GVAR(CurrentSpeedDial) = 0; +// Properly angle preplaced bottom-attack SLAMs +{ + if (local _x) then { + switch (typeOf _x) do { + case ("ACE_SLAMDirectionalMine_Magnetic_Ammo"): { + [_x, getDir _x, 90] call FUNC(setPosition); + }; + }; + }; +} forEach allMines; ["interactMenuOpened", { //Cancel placement if interact menu opened diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 0568fbdd2f..1facffccb3 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -26,6 +26,7 @@ PREP(addTransmitterActions); PREP(addTriggerActions); PREP(canDefuse); PREP(canDetonate); +PREP(connectExplosive); PREP(defuseExplosive); PREP(detonateExplosive); PREP(detonateExplosiveAll); diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index 99544213d3..3fc047fa6a 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - units[] = {}; + units[] = {"ACE_ModuleMine_SLAMBottomMine", "ACE_ModuleExplosive_IEDUrbanBig_Range", "ACE_ModuleExplosive_IEDLandBig_Range", "ACE_ModuleExplosive_IEDUrbanSmall_Range", "ACE_ModuleExplosive_IEDLandSmall_Range"}; weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch", "ACE_Cellphone"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; @@ -37,7 +37,7 @@ class CfgActions { class CfgMineTriggers { class RangeTrigger; - class MagneticTrigger: RangeTrigger { + class ACE_MagneticTrigger: RangeTrigger { mineMagnetic = 1; mineTriggerRange = 1; }; diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf index 2af4d6e772..0d09284d52 100644 --- a/addons/explosives/functions/fnc_addDetonateActions.sqf +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -21,7 +21,7 @@ TRACE_2("params",_unit,_detonator); private ["_result", "_item", "_children", "_range", "_required","_explosivesList"]; -_range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range"); +_range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> QGVAR(Range)); _result = [_unit] call FUNC(getPlacedExplosives); _children = []; diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf index fa00fdd207..e744af6bce 100644 --- a/addons/explosives/functions/fnc_addExplosiveActions.sqf +++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf @@ -22,7 +22,7 @@ _list = []; _itemCount = []; { _item = ConfigFile >> "CfgMagazines" >> _x; - if (getNumber(_item >> "ACE_Placeable") == 1) then { + if (getNumber(_item >> QGVAR(Placeable)) == 1) then { _index = _list find _item; if (_index != -1) then { _itemCount set [_index, (_itemCount select _index) + 1]; diff --git a/addons/explosives/functions/fnc_connectExplosive.sqf b/addons/explosives/functions/fnc_connectExplosive.sqf new file mode 100644 index 0000000000..aab7ca2c4d --- /dev/null +++ b/addons/explosives/functions/fnc_connectExplosive.sqf @@ -0,0 +1,27 @@ +/* + * Author: VKing + * Add preplaced explosives to a unit's detonator. + * + * Arguments: + * 0: Unit + * 1: Explosive object + * 2: Detonator type + * + * Return Value: + * None + * + * Example: + * [player, claymore1, "ACE_Clacker"] call ace_explosives_fnc_connectExplosive + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit", "_object", "_detonator"]; +TRACE_3("Params",_unit,_object,_detonator); + +private _detonatorConfig = getText (configFile >> "CfgWeapons" >> _detonator >> QGVAR(triggerType)); + +private _magazineClass = getText (configFile >> "CfgAmmo" >> typeOf _object >> QGVAR(magazine)); + +[_unit, _object, _magazineClass, [configFile >> "ACE_Triggers" >> _detonatorConfig]] call FUNC(addClacker); diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index d8a52df9ee..147d722987 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -19,7 +19,7 @@ params ["_unit", "_explosive"]; TRACE_2("params",_unit,_explosive); -if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse"))}) exitWith { +if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith { TRACE_1("exploding on defuse",_explosive); [_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive); [QGVAR(explodeOnDefuse), [_explosive, _unit]] call EFUNC(common,globalEvent); diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index d204ad7bad..a01f181635 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -33,7 +33,7 @@ if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRA if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then { private ["_exp", "_previousExp"]; _previousExp = _item select 0; - _exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> "ACE_Explosive"); + _exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> QGVAR(Explosive)); if (_exp != "") then { _exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"]; _exp setDir (getDir _previousExp); diff --git a/addons/explosives/functions/fnc_getDetonators.sqf b/addons/explosives/functions/fnc_getDetonators.sqf index 54c942e9de..22360c875e 100644 --- a/addons/explosives/functions/fnc_getDetonators.sqf +++ b/addons/explosives/functions/fnc_getDetonators.sqf @@ -26,7 +26,7 @@ _result = []; { _config = ConfigFile >> "CfgWeapons" >> _x; - if (getNumber (_config >> "ACE_Detonator") == 1 && {!(_x in _result)}) then { + if (getNumber (_config >> QGVAR(Detonator)) == 1 && {!(_x in _result)}) then { _result pushBack _x; }; } forEach _items; diff --git a/addons/explosives/functions/fnc_hasExplosives.sqf b/addons/explosives/functions/fnc_hasExplosives.sqf index 4a626e9c63..c9da5e59d1 100644 --- a/addons/explosives/functions/fnc_hasExplosives.sqf +++ b/addons/explosives/functions/fnc_hasExplosives.sqf @@ -23,7 +23,7 @@ private ["_result", "_magazines"]; _result = false; _magazines = magazines _unit; { - if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith { + if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> QGVAR(Placeable)) == 1) exitWith { _result = true; }; } count _magazines; diff --git a/addons/explosives/functions/fnc_onInventoryChanged.sqf b/addons/explosives/functions/fnc_onInventoryChanged.sqf index 127cd8c105..889e9e2186 100644 --- a/addons/explosives/functions/fnc_onInventoryChanged.sqf +++ b/addons/explosives/functions/fnc_onInventoryChanged.sqf @@ -26,7 +26,7 @@ private ["_config", "_detonators"]; if (_receiver != ace_player) exitWith {}; _config = ConfigFile >> "CfgWeapons" >> _item; -if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then { +if (isClass _config && {getNumber(_config >> QGVAR(Detonator)) == 1}) then { private ["_clackerItems"]; _clackerItems = _giver getVariable [QGVAR(Clackers), []]; _receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true]; diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index f8b4cbb9d7..b1fdf7216b 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -27,7 +27,7 @@ TRACE_3("params",_vehicle,_unit,_magClassname); private["_isAttachable", "_setupObjectClass", "_supportedTriggers", "_p3dModel"]; //Get setup object vehicle and model: -_setupObjectClass = getText(ConfigFile >> "CfgMagazines" >> _magClassname >> "ACE_SetupObject"); +_setupObjectClass = getText(ConfigFile >> "CfgMagazines" >> _magClassname >> QGVAR(SetupObject)); if (!isClass (configFile >> "CfgVehicles" >> _setupObjectClass)) exitWith {ERROR("Bad Vehicle");}; _p3dModel = getText (configFile >> "CfgVehicles" >> _setupObjectClass >> "model"); if (_p3dModel == "") exitWith {ERROR("No Model");}; //"" - will crash game! diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index 2c394a997a..84d7274069 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -28,8 +28,8 @@ _fnc_DefuseTime = { TRACE_2("defuseTime",_specialist,_target); private ["_defuseTime"]; _defuseTime = 5; - if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime")) then { - _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime"); + if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime))) then { + _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime)); }; if (!_specialist && {GVAR(PunishNonSpecialists)}) then { _defuseTime = _defuseTime * 1.5; diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index a25ab5b0d9..83af057d7c 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -184,19 +184,19 @@ Usado para acionar explosivos remotamente Используется для удаленной детонации зарядов - - M26 Firing Device - M26 Zündvorrichtung - Dispositivo de detonación MK26 - Zapalnik M26 - Dispositif de mise à feu M26 - Odpalovací zařízení M26 - Detonatore M26 - M26 Gyújtóeszköz - M26 Dispositivo de Detonação - Взрыватель M26 + + M152 Firing Device + M152 Zündvorrichtung + Dispositivo de detonación M152 + Zapalnik M152 + Dispositif de mise à feu M152 + Odpalovací zařízení M152 + Detonatore M152 + M152 Gyújtóeszköz + M152 Dispositivo de Detonação + Взрыватель M152 - + M152 RAMS M152 RAMS M152 RAMS @@ -620,5 +620,71 @@ Этот модуль управляет настройками, связанными со взрывными устройствами Este módulo ajusta las configuraciones relacionadas con explosivos. + + M6 SLAM Mine (Bottom Attack) + + + + + + + + + + + M6 SLAM Mine (Side Attack) + + + + + + + + + + + Large IED (Urban, Pressure Plate) + + + + + + + + + + + Large IED (Dug-in, Pressure Plate) + + + + + + + + + + + Small IED (Urban, Pressure Plate) + + + + + + + + + + + Small IED (Dug-in, Pressure Plate) + + + + + + + + + \ No newline at end of file