diff --git a/addons/explosives/ACE_Medical_Injuries.hpp b/addons/explosives/ACE_Medical_Injuries.hpp new file mode 100644 index 00000000000..ef316361531 --- /dev/null +++ b/addons/explosives/ACE_Medical_Injuries.hpp @@ -0,0 +1,13 @@ +class ACE_Medical_Injuries { + class damageTypes { + class woundHandlers; + class explosive { + class woundHandlers: woundHandlers {}; + }; + class GVAR(toePopper): explosive { + class woundHandlers: woundHandlers { + ADDON = QFUNC(woundsHandlerToePopper); + }; + }; + }; +}; diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index ae67e4fe284..e009e9a1eee 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -175,6 +175,9 @@ class CfgAmmo { GVAR(defuseObjectPosition)[] = {0.0, -0.05, 0.15}; }; class APERSMine_Range_Ammo; + class ACE_APERSMine_ToePopper_Ammo: APERSMine_Range_Ammo { + ACE_damageType = QGVAR(toePopper); + }; class TrainingMine_Ammo: APERSMine_Range_Ammo { GVAR(magazine) = "TrainingMine_Mag"; GVAR(size) = 0; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 71e374be1d5..3a16d3eed62 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -29,6 +29,10 @@ class CfgMagazines { }; }; }; + class ACE_APERSMine_ToePopper_Mag: APERSMine_Range_Mag { + displayName = CSTRING(apersToePopper); + ammo = "ACE_APERSMine_ToePopper_Ammo"; + }; class APERSTripMine_Wire_Mag: ATMine_Range_Mag { GVAR(setupObject) = "ACE_Explosives_Place_APERSTripwireMine"; class ACE_Triggers { diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index bf3eb1b12bd..a7066793a18 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -380,6 +380,12 @@ class CfgVehicles { class APERSBoundingMine: MineBase { ammo = "ACE_APERSBoundingMine_Range_Ammo"; }; + class APERSMine; + class ACE_APERSMine_ToePopper: APERSMine { + author = ECSTRING(common,aceteam); + ammo = "ACE_APERSMine_ToePopper_Ammo"; + displayName = CSTRING(apersToePopper); + }; class DemoCharge_F: MineBase { ammo = "ACE_DemoCharge_Remote_Ammo"; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 5c81cb9aec0..b5c91aaeb88 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { muzzles[] += {QGVAR(muzzle)}; class PutMuzzle: Default {}; class GVAR(muzzle): PutMuzzle { - magazines[] = {"ACE_FlareTripMine_Mag"}; + magazines[] = {"ACE_FlareTripMine_Mag", "ACE_APERSMine_ToePopper_Mag"}; }; }; diff --git a/addons/explosives/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp index 444b9db2ea0..d7c9e8824c3 100644 --- a/addons/explosives/XEH_PREP.hpp +++ b/addons/explosives/XEH_PREP.hpp @@ -41,3 +41,4 @@ PREP(triggerType); PREP(allowDefuse); PREP(isAllowedDefuse); PREP(checkDetonateHandlers); +PREP(woundsHandlerToePopper); diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index 00909533ac9..f5a17d44514 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -25,6 +25,7 @@ class CfgPatches { #include "ACE_Triggers.hpp" #include "ACE_Arsenal_Stats.hpp" +#include "ACE_Medical_Injuries.hpp" // UI stuff class RscText; diff --git a/addons/explosives/functions/fnc_woundsHandlerToePopper.sqf b/addons/explosives/functions/fnc_woundsHandlerToePopper.sqf new file mode 100644 index 00000000000..d08bfd4be9c --- /dev/null +++ b/addons/explosives/functions/fnc_woundsHandlerToePopper.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Wound handler for the toe-popper ammo; only does damage to legs + * + * Arguments: + * 0: Unit + * 1: Damage + * + * Return Value: + * + * + * Example: + * [player, []] call ace_explosives_fnc_woundsHandlerToePopper + * + * Public: No + */ + +params ["", "_array"]; +TRACE_1("woundsHandlerToePopper",_this); + +_array = _array select { + _x params ["", "_part"]; + _part in ["LeftLeg", "RightLeg"] +}; + +_this set [1, _array]; + +_this + diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 86d2276a7b7..c69ed023c4a 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1209,5 +1209,8 @@ Zamanlayıcı Időzítő + + APERS Mine (Toe-Popper) + diff --git a/addons/realisticnames/compat_explosives/CfgMagazines.hpp b/addons/realisticnames/compat_explosives/CfgMagazines.hpp index 41a19345dbe..966735d1e04 100644 --- a/addons/realisticnames/compat_explosives/CfgMagazines.hpp +++ b/addons/realisticnames/compat_explosives/CfgMagazines.hpp @@ -6,4 +6,9 @@ class CfgMagazines { class ACE_DemoCharge_Remote_Mag_Throwable: ACE_SatchelCharge_Remote_Mag_Throwable { displayName = CSTRING(DemoChargeThrowable_Name); }; + + class APERSMine_Range_Mag; + class ACE_APERSMine_ToePopper_Mag: APERSMine_Range_Mag { + displayName = CSTRING(APERSMine_ToePopper_Name); + }; }; diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 44bb2d514c6..999f80bfeb0 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -188,6 +188,9 @@ VS-50 Anti-Personel Mayını VS-50 gyalogsági taposóakna + + VS-50 Anti-Personnel Mine (Toe-Popper) + PMR-3 Anti-Personnel Tripwire Mine PMR-3 Protipěchotní mina (drát)