Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3.git into agmHearingPort

This commit is contained in:
Nicolás Badano 2015-01-14 00:09:27 -03:00
commit 0f4d8bc82f
140 changed files with 3903 additions and 3687 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,84 +0,0 @@
class CfgAmmo {
// All explosive based Ammo classes. Theses are all listed in case they are required.
class Default;
class TimeBombCore:Default {
AGM_DefuseTime = 5;
};
/*
class BoundingMineCore:TimeBombCore;
class BoundingMineBase:BoundingMineCore;
class APERSBoundingMine_Range_Ammo:BoundingMineBase;
class MineCore: TimeBombCore;
class MineBase:MineCore;
class APERSMine_Range_Ammo:MineBase;
class ATMine_Range_Ammo:MineBase;
class UnderwaterMine_Range_Ammo:MineBase;
class UnderwaterMineAB_Range_Ammo:UnderwaterMine_Range_Ammo;
class UnderwaterMinePDM_Range_Ammo:UnderwaterMine_Range_Ammo;
class DirectionalBombCore:TimeBombCore;
class DirectionalBombBase:DirectionalBombCore;
class APERSTripMine_Wire_Ammo:DirectionalBombBase;
class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase;
class PipeBombCore: TimeBombCore;
class PipeBombBase:PipeBombCore;
*/
class DirectionalBombBase;
class ClaymoreDirectionalMine_Remote_Ammo:DirectionalBombBase{
AGM_Explosive = "ClaymoreDirectionalMine_Remote_Ammo_Scripted";
soundActivation[] = {"",0,0,0};
soundDeactivation[] = {"",0,0,0};
};
//class ClaymoreDirectionalMine_Remote_Ammo_Scripted:ClaymoreDirectionalMine_Remote_Ammo;
class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase{
indirectHitRange = 20;
AGM_explodeOnDefuse = 1;
};
class SLAMDirectionalMine_Command_Ammo:SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "RemoteTrigger";
AGM_explodeOnDefuse = 0;
};
class SLAMDirectionalMine_Timer_Ammo:SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "TimeTrigger";
AGM_explodeOnDefuse = 0;
};
class SLAMDirectionalMine_Magnetic_Ammo:SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "MagneticTrigger";
};
class PipeBombBase;
class DemoCharge_Remote_Ammo:PipeBombBase{
AGM_Explosive = "DemoCharge_Remote_Ammo_Scripted";
soundActivation[] = {"",0,0,0};
soundDeactivation[] = {"",0,0,0};
hit = 500;
indirectHit = 500;
indirectHitRange = 7;
};
//class DemoCharge_Remote_Ammo_Scripted:DemoCharge_Remote_Ammo;
class SatchelCharge_Remote_Ammo:PipeBombBase{
AGM_Explosive = "SatchelCharge_Remote_Ammo_Scripted";
soundActivation[] = {"",0,0,0};
soundDeactivation[] = {"",0,0,0};
};
/*class SatchelCharge_Remote_Ammo_Scripted:SatchelCharge_Remote_Ammo;
class IEDLandBig_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
class IEDLandSmall_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
class IEDUrbanBig_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
class IEDUrbanSmall_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};*/
};

View File

@ -1,155 +0,0 @@
class CfgMagazines {
class CA_Magazine;
class ATMine_Range_Mag:CA_Magazine{
AGM_Placeable = 1;
useAction = 0;
AGM_SetupObject = "AGM_Explosives_Place_ATMine"; // CfgVehicle class for setup object.
AGM_DelayTime = 2.5;
class AGM_Triggers {
AGM_Triggers[] = {"PressurePlate"};
class PressurePlate {
digDistance = 0.1;
};
};
};
class APERSBoundingMine_Range_Mag:ATMine_Range_Mag{
AGM_SetupObject = "AGM_Explosives_Place_APERSBoundingMine";
class AGM_Triggers {
AGM_Triggers[] = {"PressurePlate"};
class PressurePlate {
digDistance = 0.075;
};
};
};
class APERSMine_Range_Mag:ATMine_Range_Mag{
AGM_SetupObject = "AGM_Explosives_Place_APERSMine";
class AGM_Triggers {
AGM_Triggers[] = {"PressurePlate"};
class PressurePlate {
digDistance = 0.05;
};
};
};
class APERSTripMine_Wire_Mag:ATMine_Range_Mag{
AGM_SetupObject = "AGM_Explosives_Place_APERSTripwireMine";
class AGM_Triggers {
AGM_Triggers[] = {"Tripwire"};
class Tripwire;
};
};
class ClaymoreDirectionalMine_Remote_Mag:CA_Magazine{
AGM_Placeable = 1;
useAction = 0;
AGM_SetupObject = "AGM_Explosives_Place_Claymore"; // CfgVehicle class for setup object.
AGM_DelayTime = 1.5;
class AGM_Triggers {
AGM_Triggers[] = {"Command"};
class Command {
FuseTime = 0.5;
};
};
};
class SatchelCharge_Remote_Mag:CA_Magazine{
AGM_Placeable = 1;
useAction = 0;
AGM_SetupObject = "AGM_Explosives_Place_SatchelCharge"; // CfgVehicle class for setup object.
AGM_DelayTime = 1;
class AGM_Triggers {
AGM_Triggers[] = {"Timer","Command", "MK16_Transmitter", "DeadmanSwitch"};
class Timer {
FuseTime = 0.5;
};
class Command {
FuseTime = 0.5;
};
class MK16_Transmitter:Command{};
class DeadmanSwitch:Command{};
};
};
class DemoCharge_Remote_Mag:SatchelCharge_Remote_Mag{
AGM_SetupObject = "AGM_Explosives_Place_DemoCharge"; // CfgVehicle class for setup object.
model = "\A3\Weapons_F\explosives\c4_charge_small_d";
};
class SLAMDirectionalMine_Wire_Mag: ATMine_Range_Mag{
AGM_SetupObject = "AGM_Explosives_Place_SLAM";
class AGM_Triggers {
AGM_Triggers[] = {"IRSensor","PressurePlate","Timer","Command"};
class PressurePlate{
displayName = $STR_AGM_Explosives_SLAME_Magnetic;
digDistance = 0;
ammo = "SLAMDirectionalMine_Magnetic_Ammo";
pitch = 90;
};
class IRSensor{
displayName = $STR_AGM_Explosives_SLAME_IRSensor;
};
class Timer {
ammo = "SLAMDirectionalMine_Timer_Ammo";
};
class Command {
ammo = "SLAMDirectionalMine_Command_Ammo";
fuseTime = 0.5;
};
};
};
};
class CfgAGM_Triggers {
/* onPlace parameters:
0: OBJECT - unit placing
1: OBJECT - Placed explosive
2: STRING - Magazine classname
3: ARRAY - vars
Last Index: CfgAGM_Triggers config of trigger type.
onSetup parameters:
0: STRING - Magazine Classname
*/
class Command {
displayName = $STR_AGM_Explosives_clacker_displayName;
picture = "\AGM_Explosives\Data\UI\Clacker.paa";
onPlace = "_this call AGM_Explosives_fnc_AddClacker;false";
requires[] = {"AGM_Clacker"};
};
class MK16_Transmitter:Command {
displayName = $STR_AGM_Explosives_MK16_displayName;
picture = "\AGM_Explosives\Data\UI\MK16_Reciever_ca.paa";
requires[] = {"AGM_M26_Clacker"};
};
class DeadManSwitch:Command {
displayName = $STR_AGM_Explosives_DeadManSwitch_displayName;
picture = "\AGM_Explosives\Data\UI\DeadmanSwitch.paa";
requires[] = {"AGM_DeadManSwitch"};
};
class PressurePlate {
displayName = $STR_AGM_Explosives_PressurePlate;
picture = "AGM_Explosives\data\UI\Pressure_plate.paa";
onPlace = "_dist=GetNumber(ConfigFile >> 'CfgMagazines' >> (_this select 2) >> 'AGM_Triggers' >> 'PressurePlate' >> 'digDistance');_ex=_this select 1;_ex setPosATL ((getPosATL _ex) vectorDiff ((VectorUp _ex) vectorCrossProduct [0,0,_dist]));false";
};
class IRSensor {
displayName = $STR_AGM_Explosives_IRSensor;
picture = "AGM_Explosives\data\UI\Pressure_plate.paa";
onPlace = "false";
};
class Timer {
displayName = $STR_AGM_Explosives_timerName;
picture = "AGM_Explosives\data\UI\Timer.paa";
onPlace = "[_this select 1, (_this select 3) select 0] call AGM_Explosives_fnc_startTimer;false";
onSetup = "_this call AGM_Explosives_fnc_openTimerSetUI;true";
};
class Tripwire {
displayName = $STR_AGM_Explosives_TripWire;
picture = "AGM_Explosives\data\UI\Tripwire.paa";
onPlace = "false";
};
};
class CfgMineTriggers {
class RangeTrigger;
class MagneticTrigger: RangeTrigger {
mineMagnetic = 1;
mineTriggerRange = 1;
};
};

View File

@ -1,65 +0,0 @@
//class thingX;
class Items_base_F;
class AGM_Explosives_Place: Items_base_F {
author = "AGM";
_generalMacro = "AGM_Explosives_Place";
displayName = "Multi-meter";
mapSize = 0.2;
icon = "iconObject_1x2";
model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d";
scope = 2;
scopeCurator = 1;
vehicleClass = "Cargo";
AGM_offset[] = {0,0,0};
};
class AGM_Explosives_Place_DemoCharge:AGM_Explosives_Place {
displayName = "Demo Charge";
model = "\A3\Weapons_F\explosives\c4_charge_small_d";
};
class AGM_Explosives_Place_APERSBoundingMine:AGM_Explosives_Place {
displayName = "APERS Bounding Mine";
model = "\A3\Weapons_F\explosives\mine_AP_bouncing";
};
class AGM_Explosives_Place_APERSMine:AGM_Explosives_Place {
displayName = "APERS Mine";
model = "\A3\Weapons_F\explosives\mine_ap";
};
class AGM_Explosives_Place_APERSTripwireMine:AGM_Explosives_Place {
displayName = "APERS Tripwire Mine";
model = "\A3\Weapons_F\explosives\mine_AP_tripwire";
AGM_offset[] = {1,0,0};
};
class AGM_Explosives_Place_ATMine:AGM_Explosives_Place {
displayName = "AT Mine";
model = "\A3\Weapons_f\Explosives\mine_at";
};
class AGM_Explosives_Place_Claymore:AGM_Explosives_Place {
displayName = "Claymore";
model = "\A3\Weapons_F\explosives\mine_AP_miniclaymore";
};
class AGM_Explosives_Place_SatchelCharge:AGM_Explosives_Place {
displayName = "Satchel Charge";
model = "\A3\Weapons_F\Explosives\satchel";
};
class AGM_Explosives_Place_SLAM:AGM_Explosives_Place {
displayName = "SLAM";
model = "\A3\Weapons_F\Explosives\mine_SLAM_directional";
};
/*
class AGM_Explosives_Place_NavalMine:AGM_Explosives_Place {
displayName = "Naval Mine";
model = "\A3\Weapons_F\explosives\mine_naval";
};
class AGM_Explosives_Place_NavalABMine:AGM_Explosives_Place {
displayName = "Naval Mine";
model = "\A3\Weapons_F\explosives\mine_naval2";
};
class AGM_Explosives_Place_NavalPDMMine:AGM_Explosives_Place {
displayName = "Naval Mine";
model = "\A3\Weapons_F\explosives\mine_naval3";
};*/

View File

@ -1,55 +0,0 @@
class CfgWeapons {
class AGM_ItemCore;
class InventoryItem_Base_f;
class AGM_ExplosiveItem: InventoryItem_Base_f {
allowedSlots[] = {801,701,901};
//type = 201;
};
class AGM_Clacker: AGM_ItemCore {
scope = 2;
displayName = $STR_AGM_Explosives_clacker_displayName;
descriptionShort = $STR_AGM_Explosives_clacker_description;
picture = "\AGM_Explosives\Data\UI\Clacker.paa";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
AGM_range = 250;
AGM_Detonator = 1;
class ItemInfo: AGM_ExplosiveItem {
mass = 3;
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";
};
};
class AGM_M26_Clacker: AGM_Clacker {
displayName = $STR_AGM_Explosives_M26_displayName;
picture = "\AGM_Explosives\Data\UI\MK26_Transmitter_ca.paa";
AGM_range = 5000;
};
class AGM_DefusalKit: AGM_ItemCore {
scope = 2;
displayName = $STR_AGM_Explosives_DefusalKit_displayName;
descriptionShort = $STR_AGM_Explosives_DefusalKit_description;
picture = "\AGM_Explosives\Data\UI\pliers.paa";
model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
class ItemInfo: AGM_ExplosiveItem {
mass = 5;
uniformModel = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
};
};
class AGM_DeadManSwitch: AGM_ItemCore {
scope = 2;
displayName = $STR_AGM_Explosives_DeadManSwitch_displayName;
descriptionShort = $STR_AGM_Explosives_DeadManSwitch_description;
picture = "\AGM_Explosives\Data\UI\DeadmanSwitch.paa";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
AGM_range = 100;
AGM_Detonator = 1;
class ItemInfo: AGM_ExplosiveItem {
mass = 2;
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";
};
};
};

View File

@ -1,74 +0,0 @@
#define GUI_GRID_X (0)
#define GUI_GRID_Y (0)
#define GUI_GRID_W (0.025)
#define GUI_GRID_H (0.04)
#define ST_CENTER 0x02
class RscText;
class RscButton;
#define X_OFFSET 0.25
class RscXSliderH;
class IGUIBack;
class Rsc_AGM_Timer_Slider:RscXSliderH{
x = 0.4;
y = 0.2;
w = 0.3;
h = "1*((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorBackground[] = {0,0,0,0.5};
};
class RscAGM_SelectTimeUI
{
idd = 8854;
movingEnable = 0;
class controls {
class back:IGUIBack {
x = X_OFFSET;
y = 0;
w = 0.5;
h = 0.2;
colorBackground[] = {0, 0, 0, 0.5};
};
class header: RscText{
idc = 8870;
x = X_OFFSET + 0.005;
y = 0.005;
w = 0.49;
h = 0.05;
style = ST_CENTER;
text = "";
};
class slider: Rsc_AGM_Timer_Slider {
idc = 8845;
x = X_OFFSET + 0.005;
y = 0.06;
w = 0.49;
h = 0.025;
onSliderPosChanged = "private ['_mins', '_secs'];_mins = floor((_this select 1)/60);_secs=floor((_this select 1) - (_mins*60));ctrlSetText [8870, format[localize 'STR_AGM_Explosives_TimerMenu',_mins, _secs]];";
};
class cancelBtn: RscButton {
idc = 8855;
x = X_OFFSET + 0.005;
w = 0.15;
h = 0.1;
y = 0.09;
style = ST_CENTER;
text = $STR_AGM_Explosives_Cancel;
action = "closeDialog 0;";
};
class approveBtn: RscButton {
idc = 8860;
x = X_OFFSET + 0.345;
y = 0.09;
h = 0.1;
w = 0.15;
style = ST_CENTER;
text = $STR_AGM_Explosives_SetTime;
action = "closeDialog 0;";
};
};
};

View File

@ -1,46 +0,0 @@
class Module_F;
class AGM_ModuleExplosive: Module_F {
author = "AGM Team";
category = "AGM";
displayName = "Explosive System";
function = "AGM_Explosives_fnc_module";
scope = 2;
isGlobal = 1;
icon = "\AGM_Explosives\UI\IconExplosives_ca.paa";
class Arguments {
class RequireSpecialist {
displayName = "Require specialists?";
//description = "Require explosive specialists to plant/disable explosives? Default: No";
// The above distinction is commented out due to the explanation in fn_SetupExplosive.sqf
description = "Require explosive specialists to disable explosives? Default: No";
typeName = "BOOL";
class values {
class Yes {
name = "Yes";
value = 1;
};
class No {
default = 1;
name = "No";
value = 0;
};
};
};
class PunishNonSpecialists {
displayName = "Punish non-specialists?";
description = "Increase the time it takes to complete actions for non-specialists? Default: Yes";
typeName = "BOOL";
class values {
class Yes {
default = 1;
name = "Yes";
value = 1;
};
class No {
name = "No";
value = 0;
};
};
};
};
};

View File

@ -1,300 +0,0 @@
class CfgPatches {
class AGM_Explosives {
units[] = {};
weapons[] = {"AGM_Clacker", "AGM_DefusalKit", "AGM_M26_Clacker", "AGM_DeadManSwitch"};
requiredVersion = 0.60;
requiredAddons[] = {AGM_Core, AGM_Interaction};
version = "0.95";
versionStr = "0.95";
versionAr[] = {0,95,0};
author[] = {"Garth 'L-H' de Wet"};
authorUrl = "https://github.com/corruptedheart/";
};
};
class CfgFunctions {
class AGM_Explosives {
class Explosives {
file="AGM_Explosives\functions";
class AddClacker;
class CanDefuse;
class DefuseExplosive;
class DetonateExplosive;
class HandleScrollWheel;
class hasExplosives;
class hasPlacedExplosives;
class getDetonators;
class getPlacedExplosives;
class initialise{postInit=1;};
//class JammerInit;
class openDetonateUI;
class openPlaceUI;
class openTransmitterUI;
class openTimerSetUI;
class openTriggerSelectionUI;
class Place_Approve;
class Place_Cancel;
class PlaceExplosive;
class SelectTrigger;
class SetupExplosive;
class SetPos;
class StartDefuse;
class StartTimer;
class TriggerType;
};
};
};
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
#define MACRO_DETONATEACTION class AGM_SelfActions { \
class AGM_Explosives { \
displayName = $STR_AGM_Explosives_Menu;\
condition = "true";\
statement = "";\
exceptions[] = {"AGM_Interaction_isNotSwimming"}; \
showDisabled = 1;\
priority = 4;\
icon = "AGM_Explosives\UI\Icon_Explosive_ca.paa"; \
subMenu[] = {"AGM_Explosives", 1};\
hotkey = "X";\
class AGM_Detonate {\
displayName = $STR_AGM_Explosives_Detonate;\
condition = "[_player] call AGM_Explosives_fnc_hasPlacedExplosives and {count ([_player] call AGM_Explosives_fnc_getDetonators) > 0}";\
statement = "[_player] call AGM_Explosives_fnc_openTransmitterUI;";\
exceptions[] = {"AGM_Interaction_isNotSwimming"}; \
icon = "AGM_Explosives\UI\Icon_Explosive_ca.paa"; \
showDisabled = 1;\
priority = 2;\
hotkey = "T";\
};\
};\
};
class CfgVehicles {
class Man;
class CAManBase: Man {
class AGM_SelfActions {
class AGM_Explosives {
displayName = $STR_AGM_Explosives_Menu;
condition = "!(_player getVariable ['AGM_PlantingExplosive', false])";
statement = "";
exceptions[] = {"AGM_Interaction_isNotSwimming"}; \
showDisabled = 1;
priority = 4;
icon = "AGM_Explosives\UI\Icon_Explosive_ca.paa";
subMenu[] = {"AGM_Explosives", 1};
hotkey = "X";
//Sub-menu items
class AGM_Detonate {
displayName = $STR_AGM_Explosives_Detonate;
condition = "[_player] call AGM_Explosives_fnc_hasPlacedExplosives and {count ([_player] call AGM_Explosives_fnc_getDetonators) > 0}";
statement = "[_player] call AGM_Explosives_fnc_openTransmitterUI;";
exceptions[] = {"AGM_Interaction_isNotSwimming"}; \
showDisabled = 1;
icon = "AGM_Explosives\UI\Icon_Explosive_ca.paa";
priority = 2;
hotkey = "T";
};
class AGM_Place {
displayName = $STR_AGM_Explosives_Place;
condition = "(vehicle _player == _player) and {[_player] call AGM_Explosives_fnc_hasExplosives}";
statement = "[_player] call AGM_Explosives_fnc_openPlaceUI;";
exceptions[] = {"AGM_Interaction_isNotSwimming"}; \
showDisabled = 1;
icon = "AGM_Explosives\UI\Place_Explosive_ca.paa";
priority = 1;
hotkey = "P";
};
class AGM_Defuse {
displayName = $STR_AGM_Explosives_Defuse;
condition = "[_player] call AGM_Explosives_fnc_CanDefuse";
statement = "[_player, AGM_Interaction_Target] call AGM_Explosives_fnc_StartDefuse;";
exceptions[] = {"AGM_Interaction_isNotSwimming"}; \
showDisabled = 0;
icon = "AGM_Explosives\UI\defuse_ca.paa";
priority = 0.8;
hotkey = "F";
};
};
};
};
#include "CfgVehicles.hpp"
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class FIA_Box_Base_F;
class Box_NATO_Support_F;
class Box_NATO_AmmoOrd_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_Clacker,12)
MACRO_ADDITEM(AGM_M26_Clacker,6)
MACRO_ADDITEM(AGM_DefusalKit,12)
};
};
class Box_East_AmmoOrd_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_Clacker,12)
MACRO_ADDITEM(AGM_M26_Clacker,6)
MACRO_ADDITEM(AGM_DefusalKit,12)
};
};
class Box_IND_AmmoOrd_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_Clacker,12)
MACRO_ADDITEM(AGM_M26_Clacker,6)
MACRO_ADDITEM(AGM_DefusalKit,12)
MACRO_ADDITEM(AGM_Deadmanswitch,2)
};
};
class Box_FIA_Ammo_F: FIA_Box_Base_F {
class TransportItems {
MACRO_ADDITEM(AGM_Clacker,2)
MACRO_ADDITEM(AGM_M26_Clacker,2)
MACRO_ADDITEM(AGM_DefusalKit,2)
MACRO_ADDITEM(AGM_Deadmanswitch,1)
};
};
class AGM_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(AGM_Clacker,12)
MACRO_ADDITEM(AGM_M26_Clacker,6)
MACRO_ADDITEM(AGM_DefusalKit,12)
MACRO_ADDITEM(AGM_Deadmanswitch,6)
};
};
class B_Kitbag_rgr;
class B_Kitbag_rgr_Exp: B_Kitbag_rgr {
class TransportItems {
class _xx_ToolKit { // xXToOlKiT420mLgXx
count = 0;
};
};
};
class B_Carryall_ocamo;
class B_Carryall_ocamo_Exp: B_Carryall_ocamo {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
class B_Carryall_oucamo;
class B_Carryall_oucamo_Exp: B_Carryall_oucamo {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
class B_Carryall_oli;
class G_Carryall_Exp: B_Carryall_oli {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
class I_Carryall_oli_Exp: B_Carryall_oli {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
#include "Module.hpp"
// Add AGM_Clacker and AGM_DefusalKit to every explosive unit.
#define MACRO_ADDMINEKIT \
items[] = {"FirstAidKit", "AGM_Clacker", "AGM_DefusalKit"}; \
respawnitems[] = {"FirstAidKit", "AGM_Clacker", "AGM_DefusalKit"};
class B_Soldier_base_F; class B_soldier_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT};
class B_Soldier_03_f; class B_engineer_F:B_Soldier_03_f {MACRO_ADDMINEKIT};
class B_Soldier_diver_base_F; class B_diver_exp_F:B_Soldier_diver_base_F {MACRO_ADDMINEKIT};
class B_Soldier_recon_base; class B_recon_exp_F:B_Soldier_recon_base {MACRO_ADDMINEKIT};
class B_CTRG_soldier_engineer_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT};
class I_G_Soldier_base_F; class I_G_engineer_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT};
class I_G_Soldier_exp_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT};
class B_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT};
class O_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT};
class B_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT};
class O_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT};
class I_Soldier_02_F; class I_Soldier_exp_F:I_Soldier_02_F {MACRO_ADDMINEKIT};
class I_Soldier_base_F; class I_engineer_F:I_Soldier_base_F {MACRO_ADDMINEKIT};
class I_Soldier_diver_base_F; class I_diver_exp_F:I_Soldier_diver_base_F {MACRO_ADDMINEKIT};
class O_Soldier_base_F; class O_soldier_exp_F:O_Soldier_base_F {MACRO_ADDMINEKIT};
class O_engineer_F:O_Soldier_base_F {MACRO_ADDMINEKIT};
class O_Soldier_diver_base_F; class O_diver_exp_F:O_Soldier_diver_base_F {MACRO_ADDMINEKIT};
class O_Soldier_recon_base; class O_recon_exp_F:O_Soldier_recon_base {MACRO_ADDMINEKIT};
class O_Soldier_Urban_base; class O_soldierU_exp_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT};
class O_engineer_U_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT};
class B_Protagonist_VR_F:B_Soldier_base_F {MACRO_ADDMINEKIT};
class O_Protagonist_VR_F:O_Soldier_base_F {MACRO_ADDMINEKIT};
class I_Protagonist_VR_F:I_Soldier_base_F {MACRO_ADDMINEKIT};
class B_Soldier_F; class b_soldier_universal_f:B_Soldier_F {MACRO_ADDMINEKIT};
class B_G_Soldier_F; class b_g_soldier_universal_f:B_G_Soldier_F {MACRO_ADDMINEKIT};
class O_Soldier_F; class o_soldier_universal_f:O_Soldier_F {MACRO_ADDMINEKIT};
class O_G_Soldier_F; class o_g_soldier_universal_f:O_G_Soldier_F {MACRO_ADDMINEKIT};
class I_soldier_F; class i_soldier_universal_f:I_soldier_F {MACRO_ADDMINEKIT};
class I_G_Soldier_F; class i_g_soldier_universal_f:I_G_Soldier_F {MACRO_ADDMINEKIT};
// Add AGM_Clacker to snipers and spotters for setting off Claymores
#define MACRO_ADDCLAYMOREKIT \
items[] = {"FirstAidKit","AGM_Clacker"}; \
respawnitems[] = {"FirstAidKit","AGM_Clacker"};
class B_Soldier_sniper_base_F;
class B_sniper_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
class B_spotter_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
class I_Soldier_sniper_base_F;
class I_Sniper_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
class I_Spotter_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
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};
};
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
#include "ExplosivesUI.hpp"
class CfgActions {
class None;
class Deactivate:None {
show = 0;
};
class DeactivateMine:None {
show = 0;
};
};
class AGM_Parameters_Boolean {
// Boolean Parameters (0/1)
AGM_Explosives_RequireSpecialist = 0;
AGM_Explosives_PunishNonSpecialists = 1;
};

View File

@ -1,25 +0,0 @@
/*
Name: AGM_Explosives_fnc_HandleScrollWheel
Author(s):
L-H
Description:
Handles rotating of Explosives
Parameters:
Number: Scroll amount
Returns:
Boolean: Handled or not.
Example:
1.2 call AGM_Explosives_fnc_HandleScrollWheel;
*/
private ["_obj"];
if (isNull(AGM_Explosives_Setup) || {AGM_Modifier == 0} || !AGM_Explosives_pfeh_running) exitWith {false};
AGM_Explosives_Setup setDir ((getDir AGM_Explosives_Setup) + (_this*5));
AGM_Explosives_TweakedAngle = AGM_Explosives_TweakedAngle + _this*5;
true

View File

@ -1,42 +0,0 @@
/*
Name: AGM_Explosives_fnc_JammerInit
Author(s):
Garth de Wet (LH)
Description:
Parameters:
0:OBJECT - unit carrying
1:OBJECT - Jammer
Returns:
Nothing
Example:
[player,JammerObject] call AGM_Explosives_fnc_JammerInit;
*/
if (isClass (configFile >> "CfgVehicles" >> (typeof (_this select 1))) and {getNumber(configFile >> "CfgVehicles" >> (typeof (_this select 1)) >> "AGM_JammerRange") > 0}) then {
private ["_found"];
_found = false;
{
if ((_x select 2) == (_this select 1)) exitWith {
_x set [0, (_this select 0)];
_found = true;
};
} count AGM_Explosives_Jammers;
if !(_found) then {
AGM_Explosives_Jammers pushBack [(_this select 0), getNumber(configFile >> "CfgVehicles" >> (typeof (_this select 1)) >> "AGM_JammerRange"),(_this select 1)];
};
publicVariable "AGM_Explosives_Jammers";
private "_check";
_check = (_this select 1) getVariable "AGM_JammerCharge";
if (isNil "_check") then {
(_this select 1) setVariable ["AGM_JammerCharge", getNumber(configFile >> "CfgVehicles" >> (typeof (_this select 1)) >> "AGM_JammerMaxCharge"), true];
};
_check = (_this select 1) getVariable "AGM_JammerEnabled";
if (isNil "_check") then {
(_this select 1) setVariable ["AGM_JammerEnabled", false, true];
};
};

View File

@ -1,106 +0,0 @@
/*
Name: AGM_Explosives_fnc_Place_Approve
Author(s):
Garth de Wet (LH)
Description:
Approves placement of the explosive, releases the placement object for it to settle in a location suitable for the explosive to be created.
Parameters:
Nothing
Returns:
Nothing
Example:
call AGM_Explosives_fnc_Place_Approve;
*/
if (AGM_Explosives_pfeh_running) then {
["AGM_Explosives_Placement","OnEachFrame"] call BIS_fnc_removeStackedEventHandler;
AGM_Explosives_pfeh_running = false;
};
private ["_mag", "_setup", "_player"];
_setup = AGM_Explosives_Setup;
AGM_Explosives_Setup = objNull;
[AGM_Explosives_placer, "AGM_Explosives", false] call AGM_Core_fnc_setForceWalkStatus;
AGM_Explosives_placer = objNull;
_player = AGM_player;
[_player, "DefaultAction", _player getVariable ["AGM_Explosive_Place", -1]] call AGM_Core_fnc_removeActionEventHandler;
[_player, "MenuBack", _player getVariable ["AGM_Explosive_Cancel", -1]] call AGM_Core_fnc_removeActionEventHandler;
call AGM_Interaction_fnc_hideMouseHint;
if ((_setup getVariable ["AGM_Class", ""]) != "") then {
_dir = (getDir _setup);
if (_dir > 180) then {
_dir = _dir - 180;
} else {
_dir = 180 + _dir;
};
_setup setVariable ["AGM_Dir", _dir];
_player setVariable ["AGM_PlantingExplosive", true];
_setup addEventHandler ["EpeContactStart", {
if (!((_this select 0) getVariable ["AGM_Handled", false])) then {
private ["_player", "_pos", "_attachTo"];
_player = AGM_player;
_pos = getPosATL (_this select 0);
(_this select 0) enableSimulationGlobal false;
if (surfaceIsWater _pos) then {
_pos = getPosASL (_this select 0);
(_this select 0) setPosASL _pos;
}else{
(_this select 0) setPosATL _pos;
};
(_this select 0) setVariable ["AGM_Handled", true];
_player setVariable ["AGM_PlantingExplosive", false];
_attachTo = objNull;
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
_attachTo = (_this select 1);
};
[(_this select 0),_attachTo, _pos] spawn {
private ["_mag", "_setup", "_dir", "_player"];
_setup = _this select 0;
_player = AGM_player;
_mag = _setup getVariable ["AGM_Class", ""];
_dir = _setup getVariable ["AGM_Dir", 0];
sleep getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "AGM_DelayTime");
_explosive = [_player, _this select 2, _dir, _mag, _setup getVariable "AGM_Trigger", [_setup getVariable "AGM_Timer"], isNull (_this select 1)] call AGM_Explosives_fnc_PlaceExplosive;
deleteVehicle _setup;
if (!isNull(_explosive)) then {
_player RemoveMagazine _mag;
sleep 0.2;
if (!isNull (_this select 1)) then {
_explosive attachTo [(_this select 1)];
_dir = _dir - (getDir (_this select 1));
[[_explosive, _dir, 0], "AGM_Explosives_fnc_setPos"] call AGM_Core_fnc_execRemoteFnc;
};
};
};
};
}];
_setup enableSimulationGlobal true;
_player playActionNow "MedicOther";
[_setup] spawn {
private ["_setup", "_player"];
_setup = _this select 0;
_player = AGM_player;
sleep 5;
if (!isNull _setup) then {
private ["_mag", "_dir", "_delayTime"];
_mag = _setup getVariable ["AGM_Class", ""];
_dir = _setup getVariable ["AGM_Dir", 0];
_delayTime = (getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "AGM_DelayTime")) - 5;
if (_delayTime > 0) then {
sleep _delayTime;
};
if (!isNull _setup) then {
[_player, GetPosATL _setup, _dir, _mag, _setup getVariable "AGM_Trigger", [_setup getVariable "AGM_Timer"], true] call AGM_Explosives_fnc_PlaceExplosive;
deleteVehicle _setup;
_player RemoveMagazine _mag;
_player setVariable ["AGM_PlantingExplosive", false];
};
};
};
}else{
deleteVehicle _setup;
};

View File

@ -1,34 +0,0 @@
/*
Name: AGM_Explosives_fnc_Place_Cancel
Author(s):
Garth de Wet (LH)
Description:
Cancels placement of the explosive
Parameters:
Nothing
Returns:
Nothing
Example:
call AGM_Explosives_fnc_Place_Cancel;
*/
if (AGM_Explosives_pfeh_running) then {
["AGM_Explosives_Placement","OnEachFrame"] call BIS_fnc_removeStackedEventHandler;
AGM_Explosives_pfeh_running = false;
};
if (!isNull (AGM_Explosives_Setup)) then {
deleteVehicle AGM_Explosives_Setup;
};
AGM_Explosives_Setup = objNull;
if (isNil {AGM_Explosives_placer}) then {
AGM_Explosives_placer = objNull;
};
[AGM_Explosives_placer, "AGM_Explosives", false] call AGM_Core_fnc_setForceWalkStatus;
AGM_Explosives_placer = objNull;
call AGM_Interaction_fnc_hideMouseHint;
[AGM_player, "DefaultAction", AGM_player getVariable ["AGM_Explosive_Place", -1]] call AGM_Core_fnc_removeActionEventHandler;
[AGM_player, "MenuBack", AGM_player getVariable ["AGM_Explosive_Cancel", -1]] call AGM_Core_fnc_removeActionEventHandler;

View File

@ -1,65 +0,0 @@
/*
Name: AGM_Explosives_fnc_SetupExplosive
Author(s):
Garth de Wet (LH)
Description:
Starts the setup process for the passed explosive.
Parameters:
0: OBJECT - Unit placing explosive.
1: STRING - Classname of explosive to place. (CfgMagazine class)
2: Config - Trigger Config
3: NUMBER - (optional) timer
Returns:
Nothing
Example:
[player, "SatchelCharge_Remote_Mag", "Command"] call AGM_Explosives_fnc_SetupExplosive;
*/
_this spawn {
private ["_unit", "_class", "_config", "_timer"];
_unit = _this select 0;
_class = _this select 1;
_config = _this select 2;
_timer = _this select 3;
AGM_Explosives_placer = _unit;
// Commented out due to the fact there is a distinction between who can deactivate mines and who can plant them in standard configs.
// Would require custom config entries (AGM_ExplosiveSpecialist/AGM_Specialist) which excludes custom mods.
//if (AGM_Explosives_RequireSpecialist && {!([_unit] call AGM_Core_fnc_isEOD)}) exitWith {};
if (isNil "_config") then {
_config = getArray(ConfigFile >> "CfgMagazines" >> _class >> "AGM_Triggers" >> "AGM_Triggers") select 0;
};
AGM_Explosives_Setup = getText(ConfigFile >> "CfgMagazines" >> _class >> "AGM_SetupObject") createVehicleLocal [0,0,-10000];
AGM_Explosives_Setup enableSimulationGlobal false;
AGM_Explosives_Setup setVariable ["AGM_Class", _class];
AGM_Explosives_Setup setVariable ["AGM_Trigger", _config];
//AGM_Explosives_Setup setVariable ["AGM_Offset", GetArray(ConfigFile >> "CfgVehicles" >> typeof AGM_Explosives_Setup >> "AGM_Offset")];
if (!isNil "_timer") then {
AGM_Explosives_Setup setVariable ["AGM_Timer", _timer];
};
[_unit, "AGM_Explosives", true] call AGM_Core_fnc_setForceWalkStatus;
AGM_Explosives_TweakedAngle = 180;
["AGM_Explosives_Placement","OnEachFrame", {
private "_player";
_player = AGM_player;
if (AGM_Explosives_placer != _player) exitWith {
call AGM_Explosives_fnc_Place_Cancel;
};
AGM_Explosives_pfeh_running = true;
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
//_pos = _pos vectorAdd ((VectorDir AGM_Explosives_setup) vectorCrossProduct (AGM_Explosives_setup getVariable ["AGM_Offset", [0,0,0]]));
AGM_Explosives_Setup setPosATL _pos;
if (AGM_Modifier == 0) then {
AGM_Explosives_Setup setDir (AGM_Explosives_TweakedAngle + getDir _player);
};
}] call BIS_fnc_addStackedEventHandler;
[localize "STR_AGM_Explosives_PlaceAction", localize "STR_AGM_Explosives_CancelAction",localize "STR_AGM_Explosives_ScrollAction"] call AGM_Interaction_fnc_showMouseHint;
_unit setVariable ["AGM_Explosive_Place", [_unit, "DefaultAction", {AGM_Explosives_pfeh_running AND !isNull (AGM_Explosives_setup)}, {call AGM_Explosives_fnc_Place_Approve;}] call AGM_Core_fnc_AddActionEventHandler];
_unit setVariable ["AGM_Explosive_Cancel", [_unit, "MenuBack", {AGM_Explosives_pfeh_running AND !isNull (AGM_Explosives_setup)}, {call AGM_Explosives_fnc_Place_Cancel;}] call AGM_Core_fnc_AddActionEventHandler];
};

View File

@ -1,65 +0,0 @@
/*
Name: AGM_Explosives_fnc_StartDefuse
Author: Garth de Wet (LH)
Description:
Starts defusing an explosive
Parameters:
0: OBJECT - Unit to defuse explosive
1: OBJECT - Target explosive
Returns:
Nothing
Example:
[player, AGM_Interaction_Target] call AGM_Explosives_fnc_StartDefuse;
*/
private ["_unit","_target"];
_unit = _this select 0;
_target = _this select 1;
// [_specialist, _target] call _fnc_DefuseTime;
_fnc_DefuseTime = {
_target = _this select 1;
_defuseTime = 5;
if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "AGM_DefuseTime")) then {
_defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "AGM_DefuseTime");
};
if (!(_this select 0) && {AGM_Explosives_PunishNonSpecialists}) then {
_defuseTime = _defuseTime * 1.5;
};
_defuseTime
};
_actionToPlay = "MedicOther";
if (STANCE _unit == "Prone") then {
_actionToPlay = "PutDown";
};
if (AGM_player != _unit) then {
// If the unit is a player, call the function on the player.
if (isPlayer _unit) then {
[[_unit, _target], "AGM_Explosives_fnc_StartDefuse", _unit] call AGM_Core_fnc_execRemoteFnc;
} else {
[_unit, _target, [[_unit] call AGM_Core_fnc_isEOD, _target] call _fnc_DefuseTime] spawn {
(_this select 0) playActionNow _actionToPlay;
(_this select 0) disableAI "MOVE";
(_this select 0) disableAI "TARGET";
sleep (_this select 2);
[(_this select 0), (_this select 1)] call AGM_Explosives_fnc_DefuseExplosive;
(_this select 0) enableAI "MOVE";
(_this select 0) enableAI "TARGET";
};
};
} else {
_unit playActionNow _actionToPlay;
if (AGM_Explosives_RequireSpecialist) then {
if ([_unit] call AGM_Core_fnc_isEOD) then {
[[true, _target] call _fnc_DefuseTime, [_unit,_target], "AGM_Explosives_fnc_DefuseExplosive", localize "STR_AGM_Explosives_DefusingExplosive"] call AGM_Core_fnc_progressBar;
};
} else {
[[([_unit] call AGM_Core_fnc_isEOD), _target] call _fnc_DefuseTime, [_unit,_target], "AGM_Explosives_fnc_DefuseExplosive", localize "STR_AGM_Explosives_DefusingExplosive"] call AGM_Core_fnc_progressBar;
};
};

View File

@ -1,29 +0,0 @@
/*
Name: AGM_Explosives_fnc_startTimer
Author(s):
Garth de Wet (LH)
Description:
Starts a timer for an explosive.
Parameters:
0: OBJECT - Explosive
1: NUMBER - time till detonation
Returns:
Nothing
Example:
[_explosive, 10] call AGM_Explosives_fnc_startTimer;
*/
_this spawn {
private ["_explosive", "_timer"];
_explosive = _this select 0;
_timer = _this select 1;
sleep _timer;
if (!isNull _explosive) then {
[_explosive, -1, [_explosive, 0], true] call AGM_Explosives_fnc_DetonateExplosive;
};
};

View File

@ -1,73 +0,0 @@
/*
Name: AGM_Explosives_fnc_Initialise
Author(s):
Garth de Wet (LH)
Description:
Initialises explosive behaviour.
Parameters:
None
Returns:
None
Example:
None
*/
if !(hasInterface) exitWith {};
AGM_Explosives_PlacedCount = 0;
AGM_Explosives_Setup = objNull;
AGM_Explosives_pfeh_running = false;
AGM_Explosives_null = [] spawn {
waitUntil {sleep 0.356;!isNull(player)};
[{(_this select 0) call AGM_Explosives_fnc_HandleScrollWheel;}] call AGM_Core_fnc_addScrollWheelEventHandler;
player addEventHandler ["Respawn", {
[(_this select 0)] call AGM_Explosives_fnc_initialiseUnit;
}];
player addEventHandler ["Killed", {
private "_deadman";
call AGM_Explosives_fnc_Place_Cancel;
_deadman = [(_this select 0), "DeadManSwitch"] call AGM_Explosives_fnc_getPlacedExplosives;
{
[(_this select 0), -1, _x, true] call AGM_Explosives_fnc_DetonateExplosive;
} count _deadman;
}];
player addEventHandler ["Take", {
private ["_item", "_getter", "_giver", "_config"];
_item = _this select 2;
_getter = _this select 0;
_giver = _this select 1;
_config = ConfigFile >> "CfgWeapons" >> _item;
if (isClass _config && {getNumber(_config >> "AGM_Detonator") == 1}) then {
private ["_clackerItems"];
_clackerItems = _giver getVariable ["AGM_Clacker", []];
_getter SetVariable ["AGM_Clacker", (_getter getVariable ["AGM_Clacker", []]) + _clackerItems, true];
_detonators = [_giver] call AGM_Explosives_fnc_getDetonators;
if (count _detonators == 0) then {
_giver setVariable ["AGM_Clacker", nil, true];
};
};
}];
player addEventHandler ["Put", {
private ["_item", "_getter", "_giver", "_config"];
_item = _this select 2;
_getter = _this select 1;
_giver = _this select 0;
_config = ConfigFile >> "CfgWeapons" >> _item;
if (isClass _config && {getNumber(_config >> "AGM_Detonator") == 1}) then {
private ["_clackerItems"];
_clackerItems = _giver getVariable ["AGM_Clacker", []];
_getter SetVariable ["AGM_Clacker", (_getter getVariable ["AGM_Clacker", []]) + _clackerItems, true];
_detonators = [_giver] call AGM_Explosives_fnc_getDetonators;
if (count _detonators == 0) then {
_giver setVariable ["AGM_Clacker", nil, true];
};
};
}];
};

View File

@ -1,26 +0,0 @@
/*
Name: AGM_Explosives_fnc_isSpecialist
Author: Garth de Wet (LH)
Description:
Checks whether the passed unit is an explosive specialist.
Either through config entry: "canDeactivateMines"
or
unit setVariable ["AGM_isEOD", true]
Parameters:
OBJECT - Unit to check if is a specialist
Returns:
BOOLEAN
Example:
_isSpecialist = player call AGM_Explosives_fnc_isSpecialist;
*/
private "_isSpecialist";
_isSpecialist = _this getVariable "AGM_isEOD";
if (isNil "_isSpecialist") then {
_isSpecialist = getNumber(ConfigFile >> "CfgVehicles" >> typeof _this >> "canDeactivateMines") == 1;
};
_isSpecialist

View File

@ -1,27 +0,0 @@
/*
Name: AGM_Explosives_fnc_module
Author: Garth de Wet (LH)
Description:
Initialises the explosives module
Parameters:
Things
Returns:
Nothing
Example:
*/
if !(isServer) exitWith {};
_logic = _this select 0;
_activated = _this select 2;
if !(_activated) exitWith {};
[_logic, "AGM_Explosives_RequireSpecialist", "RequireSpecialist" ] call AGM_Core_fnc_readBooleanParameterFromModule;
[_logic, "AGM_Explosives_PunishNonSpecialists", "PunishNonSpecialists" ] call AGM_Core_fnc_readBooleanParameterFromModule;
diag_log text "[AGM]: Explosive Module Initialized.";

View File

@ -1,61 +0,0 @@
/*
Name: AGM_Explosives_fnc_openDetonateUI
Author: Garth de Wet (LH)
Description:
Opens the UI for explosive detonation selection
Parameters:
0: OBJECT - unit
0: STRING - Classname of detonator
Returns:
Nothing
Example:
[player, "AGM_M26_Clacker"] call AGM_Explosives_fnc_openDetonateUI;
*/
private ["_unit","_result", "_item"];
call AGM_Interaction_fnc_hideMenu;
_unit = _this select 0;
_detonator = _this select 1;
_range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "AGM_Range");
_result = [_unit] call AGM_Explosives_fnc_getPlacedExplosives;
_actions = [localize "STR_AGM_Explosives_DetonateMenu", localize "STR_AGM_Explosives_Detonate"] call AGM_Interaction_fnc_prepareSelectMenu;
_count = 0;
{
if (!isNull(_x select 0)) then {
_required = getArray (ConfigFile >> "CfgAGM_Triggers" >> (_x select 4) >> "requires");
if (_detonator in _required) then {
_item = ConfigFile >> "CfgMagazines" >> (_x select 3);
_actions = [
_actions,
_x select 2,
getText(_item >> "picture"),
[_foreachIndex, _range]
] call AGM_Interaction_fnc_AddSelectableItem;
_count = _count + 1;
};
};
} foreach _result;
if (_count > 0) then {
[
_actions,
{
[
AGM_player,
[_this select 1] call AGM_Core_fnc_toNumber,
(AGM_player getVariable ["AGM_Clacker", []]) select ([_this select 0] call AGM_Core_fnc_toNumber),
false
] call AGM_Explosives_fnc_DetonateExplosive;
call AGM_Interaction_fnc_hideMenu;
},
{[AGM_player] call AGM_Explosives_fnc_openTransmitterUI;}
] call AGM_Interaction_fnc_openSelectMenu;
}else{
call AGM_Interaction_fnc_hideMenu;
[AGM_player] call AGM_Explosives_fnc_openTransmitterUI;
[localize "STR_AGM_Explosives_NoExplosivesAvailable"] call AGM_Core_fnc_displayTextStructured;
};

View File

@ -1,27 +0,0 @@
/*
Name: AGM_Explosives_fnc_openTimerSetUI
Author: Garth de Wet (LH)
Description:
Opens the UI for timer setting of an explosive
Parameters:
0: String - Magazine
Returns:
Nothing
Example:
[player] call AGM_Explosives_fnc_openTimerSetUI;
*/
private ["_mag"];
_mag = _this select 0;
createDialog "RscAGM_SelectTimeUI";
sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes
sliderSetPosition [8845, 30];
buttonSetAction [8860, format["[AGM_player, '%1', 'Timer', floor(sliderPosition 8845)] call AGM_Explosives_fnc_SetupExplosive;closeDialog 0;", _mag]];
buttonSetAction [8855, format["['%1'] call AGM_Explosives_fnc_openTriggerSelectionUI;", _mag]];
ctrlSetText [8870, format[localize "STR_AGM_Explosives_TimerMenu",0, 30]];

View File

@ -1,51 +0,0 @@
/*
Name: AGM_Explosives_fnc_openTransmitterUI
Author: Garth de Wet (LH)
Description:
Opens the UI for selecting the transmitter
Parameters:
0: OBJECT - Unit
Returns:
Nothing
Example:
[player] call AGM_Explosives_fnc_openTransmitterUI;
*/
private ["_items", "_unit", "_count", "_actions", "_config"];
_unit = _this select 0;
_items = (items _unit);
_actions = [localize "STR_AGM_Explosives_TriggerMenu", localize "STR_AGM_Explosives_SelectTrigger"] call AGM_Interaction_fnc_prepareSelectMenu;
_detonators = [_unit] call AGM_Explosives_fnc_getDetonators;
{
_config = ConfigFile >> "CfgWeapons" >> _x;
_actions = [
_actions,
getText(_config >> "displayName"),
getText(_config >> "picture"),
_x
] call AGM_Interaction_fnc_AddSelectableItem;
} count _detonators;
if (count _detonators == 0) then {
call AGM_Interaction_fnc_hideMenu;
"AGM_Explosives" call AGM_Interaction_fnc_openMenuSelf;
[format[localize "STR_AGM_Explosives_NoTriggersAvailable", "player"]] call AGM_Core_fnc_displayTextStructured;
}else{
[
_actions,
{
[AGM_player, _this] call AGM_Explosives_fnc_openDetonateUI;
},
{
call AGM_Interaction_fnc_hideMenu;
if !(profileNamespace getVariable ["AGM_Interaction_AutoCloseMenu", false]) then {
"AGM_Explosives" call AGM_Interaction_fnc_openMenuSelf;
};
}
] call AGM_Interaction_fnc_openSelectMenu;
};

View File

@ -1,281 +0,0 @@
class CfgPatches {
class AGM_Respawn {
units[] = {};
weapons[] = {"AGM_Rallypoint_West", "AGM_Rallypoint_East", "AGM_Rallypoint_Independent", "AGM_RallypointExit_West", "AGM_RallypointExit_East", "AGM_RallypointExit_Independent"};
requiredVersion = 0.60;
requiredAddons[] = {AGM_Core};
version = "0.95";
versionStr = "0.95";
versionAr[] = {0,95,0};
author[] = {"bux578", "commy2"};
authorUrl = "https://github.com/bux578/";
};
};
class CfgFunctions {
class AGM_Respawn {
class AGM_Respawn {
file = "AGM_Respawn\functions";
class canMoveRallypoint;
class getAllGear;
class handleKilled;
class handleRespawn;
class initRallypoint;
class module;
class moduleFriendlyFire;
class moduleRallypoint;
class moveRallypoint;
class removeBody;
class removeDisconnectedPlayer;
class restoreGear;
class showFriendlyFireMessage;
class teleportToRallypoint;
};
};
};
class Extended_Killed_EventHandlers {
class CAManBase {
class AGM_Respawn_HandleGear {
killed = "_this call AGM_Respawn_fnc_handleKilled";
};
};
};
class Extended_Respawn_EventHandlers {
class CAManBase {
class AGM_Respawn_HandleGear {
respawn = "_this call AGM_Respawn_fnc_handleRespawn";
};
};
};
class CfgAddons {
class AGM_Respawn_Rallypoints {
list[] = {"AGM_Rallypoint_West", "AGM_Rallypoint_East", "AGM_Rallypoint_Independent", "AGM_RallypointExit_West", "AGM_RallypointExit_East", "AGM_RallypointExit_Independent"};
};
};
class CfgVehicleClasses {
class AGM_Respawn_Rallypoints {
displayName = "AGM Respawn";
};
};
class CfgVehicles {
class Module_F;
class AGM_ModuleRespawn: Module_F {
author = "$STR_AGM_Core_AGMTeam";
category = "AGM";
displayName = "Respawn System";
function = "AGM_Respawn_fnc_module";
scope = 2;
isGlobal = 1;
icon = "\AGM_Respawn\UI\Icon_Module_Respawn_ca.paa";
class Arguments {
class SavePreDeathGear {
displayName = "Save Gear?";
description = "Respawn with the gear a soldier had just before his death?";
typeName = "BOOL";
class values {
class Yes { name = "Yes"; value = 1;};
class No { default = 1; name = "No"; value = 0; };
};
};
class RemoveDeadBodiesDisonncected {
displayName = "Remove bodies?";
description = "Remove player bodies after disconnect?";
typeName = "BOOL";
class values {
class Yes { default = 1; name = "Yes"; value = 1;};
class No { name = "No"; value = 0; };
};
};
/*class BodyRemoveTimer {
displayName = "Time to remove bodies.";
description = "The amount of time (in seconds) after that a unit's body gets removed. Default: 90";
typeName = "NUMBER";
defaultValue = 90;
};*/
};
};
class AGM_ModuleFriendlyFire: Module_F {
author = "$STR_AGM_Core_AGMTeam";
category = "AGM";
displayName = "Friendly Fire Messages";
function = "AGM_Respawn_fnc_moduleFriendlyFire";
scope = 2;
isGlobal = 1;
icon = "\AGM_Respawn\UI\Icon_Module_FriendlyFire_ca.paa";
class Arguments {
};
};
class AGM_ModuleRallypoint: Module_F {
author = "$STR_AGM_Core_AGMTeam";
category = "AGM";
displayName = "Rallypoint System";
function = "AGM_Respawn_fnc_moduleRallypoint";
scope = 2;
isGlobal = 1;
icon = "\AGM_Respawn\UI\Icon_Module_Rallypoint_ca.paa";
class Arguments {
};
};
// rallypoints
class FlagCarrier;
class Flag_NATO_F: FlagCarrier {
class AGM_Actions;
};
class Flag_CSAT_F: FlagCarrier {
class AGM_Actions;
};
class Flag_AAF_F: FlagCarrier {
class AGM_Actions;
};
// static
class AGM_Rallypoint_West: Flag_NATO_F {
author = "$STR_AGM_Core_AGMTeam";
displayName = "Rallypoint West Base";
vehicleClass = "AGM_Respawn_Rallypoints";
class EventHandlers {
init = "(_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call AGM_Respawn_fnc_initRallypoint";
};
class AGM_Actions: AGM_Actions {
class AGM_Teleport {
displayName = "Teleport to Rallypoint";
distance = 4;
condition = "side group _player == west";
statement = "[_player, side group _player, false] call AGM_Respawn_fnc_teleportToRallypoint;";
showDisabled = 1;
priority = 1;
};
};
};
class AGM_Rallypoint_East: Flag_CSAT_F {
author = "$STR_AGM_Core_AGMTeam";
displayName = "Rallypoint East Base";
vehicleClass = "AGM_Respawn_Rallypoints";
class EventHandlers {
init = "(_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call AGM_Respawn_fnc_initRallypoint";
};
class AGM_Actions: AGM_Actions {
class AGM_Teleport {
displayName = "Teleport to Rallypoint";
distance = 4;
condition = "side group _player == east";
statement = "[_player, side group _player, false] call AGM_Respawn_fnc_teleportToRallypoint;";
showDisabled = 1;
priority = 1;
};
};
};
class AGM_Rallypoint_Independent: Flag_AAF_F {
author = "$STR_AGM_Core_AGMTeam";
displayName = "Rallypoint Independent Base";
vehicleClass = "AGM_Respawn_Rallypoints";
class EventHandlers {
init = "(_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call AGM_Respawn_fnc_initRallypoint";
};
class AGM_Actions: AGM_Actions {
class AGM_Teleport {
displayName = "Teleport to Rallypoint";
distance = 4;
condition = "side group _player == independent";
statement = "[_player, side group _player, false] call AGM_Respawn_fnc_teleportToRallypoint;";
showDisabled = 1;
priority = 1;
};
};
};
// moveable
class AGM_RallypointExit_West: Flag_NATO_F {
author = "$STR_AGM_Core_AGMTeam";
displayName = "Rallypoint West";
vehicleClass = "AGM_Respawn_Rallypoints";
class EventHandlers {
init = "(_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call AGM_Respawn_fnc_initRallypoint";
};
class AGM_Actions: AGM_Actions {
class AGM_Teleport {
displayName = "Teleport to Base";
distance = 4;
condition = "side group _player == west";
statement = "[_player, side group _player, true] call AGM_Respawn_fnc_teleportToRallypoint;";
showDisabled = 1;
priority = 1;
};
};
};
class AGM_RallypointExit_East: Flag_CSAT_F {
author = "$STR_AGM_Core_AGMTeam";
displayName = "Rallypoint East";
vehicleClass = "AGM_Respawn_Rallypoints";
class EventHandlers {
init = "(_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call AGM_Respawn_fnc_initRallypoint";
};
class AGM_Actions: AGM_Actions {
class AGM_Teleport {
displayName = "Teleport to Base";
distance = 4;
condition = "side group _player == east";
statement = "[_player, side group _player, true] call AGM_Respawn_fnc_teleportToRallypoint;";
showDisabled = 1;
priority = 1;
};
};
};
class AGM_RallypointExit_Independent: Flag_AAF_F {
author = "$STR_AGM_Core_AGMTeam";
displayName = "Rallypoint Independent";
vehicleClass = "AGM_Respawn_Rallypoints";
class EventHandlers {
init = "(_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call AGM_Respawn_fnc_initRallypoint";
};
class AGM_Actions: AGM_Actions {
class AGM_Teleport {
displayName = "Teleport to Base";
distance = 4;
condition = "side group _player == independent";
statement = "[_player, side group _player, true] call AGM_Respawn_fnc_teleportToRallypoint;";
showDisabled = 1;
priority = 1;
};
};
};
// team leader
class Man;
class CAManBase: Man {
class AGM_SelfActions {
class AGM_MoveRallypoint {
displayName = "Move Rallypoint";
condition = "[_player, side group _player] call AGM_Respawn_fnc_canMoveRallypoint";
statement = "[_player, side group _player] call AGM_Respawn_fnc_moveRallypoint";
showDisabled = 0;
priority = -0.5;
};
};
};
};
class AGM_Parameters_Boolean {
// Boolean Parameters (0/1)
AGM_Respawn_SavePreDeathGear = 0;
AGM_Respawn_RemoveDeadBodiesDisonncected = 1;
};

View File

@ -1,14 +0,0 @@
// by commy2
private ["_unit", "_side"];
_unit = _this select 0;
_side = _this select 1;
_unit getVariable ["AGM_canMoveRallypoint", false]
&& {!isNull ([
objNull,
missionNamespace getVariable ["AGM_Rallypoint_West", objNull],
missionNamespace getVariable ["AGM_Rallypoint_East", objNull],
missionNamespace getVariable ["AGM_Rallypoint_Independent", objNull]
] select ([west, east, independent] find _side) + 1)}

View File

@ -1,40 +0,0 @@
/*
Author: bux578
Description:
Returns an array containing all items of a given unit
Arguments:
A player object
Return value:
An array containing all inventory items
*/
private ["_unit", "_allGear"];
_unit = _this select 0;
_allGear = [
(headgear _unit),
(goggles _unit),
(uniform _unit),
(uniformItems _unit),
(vest _unit),
(vestItems _unit),
(backpack _unit),
(backpackItems _unit),
(primaryWeapon _unit),
(primaryWeaponItems _unit),
(primaryWeaponMagazine _unit),
(secondaryWeapon _unit),
(secondaryWeaponItems _unit),
(secondaryWeaponMagazine _unit),
(handgunWeapon _unit),
(handgunItems _unit),
(handgunMagazine _unit),
(assignedItems _unit),
(binocular _unit)
];
_allGear

View File

@ -1,31 +0,0 @@
/*
Name: AGM_Respawn_fnc_handleKilled
Author(s):
bux578
Description:
Handles the XEH Killed event
Parameters:
0: OBJECT - Killed unit
1: OBJECT - Attacker
Returns:
VOID
*/
private ["_killedUnit"];
_killedUnit = _this select 0;
// Saves the gear when the player is killed
AGM_Respawn_unitGear = [];
if (AGM_Respawn_SavePreDeathGear) then {
AGM_Respawn_unitGear = [_killedUnit] call AGM_Respawn_fnc_getAllGear;
};
if (missionNamespace getVariable ["AGM_showFriendlyFireMessage", false]) then {
[_this, "AGM_Respawn_fnc_showFriendlyFireMessage", 2] call AGM_Core_fnc_execRemoteFnc;
};

View File

@ -1,17 +0,0 @@
// by commy2
private ["_rallypoint", "_name"];
_rallypoint = _this select 0;
if (!local _rallypoint) exitWith {};
_name = typeOf _rallypoint;
if (isNil _name) then {
missionNamespace setVariable [_name, _rallypoint];
publicVariable _name;
} else {
deleteVehicle _rallypoint;
diag_log text "[AGM] Respawn: ERROR Multiple Rallypoints of same type.";
};

View File

@ -1,43 +0,0 @@
/*
* Author: KoffeinFlummi, bux578, CAA-Picard, commy2
*
* Initializes the respawn module.
*
* Arguments:
* Whatever the module provides. (I dunno.)
*
* Return Value:
* None
*/
if !(isServer) exitWith {};
_logic = _this select 0;
_activated = _this select 2;
if !(_activated) exitWith {};
AGM_Respawn_Module = true;
[_logic, "AGM_Respawn_SavePreDeathGear", "SavePreDeathGear"] call AGM_Core_fnc_readBooleanParameterFromModule;
[_logic, "AGM_Respawn_RemoveDeadBodiesDisonncected", "RemoveDeadBodiesDisonncected"] call AGM_Core_fnc_readBooleanParameterFromModule;
if (isServer) then {
if (AGM_Respawn_RemoveDeadBodiesDisonncected) then {
_fnc_deleteDisconnected = {
_this spawn {
_unit = _this select 0;
sleep 4;
if (!alive _unit) then {
deleteVehicle _unit;
};
};
false
};
addMissionEventHandler ["HandleDisconnect", _fnc_deleteDisconnected];
};
};
diag_log text "[AGM]: Respawn Module Initialized.";

View File

@ -1,28 +0,0 @@
/*
* Author: commy2
*
* Initializes the Friendly Fire Messages module.
*
* Arguments:
* Whatever the module provides. (I dunno.)
*
* Return Value:
* None
*/
_this spawn {
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
if !(_activated) exitWith {};
if (isServer) then {
_varName = "AGM_showFriendlyFireMessage";
missionNamespace setVariable [_varName, true];
publicVariable _varName;
};
diag_log text "[AGM]: Friendly Fire Messages Module Initialized.";
};

View File

@ -1,25 +0,0 @@
/*
* Author: commy2
*
* Initializes the Rallypoint module.
*
* Arguments:
* Whatever the module provides. (I dunno.)
*
* Return Value:
* None
*/
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
if !(_activated) exitWith {};
//_mode = parseNumber (_logic getVariable "Action");
{
_x setVariable ["AGM_canMoveRallypoint", true];
} forEach _units;
diag_log text "[AGM]: Rallypoint Module Initialized.";

View File

@ -1,35 +0,0 @@
// by commy2
_this spawn {
_unit = _this select 0;
_side = _this select 1;
_rallypoint = [
objNull,
missionNamespace getVariable ["AGM_RallypointExit_West", objNull],
missionNamespace getVariable ["AGM_RallypointExit_East", objNull],
missionNamespace getVariable ["AGM_RallypointExit_Independent", objNull]
] select ([west, east, independent] find _side) + 1;
if (isNull _rallypoint) exitWith {};
_position = getPosATL _unit;
_position = _position findEmptyPosition [0, 2, typeOf _rallypoint];
if (count _position == 0) then {_position = getPosATL _unit};
_position set [2, 0];
["Deploy in 5 seconds ..."] call AGM_Core_fnc_displayTextStructured;
sleep 5;
_rallypoint setPosATL _position;
_unit reveal _rallypoint;
/*
_marker = format ["AGM_RallyPoint_%1", _side];
_marker setMarkerPos _position;
_marker setMarkerTextLocal format ["%1:%2", [date select 3, 2, 0] call CBA_fnc_FORMATNumber, [date select 4, 2, 0] call CBA_fnc_FORMATNumber];
*/
["Rallypoint deployed"] call AGM_Core_fnc_displayTextStructured;
};

View File

@ -1,30 +0,0 @@
/*
* Author: bux578
*
* removes the body
*
* Arguments:
* The body
*
* Return Value:
* None
*/
private ["_body", "_forceRemove", "_bodyRemoveTimer"];
_body = _this select 0;
_forceRemove = _this select 1;
_bodyRemoveTimer = AGM_Respawn_BodyRemoveTimer max 0;
// could be used for SpecOps missions.
if (_forceRemove) then {
_bodyRemoveTimer = 2;
};
[_body, _bodyRemoveTimer] spawn {
sleep (_this select 1);
// hideBody takes ~20s till body is fully underground
// a better hideBody would make this more aesthetic
deleteVehicle (_this select 0);
};

View File

@ -1,15 +0,0 @@
// by commy2
private ["_forceRemove", "_body"];
_forceRemove = _this select 0;
{
if (getPlayerUID _x == _uid) exitWith {
_body = _x;
};
} forEach playableUnits;
if (!isNil "_body" && {!alive _body}) then {
[_body, _forceRemove] call AGM_Respawn_fnc_removeBody;
};

View File

@ -1,12 +0,0 @@
// by commy2
private ["_unit", "_killer"];
_unit = _this select 0;
_killer = _this select 1;
if (_unit != _killer && side group _unit in [side group AGM_player, civilian] && {side group _killer == side group AGM_player}) then {
systemChat format ["%1 was killed by %2", [_unit] call AGM_Core_fnc_getName, [_killer] call AGM_Core_fnc_getName];
[_unit, "killedByFriendly", [_unit, _killer]] call AGM_Core_fnc_callCustomEventHandlers;
};

View File

@ -1,27 +0,0 @@
// by commy2
private ["_unit", "_side", "_toBase", "_rallypoint"];
_unit = _this select 0;
_side = _this select 1;
_toBase = _this select 2;
_rallypoint = ([
[
objNull,
missionNamespace getVariable ["AGM_RallypointExit_West", objNull],
missionNamespace getVariable ["AGM_RallypointExit_East", objNull],
missionNamespace getVariable ["AGM_RallypointExit_Independent", objNull]
],
[
objNull,
missionNamespace getVariable ["AGM_Rallypoint_West", objNull],
missionNamespace getVariable ["AGM_Rallypoint_East", objNull],
missionNamespace getVariable ["AGM_Rallypoint_Independent", objNull]
]
] select _toBase) select ([west, east, independent] find _side) + 1;
if (isNull _rallypoint) exitWith {};
_unit setPosASL (getPosASL _rallypoint);
[["Teleported to Rallypoint", "Teleported to Base"] select _toBase] call AGM_Core_fnc_displayTextStructured;

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
class CfgPatches {
class AGM_Aircraft {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;

View File

@ -0,0 +1 @@
z\ace\addons\blank

View File

@ -0,0 +1,137 @@
class CfgAmmo {
/* 6.5x39mm Grendel */
class BulletBase;
class B_65x39_Caseless: BulletBase {
typicalSpeed = 724;
airFriction = -0.000915;
};
// IR Dim
class B_65x39_Caseless_yellow;
class ACE_B_65x39_Caseless_Tracer_Dim: B_65x39_Caseless_yellow {
nvgOnly = 1;
};
class B_65x39_Case_yellow;
class ACE_B_65x39_Case_Tracer_Dim: B_65x39_Case_yellow {
nvgOnly = 1;
};
// sub sonic
class ACE_B_65x39_Caseless_SD: B_65x39_Caseless {
airFriction = -0.00054;
hit = 8.75;
supersonicCrackFar[] = {};
supersonicCrackNear[] = {};
typicalSpeed = 320;
audibleFire = 0.8;
visibleFire = 2.5;
};
class B_65x39_Case;
class ACE_B_65x39_Case_SD: B_65x39_Case {
airFriction = -0.00054;
hit = 8.75;
supersonicCrackFar[] = {};
supersonicCrackNear[] = {};
typicalSpeed = 320;
audibleFire = 0.8;
visibleFire = 2.5;
};
// armor piercing
class ACE_B_65x39_Caseless_AP: B_65x39_Caseless {
caliber = 1.8;
hit = 10.5;
};
class ACE_B_65x39_Case_AP: B_65x39_Case {
caliber = 1.8;
hit = 10.5;
};
/* 5.56x45mm NATO */
class B_556x45_Ball: BulletBase {
typicalSpeed = 911;
airFriction = -0.001335;
};
// IR Dim
class B_556x45_Ball_Tracer_Red;
class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red {
nvgOnly = 1;
};
// sub sonic
class ACE_B_556x45_Ball_SD: B_556x45_Ball {
airFriction = -0.0006;
hit = 7;
supersonicCrackFar[] = {};
supersonicCrackNear[] = {};
typicalSpeed = 320;
audibleFire = 0.6;
visibleFire = 2.0;
};
// armor piercing
class ACE_B_556x45_Ball_AP: B_556x45_Ball {
caliber = 1.4;
hit = 8.4;
};
/* 7.62x51mm NATO */
class B_762x51_Ball: BulletBase {
typicalSpeed = 853;
//airfriction =
};
// IR Dim
class B_762x51_Tracer_Red;
class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Red {
nvgOnly = 1;
};
// sub sonic
class ACE_B_762x51_Ball_SD: B_762x51_Ball {
airFriction = -0.00048;
hit = 10.5;
supersonicCrackFar[] = {};
supersonicCrackNear[] = {};
typicalSpeed = 320;
audibleFire = 0.9;
visibleFire = 3.0;
};
// armor piercing
class ACE_B_762x51_Ball_AP: B_762x51_Ball {
caliber = 2.4;
hit = 12.6;
};
// M118 LR
class ACE_B_762x51_M118LR: B_762x51_Ball {
typicalspeed = 792;
airfriction = -0.0008577;
};
/* Other */
class B_9x21_Ball;
class B_9x19_Ball: B_9x21_Ball {
typicalSpeed = 381;
airfriction = -0.00213;
};
class B_45ACP_Ball: BulletBase {
typicalSpeed = 250;
airfriction = -0.0009;
};
};

View File

@ -0,0 +1,183 @@
class CfgMagazines {
/* 6.5x39mm Grendel - MX */
class CA_Magazine;
class 30Rnd_65x39_caseless_mag: CA_Magazine {
initSpeed = 724;
};
class 100Rnd_65x39_caseless_mag: CA_Magazine {
initSpeed = 724;
};
class 30Rnd_65x39_caseless_mag_Tracer;
class ACE_30Rnd_65x39_caseless_mag_Tracer_Dim: 30Rnd_65x39_caseless_mag_Tracer {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_65x39_Caseless_Tracer_Dim";
displayName = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimName";
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimDescription";
picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_yellow_CA.paa";
};
class ACE_30Rnd_65x39_caseless_mag_SD: 30Rnd_65x39_caseless_mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_65x39_Caseless_SD";
displayName = "$STR_ACE_30Rnd_65x39_caseless_mag_SDName";
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription";
picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa";
initSpeed = 320;
};
class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_65x39_Caseless_AP";
displayName = "$STR_ACE_30Rnd_65x39_caseless_mag_APName";
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_mag_APNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_APDescription";
};
/* 6.5x39mm Grendel - Katiba */
class 30Rnd_65x39_caseless_green: 30Rnd_65x39_caseless_mag {
initSpeed = 724;
};
class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag {
initSpeed = 691;
};
class 30Rnd_65x39_caseless_green_mag_Tracer;
class ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim: 30Rnd_65x39_caseless_green_mag_Tracer {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_65x39_Caseless_Tracer_Dim";
displayName = "$STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimName";
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimDescription";
};
class ACE_30Rnd_65x39_caseless_green_mag_SD: 30Rnd_65x39_caseless_green {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_65x39_Caseless_SD";
displayName = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDName";
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription";
initSpeed = 320;
};
class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_65x39_Caseless_AP";
displayName = "$STR_ACE_30Rnd_65x39_caseless_green_mag_APName";
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_APNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_APDescription";
};
/* 5.56x45mm NATO */
class 30Rnd_556x45_Stanag: CA_Magazine {
initSpeed = 911;
};
class 30Rnd_556x45_Stanag_Tracer_Red; //picture = "\A3\weapons_f\data\ui\m_30stanag_red_ca.paa";
class ACE_30Rnd_556x45_Stanag_Tracer_Dim: 30Rnd_556x45_Stanag_Tracer_Red {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_556x45_Ball_Tracer_Dim";
displayName = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimName";
displayNameShort = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimNameShort";
descriptionShort = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimDescription";
picture = "\A3\weapons_f\data\ui\m_30stanag_yellow_ca.paa";
};
class ACE_30Rnd_556x45_Stanag_SD: 30Rnd_556x45_Stanag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_556x45_Ball_SD";
displayName = "$STR_ACE_30Rnd_556x45_mag_SDName";
displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription";
initSpeed = 320;
picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa";
};
class ACE_30Rnd_556x45_Stanag_AP: 30Rnd_556x45_Stanag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_556x45_Ball_AP";
displayName = "$STR_ACE_30Rnd_556x45_mag_APName";
displayNameShort = "$STR_ACE_30Rnd_556x45_mag_APNameShort";
descriptionShort = "$STR_ACE_30Rnd_556x45_mag_APDescription";
};
/* 7.62x51mm NATO */
class 20Rnd_762x51_Mag: CA_Magazine {
descriptionshort = "$STR_ACE_Ballistics_20Rnd_762x51_Mag_Description";
initSpeed = 792; // 18" M14 EBR barrel
ammo = "ACE_B_762x51_M118LR"; // Use M118LR
};
class 150Rnd_762x51_Box: CA_Magazine {
ammo = "B_762x51_Ball";
initSpeed = 853; // Typical MV for M240
};
class ACE_20Rnd_762x51_Mag_Tracer: 20Rnd_762x51_Mag { //@todo Green tracers for opfor and yellow tracers for independent
author = "$STR_ACE_Common_ACETeam";
ammo = "B_762x51_Tracer_Red";
displayName = "$STR_ACE_20Rnd_762x51_mag_TracerName";
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_TracerNameShort";
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_TracerDescription";
tracersEvery = 1;
};
class ACE_20Rnd_762x51_Mag_Tracer_Dim: ACE_20Rnd_762x51_Mag_Tracer {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_762x51_Tracer_Dim";
displayName = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimName";
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimNameShort";
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimDescription";
};
class ACE_20Rnd_762x51_Mag_SD: 20Rnd_762x51_Mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_762x51_Ball_SD";
displayName = "$STR_ACE_20Rnd_762x51_mag_SDName";
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort";
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription";
initSpeed = 320;
};
class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_B_762x51_Ball_AP";
displayName = "$STR_ACE_20Rnd_762x51_mag_APName";
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_APNameShort";
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_APDescription";
};
/* Other */
class 30Rnd_9x21_Mag: CA_Magazine {
ammo = "B_9x19_Ball";
initSpeed = 370;
};
class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag {
ammo = "B_9x19_Ball";
initSpeed = 381;
};
class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag {
initSpeed = 259;
};
class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 {
initSpeed = 250;
};
};

View File

@ -0,0 +1,206 @@
#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \
magazine = #MAGAZINE; \
count = COUNT; \
};
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
class CfgVehicles {
#include <FixUniforms.hpp>
#include <FixHelmets.hpp>
class NATO_Box_Base;
class Box_NATO_Wps_F: NATO_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2);
};
};
class Box_NATO_WpsSpecial_F: NATO_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_Tracer_Dim,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1);
};
};
class Box_NATO_Ammo_F: NATO_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,2);
};
};
class Box_NATO_Support_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_muzzle_mzls_H,5);
MACRO_ADDITEM(ACE_muzzle_mzls_B,5);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_01,5);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_02,5);
};
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,6);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,3);
};
};
class ReammoBox_F;
class B_supplyCrate_F: ReammoBox_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,2);
};
};
class EAST_Box_Base;
class Box_East_Wps_F: EAST_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2);
};
};
class Box_East_WpsSpecial_F: EAST_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1);
};
};
class Box_East_Ammo_F: EAST_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2);
};
};
class Box_East_Support_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_muzzle_mzls_H,5);
MACRO_ADDITEM(ACE_muzzle_mzls_B,5);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_01,5);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_02,5);
};
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,6);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,3);
};
};
class O_supplyCrate_F: B_supplyCrate_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2);
};
};
class IND_Box_Base;
class Box_IND_Wps_F: IND_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2);
};
};
class Box_IND_WpsSpecial_F: IND_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,2);
};
};
class Box_IND_Ammo_F: IND_Box_Base {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2);
};
};
class Box_IND_Support_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_muzzle_mzls_H,1);
MACRO_ADDITEM(ACE_muzzle_mzls_B,5);
MACRO_ADDITEM(ACE_muzzle_mzls_L,5);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_01,5);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_02,5);
};
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,6);
};
};
class FIA_Box_Base_F;
class Box_FIA_Wps_F: FIA_Box_Base_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2);
};
};
class Box_FIA_Ammo_F: FIA_Box_Base_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2);
};
};
class Box_FIA_Support_F: FIA_Box_Base_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,6);
};
};
class I_supplyCrate_F: B_supplyCrate_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2);
};
};
class IG_supplyCrate_F: ReammoBox_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2);
};
};
class C_supplyCrate_F: ReammoBox_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2);
};
};
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_Tracer_Dim,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2);
/*MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer,2);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,2);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,2);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_AP,2);*/
};
class TransportItems {
MACRO_ADDITEM(ACE_muzzle_mzls_H,2);
MACRO_ADDITEM(ACE_muzzle_mzls_B,2);
MACRO_ADDITEM(ACE_muzzle_mzls_L,2);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_01,2);
MACRO_ADDITEM(ACE_muzzle_mzls_smg_02,2);
};
};
class Sign_F;
class ACE_TargetWall: Sign_F {
author = "$STR_ACE_Common_ACETeam";
class Eventhandlers {
init = QUOTE(_this call COMPILE_FILE(scripts\initTargetWall));
//hitPart = "systemChat str _this";
};
};
};

View File

@ -0,0 +1,787 @@
class Mode_SemiAuto;
class Mode_FullAuto;
class SlotInfo;
class CfgWeapons {
/* MX */
class Rifle;
class Rifle_Base_F: Rifle {
class WeaponSlotsInfo;
};
class arifle_MX_Base_F: Rifle_Base_F {
magazines[] += {
"ACE_30Rnd_65x39_caseless_mag_Tracer_Dim",
"ACE_30Rnd_65x39_caseless_mag_SD",
"ACE_30Rnd_65x39_caseless_mag_AP",
"100Rnd_65x39_caseless_mag",
"100Rnd_65x39_caseless_mag_Tracer"
};
class Single: Mode_SemiAuto {
dispersion = 0.000800; // radians. Equal to 2.75 MOA.
// Based on widely cited 2 MOA figure for new 5.56 ACR.
};
class FullAuto: Mode_FullAuto {
dispersion = 0.00147; // radians. Equal to 5.1 MOA.
};
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_H"};
};
};
};
class arifle_MX_SW_F: arifle_MX_Base_F {
magazines[] += {
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer"
};
class Single: Mode_SemiAuto {
dispersion = 0.000800; // radians. Equal to 2.75 MOA.
// Based on widely cited 2 MOA figure for new 5.56 ACR.
};
class manual: FullAuto {
dispersion = 0.00147; // radians. Equal to 5.1 MOA.
};
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot {
// Shit is broken again
//compatibleItems[] += {"ACE_muzzle_mzls_H"};
compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"};
};
};
};
class arifle_MXM_F: arifle_MX_Base_F {
magazines[] += {
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer"
};
class Single: Single {
dispersion = 0.00029; // radians. Equal to 1 MOA.
// 6.5mm is easily capable of this in a half-tuned rifle.
};
class FullAuto: FullAuto {
dispersion = 0.000800; // radians. Equal to 2.75 MOA.
};
};
/* Katiba */
class arifle_katiba_Base_F: Rifle_Base_F {
magazines[] += {
"ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim",
"ACE_30Rnd_65x39_caseless_green_mag_SD",
"ACE_30Rnd_65x39_caseless_green_mag_AP"
};
class Single: Mode_SemiAuto {
dispersion = 0.000800; // radians. Equal to 2.75 MOA.
// Based on widely cited 2 MOA figure for new 5.56 ACR?
// Use your imagination for fictional weapons!
};
class FullAuto: Mode_FullAuto {
dispersion = 0.00147; // radians. Equal to 5.1 MOA.
};
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_H"};
};
};
};
/* Other */
class Rifle_Long_Base_F: Rifle_Base_F {
class WeaponSlotsInfo;
};
class EBR_base_F: Rifle_Long_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_B"};
};
};
};
class DMR_01_base_F: Rifle_Long_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_B"};
};
};
};
class LMG_Mk200_F: Rifle_Long_Base_F {
class manual: Mode_FullAuto {
dispersion = 0.00175; // radians. Equal to 6 MOA.
};
class Single: manual {
dispersion = 0.00175; // radians. Equal to 6 MOA.
};
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_H"};
};
};
};
class LMG_Zafir_F: Rifle_Long_Base_F {
class FullAuto: Mode_FullAuto {
dispersion = 0.00175; // radians. Equal to 6 MOA.
};
class Single: Mode_SemiAuto {
dispersion = 0.00175; // radians. Equal to 6 MOA.
};
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_B"};
};
};
};
/* Assault Rifles */
class Tavor_base_F: Rifle_Base_F {
magazines[] += {
"ACE_30Rnd_556x45_Stanag_Tracer_Dim",
"ACE_30Rnd_556x45_Stanag_SD",
"ACE_30Rnd_556x45_Stanag_AP"
};
class Single: Mode_SemiAuto {
dispersion = 0.000727; // radians. Equal to 2.5 MOA, about the limit of mass-produced M855.
//
};
class FullAuto: Mode_FullAuto {
dispersion = 0.00147; // radians. Equal to 5.1 MOA.
};
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_L"};
};
};
};
class mk20_base_F: Rifle_Base_F {
magazines[] += {
"ACE_30Rnd_556x45_Stanag_Tracer_Dim",
"ACE_30Rnd_556x45_Stanag_SD",
"ACE_30Rnd_556x45_Stanag_AP"
};
class Single: Mode_SemiAuto {
dispersion = 0.0008727; // radians. Equal to 3 MOA, about the limit of mass-produced M855 plus
// some extra for these worn out Greek Army service rifles.
};
class FullAuto: Mode_FullAuto {
dispersion = 0.00147; // radians. Equal to 5.1 MOA.
};
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_L"};
};
};
};
/* SMGs */
class SDAR_base_F: Rifle_Base_F {
magazines[] += {
"ACE_30Rnd_556x45_Stanag_Tracer_Dim",
"ACE_30Rnd_556x45_Stanag_SD",
"ACE_30Rnd_556x45_Stanag_AP"
};
class Single: Mode_SemiAuto {
dispersion = 0.0008727; // radians. Equal to 3 MOA, about the limit of mass-produced M855 plus
// some extra because Kel-Tec.
};
class FullAuto: Mode_FullAuto {
dispersion = 0.00147; // radians. Equal to 5.1 MOA.
};
};
class pdw2000_base_F: Rifle_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
};
};
};
class SMG_01_Base: Rifle_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
};
};
};
class SMG_02_base_F: Rifle_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
};
};
};
/* Pistols */
class Pistol;
class Pistol_Base_F: Pistol {
class WeaponSlotsInfo;
};
class hgun_P07_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
};
};
};
class hgun_Rook40_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
};
};
};
class hgun_ACPC2_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
};
};
};
class hgun_Pistol_heavy_01_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: SlotInfo {
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
};
};
};
/*class hgun_Pistol_heavy_02_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot {
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
};
};
};*/
/* Silencers */
class ItemCore;
class InventoryMuzzleItem_Base_F;
class muzzle_snds_H: ItemCore {
class ItemInfo: InventoryMuzzleItem_Base_F {
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 0.9;
visibleFire = 0.5;
audibleFire = 0.1;
visibleFireTime = 0.5;
audibleFireTime = 0.5;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.8f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
};
class muzzle_snds_L: muzzle_snds_H {
class ItemInfo: ItemInfo {
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 0.9;
visibleFire = 0.5;
audibleFire = 0.1;
visibleFireTime = 0.5;
audibleFireTime = 0.5;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.8f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
};
class muzzle_snds_M: muzzle_snds_H {
class ItemInfo: ItemInfo {
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 0.9;
visibleFire = 0.5;
audibleFire = 0.1;
visibleFireTime = 0.5;
audibleFireTime = 0.5;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.8f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
};
class muzzle_snds_B: muzzle_snds_H {
class ItemInfo: ItemInfo {
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 0.9;
visibleFire = 0.5;
audibleFire = 0.1;
visibleFireTime = 0.5;
audibleFireTime = 0.5;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.8f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
};
class muzzle_snds_H_MG: muzzle_snds_H {
class ItemInfo: ItemInfo {
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 0.9;
visibleFire = 0.5;
audibleFire = 0.1;
visibleFireTime = 0.5;
audibleFireTime = 0.5;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.8f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
};
class muzzle_snds_H_SW: muzzle_snds_H_MG {
class ItemInfo: ItemInfo {
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 0.9;
visibleFire = 0.5;
audibleFire = 0.1;
visibleFireTime = 0.5;
audibleFireTime = 0.5;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.8f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
};
class muzzle_snds_acp: muzzle_snds_H {
class ItemInfo: ItemInfo {
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 0.9;
visibleFire = 0.5;
audibleFire = 0.1;
visibleFireTime = 0.5;
audibleFireTime = 0.5;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.8f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
};
/* Flash suppressors */
class ACE_muzzle_mzls_H: ItemCore {
author = "$STR_ACE_Core_AGMTeam";
_generalMacro = "ACE_muzzle_mzls_H";
htMin = 1;
htMax = 600;
afMax = 0;
mfMax = 0;
mFact = 1;
tBody = 100;
scope = 2;
displayName = "$STR_ACE_muzzle_mzls_H";
picture = "\A3\weapons_F\Data\UI\gear_acca_mzls_h_ca.paa";
model = "\A3\weapons_f\acc\acca_mzls_H_F";
class ItemInfo: InventoryMuzzleItem_Base_F {
mass = 8;
soundTypeIndex = 0;
muzzleEnd = "zaslehPoint";
alternativeFire = "Zasleh2";
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 1.0;
visibleFire = 0.5;
audibleFire = 1.0;
visibleFireTime = 0.5;
audibleFireTime = 1.0;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.9f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
inertia = 0.2;
};
class ACE_muzzle_mzls_B: ACE_muzzle_mzls_H {
author = "$STR_ACE_Core_AGMTeam";
_generalMacro = "ACE_muzzle_mzls_B";
displayName = "$STR_ACE_muzzle_mzls_B";
picture = "\A3\weapons_F\Data\UI\gear_acca_mzls_h_ca.paa";
model = "\A3\weapons_f\acc\acca_mzls_H_F";
class ItemInfo: ItemInfo {
mass = 6;
soundTypeIndex = 0;
muzzleEnd = "zaslehPoint";
alternativeFire = "Zasleh2";
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 1.0;
visibleFire = 0.5;
audibleFire = 1.0;
visibleFireTime = 0.5;
audibleFireTime = 1.0;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.9f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
inertia = 0.2;
};
class ACE_muzzle_mzls_L: ACE_muzzle_mzls_H {
author = "$STR_ACE_Core_AGMTeam";
_generalMacro = "ACE_muzzle_mzls_L";
displayName = "$STR_ACE_muzzle_mzls_L";
picture = "\A3\weapons_F\Data\UI\gear_acca_mzls_l_ca.paa";
model = "\A3\weapons_f\acc\acca_mzls_l_F";
class ItemInfo: ItemInfo {
mass = 6;
soundTypeIndex = 0;
muzzleEnd = "zaslehPoint";
alternativeFire = "Zasleh2";
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 1.0;
visibleFire = 0.5;
audibleFire = 1.0;
visibleFireTime = 0.5;
audibleFireTime = 1.0;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.9f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
inertia = 0.1;
};
class ACE_muzzle_mzls_smg_01: ACE_muzzle_mzls_H {
author = "$STR_ACE_Core_AGMTeam";
_generalMacro = "ACE_muzzle_mzls_smg_01";
displayName = "$STR_ACE_muzzle_mzls_smg_01";
picture = "\A3\weapons_F\Data\UI\gear_acca_mzls_l_ca.paa";
model = "\A3\weapons_f\acc\acca_mzls_H_F"; //"\A3\weapons_f\acc\acca_mzls_smg_01_F";
class ItemInfo: ItemInfo {
mass = 6;
soundTypeIndex = 0;
muzzleEnd = "zaslehPoint";
alternativeFire = "Zasleh2";
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 1.0;
visibleFire = 0.5;
audibleFire = 1.0;
visibleFireTime = 0.5;
audibleFireTime = 1.0;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.9f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
inertia = 0.1;
};
class ACE_muzzle_mzls_smg_02: ACE_muzzle_mzls_H {
author = "$STR_ACE_Core_AGMTeam";
_generalMacro = "ACE_muzzle_mzls_smg_02";
displayName = "$STR_ACE_muzzle_mzls_smg_02";
picture = "\A3\weapons_F\Data\UI\gear_acca_mzls_l_ca.paa";
model = "\A3\weapons_f\acc\acca_mzls_H_F"; //"\A3\weapons_f\acc\acca_mzls_smg_01_F";
class ItemInfo: ItemInfo {
mass = 6;
soundTypeIndex = 0;
muzzleEnd = "zaslehPoint";
alternativeFire = "Zasleh2";
class MagazineCoef {
initSpeed = 1.0;
};
class AmmoCoef {
hit = 1.0;
visibleFire = 0.5;
audibleFire = 1.0;
visibleFireTime = 0.5;
audibleFireTime = 1.0;
cost = 1.0;
typicalSpeed = 1.0;
airFriction = 1.0;
};
class MuzzleCoef {
dispersionCoef = "0.9f";
artilleryDispersionCoef = "1.0f";
fireLightCoef = "0.5f";
recoilCoef = "1.0f";
recoilProneCoef = "1.0f";
minRangeCoef = "1.0f";
minRangeProbabCoef = "1.0f";
midRangeCoef = "1.0f";
midRangeProbabCoef = "1.0f";
maxRangeCoef = "1.0f";
maxRangeProbabCoef = "1.0f";
};
};
inertia = 0.1;
};
/* Vests */
#include <FixVests.hpp>
};

View File

@ -0,0 +1,18 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {"ACE_TargetWall"};
weapons[] = {"ACE_muzzle_mzls_H","ACE_muzzle_mzls_B","ACE_muzzle_mzls_L","ACE_muzzle_mzls_smg_01","ACE_muzzle_mzls_smg_02"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"TaoSensai","commy2"};
authorUrl = "https://github.com/Taosenai/tmr";
VERSION_CONFIG;
};
};
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

View File

@ -0,0 +1,48 @@
// CFGWeapons
ACE_muzzle_mzls_H
ACE_muzzle_mzls_B
ACE_muzzle_mzls_L
ACE_muzzle_mzls_smg_01
ACE_muzzle_mzls_smg_02
// CFGAmmo
ACE_B_65x39_Caseless_Tracer_Dim
ACE_B_65x39_Caseless_SD
ACE_B_65x39_Caseless_AP
ACE_B_65x39_Case_Tracer_Dim
ACE_B_65x39_Case_SD
ACE_B_65x39_Case_AP
ACE_B_556x45_Ball_Tracer_Dim
ACE_B_556x45_Ball_SD
ACE_B_556x45_Ball_AP
ACE_B_762x51_Tracer_Dim
ACE_B_762x51_Ball_SD
ACE_B_762x51_Ball_AP
ACE_B_762x51_M118LR
// CFGMagazines
ACE_30Rnd_65x39_caseless_mag_Tracer_Dim
ACE_30Rnd_65x39_caseless_mag_SD
ACE_30Rnd_65x39_caseless_mag_AP
ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim
ACE_30Rnd_65x39_caseless_green_mag_SD
ACE_30Rnd_65x39_caseless_green_mag_AP
ACE_30Rnd_556x45_Stanag_Tracer_Dim
ACE_30Rnd_556x45_Stanag_SD
ACE_30Rnd_556x45_Stanag_AP
ACE_20Rnd_762x51_Mag_Tracer
ACE_20Rnd_762x51_Mag_Tracer_Dim
ACE_20Rnd_762x51_Mag_SD
ACE_20Rnd_762x51_Mag_AP

View File

@ -0,0 +1,12 @@
#define COMPONENT ballistics
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_BALLISTICS
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_ENABLED_BALLISTICS
#define DEBUG_SETTINGS DEBUG_ENABLED_BALLISTICS
#endif
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-12-15 -->
<Project name="AGM">
<Project name="ACE">
<Package name="Ballistics">
<!-- MX -->
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_Tracer_DimName">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimName">
<English>6.5mm 30Rnd Tracer IR-DIM Mag</English>
<Hungarian>6,5 mm Nyomjelző IR-DIM 30-as Tár</Hungarian>
<German>6,5 mm 30-Schuss-Magazin Leuchtspur IR-DIM</German>
@ -15,7 +15,7 @@
<Italian>Caricatore 6.5mm 30Rnd Traccianti IR-DIM</Italian>
<Russian>Магазин из 30-и 6.5 мм трассирующих под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_Tracer_DimNameShort">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimNameShort">
<English>6.5mm IR-DIM</English>
<Hungarian>6,5 mm IR-DIM</Hungarian>
<German>6,5mm IR-DIM</German>
@ -27,7 +27,7 @@
<Italian>6.5 IR-DIM</Italian>
<Russian>6.5 мм трассирущие под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_Tracer_DimDescription">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimDescription">
<English>Caliber: 6.5x39 mm Tracer IR-DIM&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: MX/C/M/SW/3GL</English>
<Hungarian>Kaliber: 6,5x39 mm Nyomjelző IR-DIM&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: MX/C/M/SW/3GL</Hungarian>
<German>Kaliber: 6,5x39 mm Leuchtspur IR-DIM&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: MX/C/M/SW/3GL</German>
@ -39,7 +39,7 @@
<Italian>Calibro: 6.5x39 mm Traccianti IR-DIM &lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL</Italian>
<Russian>Калибр: 6.5x39 мм трассирующие под ПНВ&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: MX/C/M/SW/3GL</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_SDName">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_SDName">
<English>6.5mm 30Rnd SD Mag</English>
<Hungarian>6,5 mm Hangtompítós 30-as Tár</Hungarian>
<German>6,5 mm 30-Schuss-Magazin SD</German>
@ -51,7 +51,7 @@
<Italian>Caricatore 6.5mm 30Rnd Sil.</Italian>
<Russian>Магазин из 30-и 6.5 мм дозвуковых</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_SDNameShort">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_SDNameShort">
<English>6.5mm SD</English>
<Hungarian>6,5 mm Hangtompítós</Hungarian>
<German>6,5mm SD</German>
@ -63,7 +63,7 @@
<Italian>6.5mm Sil.</Italian>
<Russian>6.5 мм дозвуковые</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_SDDescription">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_SDDescription">
<English>Caliber: 6.5x39 mm SD&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: MX/C/M/SW/3GL</English>
<Hungarian>Kaliber: 6,5x39 mm Hangtompítós&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: MX/C/M/SW/3GL</Hungarian>
<German>Kaliber: 6,5x39 mm SD&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: MX/C/M/SW/3GL</German>
@ -75,7 +75,7 @@
<Italian>Calibro: 6.5x39 mm Sil.&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL </Italian>
<Russian>Калибр: 6.5x39 мм дозвуковые&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: MX/C/M/SW/3GL</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_APName">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_APName">
<English>6.5mm 30Rnd AP Mag</English>
<Hungarian>6,5 mm Páncéltörő 30-as Tár</Hungarian>
<German>6,5 mm 30-Schuss-Magazin AP</German>
@ -87,7 +87,7 @@
<Italian>Caricatore 6.5mm 30Rnd AP</Italian>
<Russian>Магазин из 30-и 6.5 мм бронебойных</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_APNameShort">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_APNameShort">
<English>6.5mm AP</English>
<Hungarian>6,5 mm Páncéltörő</Hungarian>
<German>6,5mm AP</German>
@ -99,7 +99,7 @@
<Italian>6.5mm AP</Italian>
<Russian>6.5 мм бронебойные</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_mag_APDescription">
<Key ID="STR_ACE_30Rnd_65x39_caseless_mag_APDescription">
<English>Caliber: 6.5x39 mm AP&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: MX/C/M/SW/3GL</English>
<Hungarian>Kaliber: 6,5x39 mm Páncéltörő&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: MX/C/M/SW/3GL</Hungarian>
<German>Kaliber: 6,5x39 mm AP&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: MX/C/M/SW/3GL</German>
@ -112,7 +112,7 @@
<Russian>Калибр: 6.5x39 мм бронебойные&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: MX/C/M/SW/3GL</Russian>
</Key>
<!-- KATIBA -->
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_Tracer_DimName">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimName">
<English>6.5mm 30Rnd Tracer IR-DIM Mag</English>
<Hungarian>6,5mm IR-DIM Nyomjelző 30-as Tár</Hungarian>
<German>6,5 mm 30-Schuss-Magazin Leuchtspur IR-DIM</German>
@ -124,7 +124,7 @@
<Italian>Caricatore 6.5mm 30Rnd Traccianti IR-DIM</Italian>
<Russian>Магазин из 30-и 6.5 мм трассирующих под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_Tracer_DimNameShort">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimNameShort">
<English>6.5mm IR-DIM</English>
<Hungarian>6,5mm IR-DIM</Hungarian>
<German>6,5mm IR-DIM</German>
@ -136,7 +136,7 @@
<Italian>6.5mm IR-DIM</Italian>
<Russian>6.5 мм трассирущие под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_Tracer_DimDescription">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimDescription">
<English>Caliber: 6.5x39 mm Tracer IR-DIM&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: Katiba</English>
<Hungarian>Kaliber: 6,5x39 mm Nyomjelző IR-DIM&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: Katiba</Hungarian>
<German>Kaliber: 6,5x39 mm Leuchtspur IR-DIM&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: Katiba</German>
@ -148,7 +148,7 @@
<Italian>Calibro: 6.5x39 mm Tracciant IR-DIM&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6.5x39 мм трассирующие под ПНВ&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: Katiba</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_SDName">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_SDName">
<English>6.5mm 30Rnd SD Mag</English>
<Hungarian>6,5 mm Hangtompítós 30-as Tár</Hungarian>
<German>6,5 mm 30-Schuss-Magazin SD</German>
@ -160,7 +160,7 @@
<Italian>Caricatore 6.5mm 30Rnd Sil.</Italian>
<Russian>Магазин из 30-и 6.5 мм дозвуковых</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_SDNameShort">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort">
<English>6.5mm SD</English>
<Hungarian>6,5 mm Hangtompítós</Hungarian>
<German>6,5mm SD</German>
@ -172,7 +172,7 @@
<Italian>6.5mm Sil.</Italian>
<Russian>6.5 мм дозвуковые</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_SDDescription">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription">
<English>Caliber: 6.5x39 mm SD&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: Katiba</English>
<Hungarian>Kaliber: 6,5x39 mm Hangtompítós&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: Katiba</Hungarian>
<German>Kaliber: 6,5x39 mm SD&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: Katiba</German>
@ -184,7 +184,7 @@
<Italian>Calibro: 6.5x39 mm Sil.&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6.5x39 мм дозвуковые&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: Katiba</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_APName">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_APName">
<English>6.5mm 30Rnd AP Mag</English>
<Hungarian>6,5 mm Páncéltörő 30-as Tár</Hungarian>
<German>6,5 mm 30-Schuss-Magazin AP</German>
@ -196,7 +196,7 @@
<Italian>Caricatore 6.5mm 30Rnd AP</Italian>
<Russian>Магазин из 30-и 6.5 мм бронебойных</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_APNameShort">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_APNameShort">
<English>6.5mm AP</English>
<Hungarian>6,5 mm Páncéltörő</Hungarian>
<German>6,5mm AP</German>
@ -208,7 +208,7 @@
<Italian>6.5mm AP</Italian>
<Russian>6.5 мм бронебойные</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_65x39_caseless_green_mag_APDescription">
<Key ID="STR_ACE_30Rnd_65x39_caseless_green_mag_APDescription">
<English>Caliber: 6.5x39 mm AP&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: Katiba</English>
<Hungarian>Kaliber: 6,5x39 mm Páncéltörő&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: Katiba</Hungarian>
<German>Kaliber: 6,5x39 mm AP&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: Katiba</German>
@ -221,7 +221,7 @@
<Russian>Калибр: 6.5x39 мм бронебойные&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: Katiba</Russian>
</Key>
<!-- 5.56x45mm -->
<Key ID="STR_AGM_30Rnd_556x45_mag_Tracer_DimName">
<Key ID="STR_ACE_30Rnd_556x45_mag_Tracer_DimName">
<English>5.56mm 30rnd Tracer IR-DIM Mag</English>
<Hungarian>5,56 mm Nyomjelző IR-DIM 30-as Tár</Hungarian>
<German>5,56 mm 30-Schuss-Magazin Leuchtspur IR-DIM</German>
@ -233,7 +233,7 @@
<Italian>Caricatore 5.56mm 30rnd Traccianti IR-DIM</Italian>
<Russian>Магазин из 30-и 5.56 мм трассирующих под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_Tracer_DimNameShort">
<Key ID="STR_ACE_30Rnd_556x45_mag_Tracer_DimNameShort">
<English>5.56mm IR-DIM</English>
<Hungarian>5,56 mm IR-DIM</Hungarian>
<German>5,56mm IR-DIM</German>
@ -245,7 +245,7 @@
<Italian>5.56mm IR-DIM</Italian>
<Russian>5.56 мм трассирущие под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_Tracer_DimDescription">
<Key ID="STR_ACE_30Rnd_556x45_mag_Tracer_DimDescription">
<English>Caliber: 5.56x45 mm Tracer IR-DIM&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</English>
<Hungarian>Kaliber: 5,56x45 mm Nyomjelző IR-DIM&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Hungarian>
<German>Kaliber: 5,56x45 mm Leuchtspur IR-DIM&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</German>
@ -257,7 +257,7 @@
<Italian>Calibro: 5.56x45 mm Traccianti IR-DIM&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Italian>
<Russian>Калибр: 5.56x45 мм трассирующие под ПНВ&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_SDName">
<Key ID="STR_ACE_30Rnd_556x45_mag_SDName">
<English>5.56mm 30Rnd SD Mag</English>
<Hungarian>5,56 mm Hangtompítós 30-as Tár</Hungarian>
<German>5,56 mm 30-Schuss-Magazin SD</German>
@ -269,7 +269,7 @@
<Italian>Caricatore 5.56mm 30Rnd Sil.</Italian>
<Russian>Магазин из 30-и 5.56 мм дозвуковых</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_SDNameShort">
<Key ID="STR_ACE_30Rnd_556x45_mag_SDNameShort">
<English>5.56mm SD</English>
<Hungarian>5,56 mm Hangtompítós</Hungarian>
<German>5,56mm SD</German>
@ -281,7 +281,7 @@
<Italian>5.56 Sil.</Italian>
<Russian>5.56 мм дозвуковые</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_SDDescription">
<Key ID="STR_ACE_30Rnd_556x45_mag_SDDescription">
<English>Caliber: 5.56x45 mm SD&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</English>
<Hungarian>Kaliber: 5,56x45 mm Hangtompítós&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Hungarian>
<German>Kaliber: 5,56x45 mm SD&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</German>
@ -293,7 +293,7 @@
<Italian>Calibro: 5.56x45 mm Sil.&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Italian>
<Russian>Калибр: 5.56x45 мм дозвуковые&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_APName">
<Key ID="STR_ACE_30Rnd_556x45_mag_APName">
<English>5.56mm 30Rnd AP Mag</English>
<Hungarian>5,56 mm Páncéltörő 30-as Tár</Hungarian>
<German>5,56 mm 30-Schuss-Magazin AP</German>
@ -305,7 +305,7 @@
<Italian>Caricatore 5.56mm 30Rnd AP</Italian>
<Russian>Магазин из 30-и 5.56 мм бронебойных</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_APNameShort">
<Key ID="STR_ACE_30Rnd_556x45_mag_APNameShort">
<English>5.56mm AP</English>
<Hungarian>5,56 mm Páncéltörő</Hungarian>
<German>5,56mm AP</German>
@ -317,7 +317,7 @@
<Italian>5.56mm AP</Italian>
<Russian>5.56 мм бронебойные</Russian>
</Key>
<Key ID="STR_AGM_30Rnd_556x45_mag_APDescription">
<Key ID="STR_ACE_30Rnd_556x45_mag_APDescription">
<English>Caliber: 5.56x45 mm AP&lt;br /&gt;Rounds: 30&lt;br /&gt;Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</English>
<Hungarian>Kaliber: 5,56x45 mm Páncéltörő&lt;br /&gt;Lőszerek: 30&lt;br /&gt;Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Hungarian>
<German>Kaliber: 5,56x45 mm AP&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</German>
@ -330,7 +330,7 @@
<Russian>Калибр: 5.56x45 мм бронебойные&lt;br /&gt;Патронов: 30&lt;br /&gt;Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Russian>
</Key>
<!-- 7.62x51mm -->
<Key ID="STR_AGM_20Rnd_762x51_mag_TracerName">
<Key ID="STR_ACE_20Rnd_762x51_mag_TracerName">
<English>7.62mm 20rnd Tracer Mag</English>
<Hungarian>7,62 mm Nyomjelző IR-DIM 20-as Tár</Hungarian>
<German>7,62 mm 20-Schuss-Magazin Leuchtspur</German>
@ -342,7 +342,7 @@
<Italian>Caricatore 7.62mm 20Rnd Traccianti</Italian>
<Russian>Магазин из 20-и 7.62 мм трассирующих</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_TracerNameShort">
<Key ID="STR_ACE_20Rnd_762x51_mag_TracerNameShort">
<English>7.62mm Tracer</English>
<Hungarian>7,62 mm Nyomjelző</Hungarian>
<German>7,62mm Leuchtspur</German>
@ -354,7 +354,7 @@
<Italian>7.62mm Traccianti</Italian>
<Russian>7.62 мм трассирущие</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_TracerDescription">
<Key ID="STR_ACE_20Rnd_762x51_mag_TracerDescription">
<English>Caliber: 7.62x51 mm Tracer&lt;br /&gt;Rounds: 20&lt;br /&gt;Used in: Mk18 ABR</English>
<Hungarian>Kaliber: 7,62x51 mm Nyomjelző&lt;br /&gt;Lőszerek: 20&lt;br /&gt;Használható: Mk18 ABR</Hungarian>
<German>Kaliber: 7,62x51 mm Leuchtspur&lt;br /&gt;Patronen: 20&lt;br /&gt;Eingesetzt von: EBR</German>
@ -366,7 +366,7 @@
<Italian>Calibro: 7.62x51 mm Traccianti&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7.62x51 мм трассирующие&lt;br /&gt;Патронов: 20&lt;br /&gt;Применимы в: Mk18 ABR</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_Tracer_DimName">
<Key ID="STR_ACE_20Rnd_762x51_mag_Tracer_DimName">
<English>7.62mm 20rnd Tracer IR-DIM Mag</English>
<Hungarian>7,62 mm Nyomjelző IR-DIM 20-as Tár</Hungarian>
<German>7,62 mm 20-Schuss-Magazin Leuchtspur IR-DIM</German>
@ -378,7 +378,7 @@
<Italian>Caricatore 7.62mm 20rnd Traccianti IR-DIM</Italian>
<Russian>Магазин из 20-и 7.62 мм трассирующих под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_Tracer_DimNameShort">
<Key ID="STR_ACE_20Rnd_762x51_mag_Tracer_DimNameShort">
<English>7.62mm IR-DIM</English>
<Hungarian>7,62 mm IR-DIM</Hungarian>
<German>7,62mm IR-DIM</German>
@ -390,7 +390,7 @@
<Italian>7.62mm IR-DIM</Italian>
<Russian>7.62 мм трассирущие под ПНВ</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_Tracer_DimDescription">
<Key ID="STR_ACE_20Rnd_762x51_mag_Tracer_DimDescription">
<English>Caliber: 7.62x51 mm Tracer IR-DIM&lt;br /&gt;Rounds: 20&lt;br /&gt;Used in: Mk18 ABR</English>
<Hungarian>Kaliber: 7,62x51 mm Nyomjelző IR-DIM&lt;br /&gt;Lőszerek: 20&lt;br /&gt;Használható: Mk18 ABR</Hungarian>
<German>Kaliber: 7,62x51 mm Leuchtspur IR-DIM&lt;br /&gt;Patronen: 20&lt;br /&gt;Eingesetzt von: EBR</German>
@ -402,7 +402,7 @@
<Italian>Calibro: 7.62x51 mm Traccianti IR-DIM&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7.62x51 мм трассирующие под ПНВ&lt;br /&gt;Патронов: 20&lt;br /&gt;Применимы в: Mk18 ABR</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_SDName">
<Key ID="STR_ACE_20Rnd_762x51_mag_SDName">
<English>7.62mm 20Rnd SD Mag</English>
<Hungarian>7,62 mm Hangtompítós 20-as Tár</Hungarian>
<German>7,62 mm 20-Schuss-Magazin SD</German>
@ -414,7 +414,7 @@
<Italian>Caricatore 7.62mm 20Rnd Sil.</Italian>
<Russian>Магазин из 20-и 7.62 мм дозвуковых</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_SDNameShort">
<Key ID="STR_ACE_20Rnd_762x51_mag_SDNameShort">
<English>7.62mm SD</English>
<Hungarian>7,62 mm Hangtompítós</Hungarian>
<German>7,62mm SD</German>
@ -426,7 +426,7 @@
<Italian>7.62mm Sil.</Italian>
<Russian>7.62 мм дозвуковые</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_SDDescription">
<Key ID="STR_ACE_20Rnd_762x51_mag_SDDescription">
<English>Caliber: 7.62x51 mm SD&lt;br /&gt;Rounds: 20&lt;br /&gt;Used in: Mk18 ABR</English>
<Hungarian>Kaliber: 7,62x51 mm Hangtompítós&lt;br /&gt;Lőszerek: 20&lt;br /&gt;Használható: Mk18 ABR</Hungarian>
<German>Kaliber: 7,62x51 mm SD&lt;br /&gt;Patronen: 20&lt;br /&gt;Eingesetzt von: EBR</German>
@ -438,7 +438,7 @@
<Italian>Calibro: 7.62x51 mm Sil.&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7.62x51 мм дозвуковые&lt;br /&gt;Патронов: 20&lt;br /&gt;Применимы в: Mk18 ABR</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_APName">
<Key ID="STR_ACE_20Rnd_762x51_mag_APName">
<English>7.62mm 20Rnd AP Mag</English>
<Hungarian>7,62 mm Páncéltörő 20-as Tár</Hungarian>
<German>7,62 mm 20-Schuss-Magazin AP</German>
@ -450,7 +450,7 @@
<Italian>Caricatore 7.62mm 20Rnd AP</Italian>
<Russian>Магазин из 20-и 7.62 мм бронебойных</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_APNameShort">
<Key ID="STR_ACE_20Rnd_762x51_mag_APNameShort">
<English>7.62mm AP</English>
<Hungarian>7,62 mm Páncéltörő</Hungarian>
<German>7,62mm AP</German>
@ -462,7 +462,7 @@
<Italian>7.62mm AP</Italian>
<Russian>7.62 мм бронебойные</Russian>
</Key>
<Key ID="STR_AGM_20Rnd_762x51_mag_APDescription">
<Key ID="STR_ACE_20Rnd_762x51_mag_APDescription">
<English>Caliber: 7.62x51 mm AP&lt;br /&gt;Rounds: 20&lt;br /&gt;Used in: Mk18 ABR</English>
<Hungarian>Kaliber: 7,62x51 mm Páncéltörő&lt;br /&gt;Lőszerek: 20&lt;br /&gt;Használható: Mk18 ABR</Hungarian>
<German>Kaliber: 7,62x51 mm AP&lt;br /&gt;Patronen: 20&lt;br /&gt;Eingesetzt von: EBR</German>
@ -474,7 +474,7 @@
<Italian>Calibro: 7.62x51 mm AP&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7.62x51 мм дозвуковые&lt;br /&gt;Патронов: 20&lt;br /&gt;Применимы в: Mk18 ABR</Russian>
</Key>
<Key ID="STR_AGM_Ballistics_20Rnd_762x51_Mag_Description">
<Key ID="STR_ACE_Ballistics_20Rnd_762x51_Mag_Description">
<English>Caliber: 7.62x51mm M118LR&lt;br /&gt;Rounds: 20&lt;br /&gt;Type: M14</English>
<Hungarian>Kaliber: 7,62x51 mm M118LR&lt;br /&gt;Lőszerek: 20&lt;br /&gt;Típus: M14</Hungarian>
<German>Kaliber: 7,62x51mm M118LR&lt;br /&gt;Schuss: 20&lt;br /&gt;Typ: M14</German>
@ -487,7 +487,7 @@
<Italian>Calibro: 7.62x51mm M118LR&lt;br /&gt;Munizioni:20&lt;br /&gt;In uso su: M14</Italian>
</Key>
<!-- Flash suppressors -->
<Key ID="STR_AGM_muzzle_mzls_H">
<Key ID="STR_ACE_muzzle_mzls_H">
<English>Flash Suppressor (6.5 mm)</English>
<Hungarian>Lángrejtő (6,5 mm)</Hungarian>
<German>Mündungsfeuerdämpfer (6,5 mm)</German>
@ -499,7 +499,7 @@
<Russian>Пламегаситель (6,5 мм)</Russian>
<Spanish>Supresor (6,5 mm)</Spanish>
</Key>
<Key ID="STR_AGM_muzzle_mzls_B">
<Key ID="STR_ACE_muzzle_mzls_B">
<English>Flash Suppressor (7.62 mm)</English>
<Hungarian>Lángrejtő (7,62 mm)</Hungarian>
<German>Mündungsfeuerdämpfer (7,62 mm)</German>
@ -511,7 +511,7 @@
<Russian>Пламегаситель (7,62 мм)</Russian>
<Spanish>Supresor (7,62 mm)</Spanish>
</Key>
<Key ID="STR_AGM_muzzle_mzls_L">
<Key ID="STR_ACE_muzzle_mzls_L">
<English>Flash Suppressor (5.56 mm)</English>
<Hungarian>Lángrejtő (5,56 mm)</Hungarian>
<German>Mündungsfeuerdämpfer (5,56 mm)</German>
@ -523,7 +523,7 @@
<Russian>Пламегаситель (5,56 мм)</Russian>
<Spanish>Supresor (5,56 mm)</Spanish>
</Key>
<Key ID="STR_AGM_muzzle_mzls_smg_01">
<Key ID="STR_ACE_muzzle_mzls_smg_01">
<English>Flash Suppressor (.45 ACP)</English>
<Hungarian>Lángrejtő (.45 ACP)</Hungarian>
<German>Mündungsfeuerdämpfer (.45 ACP)</German>
@ -535,7 +535,7 @@
<Russian>Пламегаситель (.45 ACP)</Russian>
<Spanish>Supresor (.45 ACP)</Spanish>
</Key>
<Key ID="STR_AGM_muzzle_mzls_smg_02">
<Key ID="STR_ACE_muzzle_mzls_smg_02">
<English>Flash Suppressor (9 mm)</English>
<Hungarian>Lángrejtő (9 mm)</Hungarian>
<German>Mündungsfeuerdämpfer (9 mm)</German>

View File

@ -1,15 +1,15 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
serverInit = QUOTE(call COMPILE_FILE(scripts\readParameters) );
init = QUOTE(call COMPILE_FILE(XEH_preInit));
serverInit = QUOTE(call COMPILE_FILE(scripts\readParameters));
disableModuload = true;
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit) );
init = QUOTE(call COMPILE_FILE(XEH_postInit));
disableModuload = true;
};
};
@ -17,15 +17,15 @@ class Extended_PostInit_EventHandlers {
class Extended_InitPost_EventHandlers {
class All {
class GVAR(executePersistent) {
init = QUOTE([_this select 0] call FUNC(executePersistent) );
init = QUOTE([_this select 0] call FUNC(executePersistent));
};
};
class CAManBase {
class GVAR(setName) {
init = QUOTE(if (local (_this select 0)) then { _this call FUNC(setName) }; );
init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};);
};
class GVAR(forceWalk) {
init = QUOTE(if (local (_this select 0)) then { _this call FUNC(applyForceWalkStatus); }; );
init = QUOTE(if (local (_this select 0)) then {_this call FUNC(applyForceWalkStatus);};);
};
};
};
@ -33,10 +33,10 @@ class Extended_InitPost_EventHandlers {
class Extended_Respawn_EventHandlers {
class All {
class GVAR(restoreVariablesJIP) {
respawn = QUOTE(_this call FUNC(restoreVariablesJIP) );
respawn = QUOTE(_this call FUNC(restoreVariablesJIP));
};
class GVAR(setName) {
respawn = QUOTE(_this call FUNC(setName) );
respawn = QUOTE(_this call FUNC(setName));
};
};
};

View File

@ -0,0 +1 @@
z\ace\addons\explosives

View File

@ -0,0 +1,48 @@
class CfgACE_Triggers {
/* onPlace parameters:
0: OBJECT - unit placing
1: OBJECT - Placed explosive
2: STRING - Magazine classname
3: ARRAY - vars
Last Index: CfgACE_Triggers config of trigger type.
onSetup parameters:
0: STRING - Magazine Classname
*/
class Command {
displayName = $STR_ACE_Explosives_clacker_displayName;
picture = QUOTE( PATHTOF(Data\UI\Clacker.paa) );
onPlace = QUOTE( _this call FUNC(AddClacker);false );
requires[] = {"ACE_Clacker"};
};
class MK16_Transmitter:Command {
displayName = $STR_ACE_Explosives_MK16_displayName;
picture = QUOTE( PATHTOF(Data\UI\MK16_Reciever_ca.paa) );
requires[] = {"ACE_M26_Clacker"};
};
class DeadManSwitch:Command {
displayName = $STR_ACE_Explosives_DeadManSwitch_displayName;
picture = QUOTE( PATHTOF(Data\UI\DeadmanSwitch.paa) );
requires[] = {"ACE_DeadManSwitch"};
};
class PressurePlate {
displayName = $STR_ACE_Explosives_PressurePlate;
picture = QUOTE( PATHTOF(Data\UI\PressurePlate.paa) );
onPlace = "_dist=GetNumber(ConfigFile >> 'CfgMagazines' >> (_this select 2) >> 'ACE_Triggers' >> 'PressurePlate' >> 'digDistance');_ex=_this select 1;_ex setPosATL ((getPosATL _ex) vectorDiff ((VectorUp _ex) vectorCrossProduct [0,0,_dist]));false";
};
class IRSensor {
displayName = $STR_ACE_Explosives_IRSensor;
picture = QUOTE( PATHTOF(Data\UI\PressurePlate.paa) );
onPlace = "false";
};
class Timer {
displayName = $STR_ACE_Explosives_timerName;
picture = "ACE_Explosives\data\UI\Timer.paa";
onPlace = QUOTE( [ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false );
onSetup = QUOTE( _this call FUNC(openTimerSetUI);true );
};
class Tripwire {
displayName = $STR_ACE_Explosives_TripWire;
picture = QUOTE( PATHTOF(Data\UI\Tripwire.paa) );
onPlace = "false";
};
};

View File

@ -0,0 +1,86 @@
class CfgAmmo {
// All explosive based Ammo classes. These are all listed in case they become required.
class Default;
class TimeBombCore:Default {
ACE_DefuseTime = 5;
};
/*
class BoundingMineCore:TimeBombCore;
class BoundingMineBase:BoundingMineCore;
class APERSBoundingMine_Range_Ammo:BoundingMineBase;
class MineCore: TimeBombCore;
class MineBase:MineCore;
class APERSMine_Range_Ammo:MineBase;
class ATMine_Range_Ammo:MineBase;
class UnderwaterMine_Range_Ammo:MineBase;
class UnderwaterMineAB_Range_Ammo:UnderwaterMine_Range_Ammo;
class UnderwaterMinePDM_Range_Ammo:UnderwaterMine_Range_Ammo;
class DirectionalBombCore:TimeBombCore;
class DirectionalBombBase:DirectionalBombCore;
class APERSTripMine_Wire_Ammo:DirectionalBombBase;
class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase;
class PipeBombCore: TimeBombCore;
class PipeBombBase:PipeBombCore;
*/
class DirectionalBombBase;
class ClaymoreDirectionalMine_Remote_Ammo:DirectionalBombBase{
ACE_Explosive = "ClaymoreDirectionalMine_Remote_Ammo_Scripted";
soundActivation[] = {"",0,0,0};
soundDeactivation[] = {"",0,0,0};
};
//class ClaymoreDirectionalMine_Remote_Ammo_Scripted:ClaymoreDirectionalMine_Remote_Ammo;
class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase{
indirectHitRange = 20;
ACE_explodeOnDefuse = 1;
};
class SLAMDirectionalMine_Command_Ammo:SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "RemoteTrigger";
ACE_explodeOnDefuse = 0;
};
class SLAMDirectionalMine_Timer_Ammo:SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "TimeTrigger";
ACE_explodeOnDefuse = 0;
};
class SLAMDirectionalMine_Magnetic_Ammo:SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "MagneticTrigger";
};
class PipeBombBase;
class DemoCharge_Remote_Ammo:PipeBombBase{
ACE_Explosive = "DemoCharge_Remote_Ammo_Scripted";
soundActivation[] = {"",0,0,0};
soundDeactivation[] = {"",0,0,0};
hit = 500;
indirectHit = 500;
indirectHitRange = 7;
};
class SatchelCharge_Remote_Ammo:PipeBombBase{
ACE_Explosive = "SatchelCharge_Remote_Ammo_Scripted";
soundActivation[] = {"",0,0,0};
soundDeactivation[] = {"",0,0,0};
};
/*
class DemoCharge_Remote_Ammo_Scripted:DemoCharge_Remote_Ammo;
class SatchelCharge_Remote_Ammo_Scripted:SatchelCharge_Remote_Ammo;
TODO: Configure IEDs to use the system.
class IEDLandBig_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
class IEDLandSmall_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
class IEDUrbanBig_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
class IEDUrbanSmall_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};*/
};

View File

@ -0,0 +1,20 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
};
};
/*
TODO: Move the addEventHandlers out of PostInit into here or separate eventHandlers,
to enable them on all units, so unit switching works for explosives properly.
class Extended_Init_EventHandlers {
class CAManBase {
init = "";
}
}
*/

View File

@ -0,0 +1,98 @@
class CfgMagazines {
class CA_Magazine;
class ATMine_Range_Mag:CA_Magazine{
ACE_Placeable = 1;
useAction = 0;
ACE_SetupObject = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object.
ACE_DelayTime = 2.5;
class ACE_Triggers {
SupportedTriggers[] = {"PressurePlate"};
class PressurePlate {
digDistance = 0.1;
};
};
};
class APERSBoundingMine_Range_Mag:ATMine_Range_Mag{
ACE_SetupObject = "ACE_Explosives_Place_APERSBoundingMine";
class ACE_Triggers {
SupportedTriggers[] = {"PressurePlate"};
class PressurePlate {
digDistance = 0.075;
};
};
};
class APERSMine_Range_Mag:ATMine_Range_Mag{
ACE_SetupObject = "ACE_Explosives_Place_APERSMine";
class ACE_Triggers {
SupportedTriggers[] = {"PressurePlate"};
class PressurePlate {
digDistance = 0.05;
};
};
};
class APERSTripMine_Wire_Mag:ATMine_Range_Mag{
ACE_SetupObject = "ACE_Explosives_Place_APERSTripwireMine";
class ACE_Triggers {
SupportedTriggers[] = {"Tripwire"};
class Tripwire;
};
};
class ClaymoreDirectionalMine_Remote_Mag:CA_Magazine{
ACE_Placeable = 1;
useAction = 0;
ACE_SetupObject = "ACE_Explosives_Place_Claymore";
ACE_DelayTime = 1.5;
class ACE_Triggers {
SupportedTriggers[] = {"Command"};
class Command {
FuseTime = 0.5;
};
};
};
class SatchelCharge_Remote_Mag:CA_Magazine{
ACE_Placeable = 1;
useAction = 0;
ACE_SetupObject = "ACE_Explosives_Place_SatchelCharge";
ACE_DelayTime = 1;
class ACE_Triggers {
SupportedTriggers[] = {"Timer","Command", "MK16_Transmitter", "DeadmanSwitch"};
class Timer {
FuseTime = 0.5;
};
class Command {
FuseTime = 0.5;
};
class MK16_Transmitter:Command{};
class DeadmanSwitch:Command{};
};
};
class DemoCharge_Remote_Mag:SatchelCharge_Remote_Mag{
ACE_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";
class ACE_Triggers {
SupportedTriggers[] = {"IRSensor","PressurePlate","Timer","Command"};
class PressurePlate{
displayName = $STR_ACE_Explosives_SLAME_Magnetic;
digDistance = 0;
ammo = "SLAMDirectionalMine_Magnetic_Ammo";
pitch = 90;
};
class IRSensor{
displayName = $STR_ACE_Explosives_SLAME_IRSensor;
};
class Timer {
ammo = "SLAMDirectionalMine_Timer_Ammo";
};
class Command {
ammo = "SLAMDirectionalMine_Command_Ammo";
fuseTime = 0.5;
};
};
};
};

View File

@ -0,0 +1,44 @@
class Module_F;
class ACE_ModuleExplosive: Module_F {
author = "ACE Team";
category = "ACE";
displayName = "Explosive System";
function = QUOTE( FUNC(module) );
scope = 2;
isGlobal = 1;
icon = QUOTE( PATHTOF(UI\IconExplosives_ca.paa) );
class Arguments {
class RequireSpecialist {
displayName = "Require specialists?";
description = "Require explosive specialists to disable explosives? Default: No";
typeName = "BOOL";
class values {
class Yes {
name = "Yes";
value = 1;
};
class No {
default = 1;
name = "No";
value = 0;
};
};
};
class PunishNonSpecialists {
displayName = "Punish non-specialists?";
description = "Increase the time it takes to complete actions for non-specialists? Default: Yes";
typeName = "BOOL";
class values {
class Yes {
default = 1;
name = "Yes";
value = 1;
};
class No {
name = "No";
value = 0;
};
};
};
};
};

View File

@ -0,0 +1,248 @@
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
class GVAR(Explosives) {
displayName = $STR_ACE_Explosives_Menu;
condition = QUOTE( !(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)]) );
statement = "";
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 1;
priority = 4;
icon = QUOTE( PATHTOF(UI\Explosives_Menu_ca.paa) );
subMenu[] = {"ACE_Explosives", 1};
hotkey = "X";
//Sub-menu items
class ACE_Detonate {
displayName = $STR_ACE_Explosives_Detonate;
condition = QUOTE( [_player] call FUNC(canDetonate) );
statement = QUOTE( [_player] call FUNC(openTransmitterUI); );
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 1;
icon = QUOTE( PATHTOF(UI\Explosives_Menu_ca.paa) );
priority = 2;
hotkey = "T";
};
class ACE_Place {
displayName = $STR_ACE_Explosives_Place;
condition = QUOTE( (vehicle _player == _player) and {[_player] call FUNC(hasExplosives)} );
statement = QUOTE( [_player] call FUNC(openPlaceUI); );
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 1;
icon = QUOTE( PATHTOF(UI\Place_Explosive_ca.paa) );
priority = 1;
hotkey = "P";
};
class ACE_Defuse {
displayName = $STR_ACE_Explosives_Defuse;
condition = QUOTE( [_player] call FUNC(canDefuse) );
statement = QUOTE( [ARR_2(_player,EGVAR(Interaction,Target))] call FUNC(startDefuse); );
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 0;
icon = QUOTE( PATHTOF(UI\Defuse_ca.paa) );
priority = 0.8;
hotkey = "F";
};
};
};
};
class Items_base_F;
class ACE_Explosives_Place: Items_base_F {
author = "ACE";
_generalMacro = "ACE_Explosives_Place";
displayName = "Multi-meter";
mapSize = 0.2;
icon = "iconObject_1x2";
model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d";
scope = 2;
scopeCurator = 1;
vehicleClass = "Cargo";
ACE_offset[] = {0,0,0};
};
class ACE_Explosives_Place_DemoCharge:ACE_Explosives_Place {
displayName = "Demo Charge";
model = "\A3\Weapons_F\explosives\c4_charge_small_d";
};
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 {
displayName = "APERS Mine";
model = "\A3\Weapons_F\explosives\mine_ap";
};
class ACE_Explosives_Place_APERSTripwireMine:ACE_Explosives_Place {
displayName = "APERS Tripwire Mine";
model = "\A3\Weapons_F\explosives\mine_AP_tripwire";
ACE_offset[] = {1,0,0};
};
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 {
displayName = "Claymore";
model = "\A3\Weapons_F\explosives\mine_AP_miniclaymore";
};
class ACE_Explosives_Place_SatchelCharge:ACE_Explosives_Place {
displayName = "Satchel Charge";
model = "\A3\Weapons_F\Explosives\satchel";
};
class ACE_Explosives_Place_SLAM:ACE_Explosives_Place {
displayName = "SLAM";
model = "\A3\Weapons_F\Explosives\mine_SLAM_directional";
};
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class FIA_Box_Base_F;
class Box_NATO_Support_F;
class Box_NATO_AmmoOrd_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Clacker,12)
MACRO_ADDITEM(ACE_M26_Clacker,6)
MACRO_ADDITEM(ACE_DefusalKit,12)
};
};
class Box_East_AmmoOrd_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Clacker,12)
MACRO_ADDITEM(ACE_M26_Clacker,6)
MACRO_ADDITEM(ACE_DefusalKit,12)
};
};
class Box_IND_AmmoOrd_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Clacker,12)
MACRO_ADDITEM(ACE_M26_Clacker,6)
MACRO_ADDITEM(ACE_DefusalKit,12)
MACRO_ADDITEM(ACE_Deadmanswitch,2)
};
};
class Box_FIA_Ammo_F: FIA_Box_Base_F {
class TransportItems {
MACRO_ADDITEM(ACE_Clacker,2)
MACRO_ADDITEM(ACE_M26_Clacker,2)
MACRO_ADDITEM(ACE_DefusalKit,2)
MACRO_ADDITEM(ACE_Deadmanswitch,1)
};
};
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_Clacker,12)
MACRO_ADDITEM(ACE_M26_Clacker,6)
MACRO_ADDITEM(ACE_DefusalKit,12)
MACRO_ADDITEM(ACE_Deadmanswitch,6)
};
};
class B_Kitbag_rgr;
class B_Kitbag_rgr_Exp: B_Kitbag_rgr {
class TransportItems {
class _xx_ToolKit { // xXToOlKiT420mLgXx
count = 0;
};
};
};
class B_Carryall_ocamo;
class B_Carryall_ocamo_Exp: B_Carryall_ocamo {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
class B_Carryall_oucamo;
class B_Carryall_oucamo_Exp: B_Carryall_oucamo {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
class B_Carryall_oli;
class G_Carryall_Exp: B_Carryall_oli {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
class I_Carryall_oli_Exp: B_Carryall_oli {
class TransportItems {
class _xx_ToolKit {
count = 0;
};
};
};
#include "CfgModule.hpp"
// Add ACE_Clacker and ACE_DefusalKit to every explosive unit.
#define MACRO_ADDMINEKIT \
items[] = {"FirstAidKit", "ACE_Clacker", "ACE_DefusalKit"}; \
respawnitems[] = {"FirstAidKit", "ACE_Clacker", "ACE_DefusalKit"};
class B_Soldier_base_F; class B_soldier_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT};
class B_Soldier_03_f; class B_engineer_F:B_Soldier_03_f {MACRO_ADDMINEKIT};
class B_Soldier_diver_base_F; class B_diver_exp_F:B_Soldier_diver_base_F {MACRO_ADDMINEKIT};
class B_Soldier_recon_base; class B_recon_exp_F:B_Soldier_recon_base {MACRO_ADDMINEKIT};
class B_CTRG_soldier_engineer_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT};
class I_G_Soldier_base_F; class I_G_engineer_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT};
class I_G_Soldier_exp_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT};
class B_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT};
class O_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT};
class B_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT};
class O_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT};
class I_Soldier_02_F; class I_Soldier_exp_F:I_Soldier_02_F {MACRO_ADDMINEKIT};
class I_Soldier_base_F; class I_engineer_F:I_Soldier_base_F {MACRO_ADDMINEKIT};
class I_Soldier_diver_base_F; class I_diver_exp_F:I_Soldier_diver_base_F {MACRO_ADDMINEKIT};
class O_Soldier_base_F; class O_soldier_exp_F:O_Soldier_base_F {MACRO_ADDMINEKIT};
class O_engineer_F:O_Soldier_base_F {MACRO_ADDMINEKIT};
class O_Soldier_diver_base_F; class O_diver_exp_F:O_Soldier_diver_base_F {MACRO_ADDMINEKIT};
class O_Soldier_recon_base; class O_recon_exp_F:O_Soldier_recon_base {MACRO_ADDMINEKIT};
class O_Soldier_Urban_base; class O_soldierU_exp_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT};
class O_engineer_U_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT};
class B_Protagonist_VR_F:B_Soldier_base_F {MACRO_ADDMINEKIT};
class O_Protagonist_VR_F:O_Soldier_base_F {MACRO_ADDMINEKIT};
class I_Protagonist_VR_F:I_Soldier_base_F {MACRO_ADDMINEKIT};
class B_Soldier_F; class b_soldier_universal_f:B_Soldier_F {MACRO_ADDMINEKIT};
class B_G_Soldier_F; class b_g_soldier_universal_f:B_G_Soldier_F {MACRO_ADDMINEKIT};
class O_Soldier_F; class o_soldier_universal_f:O_Soldier_F {MACRO_ADDMINEKIT};
class O_G_Soldier_F; class o_g_soldier_universal_f:O_G_Soldier_F {MACRO_ADDMINEKIT};
class I_soldier_F; class i_soldier_universal_f:I_soldier_F {MACRO_ADDMINEKIT};
class I_G_Soldier_F; class i_g_soldier_universal_f:I_G_Soldier_F {MACRO_ADDMINEKIT};
// Add ACE_Clacker to snipers and spotters for setting off Claymores
#define MACRO_ADDCLAYMOREKIT \
items[] = {"FirstAidKit","ACE_Clacker"}; \
respawnitems[] = {"FirstAidKit","ACE_Clacker"};
class B_Soldier_sniper_base_F;
class B_sniper_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
class B_spotter_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
class I_Soldier_sniper_base_F;
class I_Sniper_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
class I_Spotter_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT};
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};
};

View File

@ -0,0 +1,55 @@
class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_f;
class ACE_ExplosiveItem: InventoryItem_Base_f {
allowedSlots[] = {801,701,901};
//type = 201;
};
class ACE_Clacker: ACE_ItemCore {
scope = 2;
displayName = $STR_ACE_Explosives_clacker_displayName;
descriptionShort = $STR_ACE_Explosives_clacker_description;
picture = QUOTE( PATHTOF(Data\UI\Clacker.paa) );
model = "\A3\weapons_F\ammo\mag_univ.p3d";
ACE_Range = 250;
ACE_Detonator = 1;
class ItemInfo: ACE_ExplosiveItem {
mass = 3;
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";
};
};
class ACE_M26_Clacker: ACE_Clacker {
displayName = $STR_ACE_Explosives_M26_displayName;
picture = QUOTE( PATHTOF(Data\UI\MK26_Transmitter_ca.paa) );
ACE_Range = 5000;
};
class ACE_DefusalKit: ACE_ItemCore {
scope = 2;
displayName = $STR_ACE_Explosives_DefusalKit_displayName;
descriptionShort = $STR_ACE_Explosives_DefusalKit_description;
picture = QUOTE( PATHTOF(Data\UI\Pliers.paa) );
model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
class ItemInfo: ACE_ExplosiveItem {
mass = 5;
uniformModel = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
};
};
class ACE_DeadManSwitch: ACE_ItemCore {
scope = 2;
displayName = $STR_ACE_Explosives_DeadManSwitch_displayName;
descriptionShort = $STR_ACE_Explosives_DeadManSwitch_description;
picture = QUOTE( PATHTOF(Data\UI\DeadmanSwitch.paa) );
model = "\A3\weapons_F\ammo\mag_univ.p3d";
ACE_Range = 100;
ACE_Detonator = 1;
class ItemInfo: ACE_ExplosiveItem {
mass = 2;
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";
};
};
};

View File

@ -0,0 +1,74 @@
#define GUI_GRID_X (0)
#define GUI_GRID_Y (0)
#define GUI_GRID_W (0.025)
#define GUI_GRID_H (0.04)
#define ST_CENTER 0x02
class RscText;
class RscButton;
#define X_OFFSET 0.25
class RscXSliderH;
class IGUIBack;
class Rsc_ACE_Timer_Slider:RscXSliderH{
x = 0.4;
y = 0.2;
w = 0.3;
h = "1*((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorBackground[] = {0,0,0,0.5};
};
class RscACE_SelectTimeUI
{
idd = 8854;
movingEnable = 0;
class controls {
class back:IGUIBack {
x = X_OFFSET;
y = 0;
w = 0.5;
h = 0.2;
colorBackground[] = {0, 0, 0, 0.5};
};
class header: RscText{
idc = 8870;
x = X_OFFSET + 0.005;
y = 0.005;
w = 0.49;
h = 0.05;
style = ST_CENTER;
text = "";
};
class slider: Rsc_ACE_Timer_Slider {
idc = 8845;
x = X_OFFSET + 0.005;
y = 0.06;
w = 0.49;
h = 0.025;
onSliderPosChanged = "private ['_mins', '_secs'];_mins = floor((_this select 1)/60);_secs=floor((_this select 1) - (_mins*60));ctrlSetText [8870, format[localize 'STR_ACE_Explosives_TimerMenu',_mins, _secs]];";
};
class cancelBtn: RscButton {
idc = 8855;
x = X_OFFSET + 0.005;
w = 0.15;
h = 0.1;
y = 0.09;
style = ST_CENTER;
text = $STR_ACE_Explosives_Cancel;
action = "closeDialog 0;";
};
class approveBtn: RscButton {
idc = 8860;
x = X_OFFSET + 0.345;
y = 0.09;
h = 0.1;
w = 0.15;
style = ST_CENTER;
text = $STR_ACE_Explosives_SetTime;
action = "closeDialog 0;";
};
};
};

View File

@ -0,0 +1,69 @@
/*
Name: XEH_postInit.sqf
Author(s):
Garth de Wet (LH)
Description:
Initialises explosive behaviour.
Parameters:
None
Returns:
None
Example:
None
*/
#include "script_component.hpp"
if !(hasInterface) exitWith {};
GVAR(PlacedCount) = 0;
GVAR(Setup) = objNull;
GVAR(pfeh_running) = false;
[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler);
player addEventHandler ["Killed", {
private "_deadman";
call FUNC(place_Cancel);
_deadman = [(_this select 0), "DeadManSwitch"] call FUNC(getPlacedExplosives);
{
[(_this select 0), -1, _x, true] call FUNC(detonateExplosive);
} count _deadman;
}];
player addEventHandler ["Take", {
private ["_item", "_getter", "_giver", "_config"];
_item = _this select 2;
_getter = _this select 0;
_giver = _this select 1;
_config = ConfigFile >> "CfgWeapons" >> _item;
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
private ["_clackerItems"];
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
_getter SetVariable [QGVAR(Clackers), (_getter getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
_detonators = [_giver] call FUNC(getDetonators);
if (count _detonators == 0) then {
_giver setVariable [QGVAR(Clackers), nil, true];
};
};
}];
player addEventHandler ["Put", {
private ["_item", "_getter", "_giver", "_config"];
_item = _this select 2;
_getter = _this select 1;
_giver = _this select 0;
_config = ConfigFile >> "CfgWeapons" >> _item;
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
private ["_clackerItems"];
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
_getter SetVariable [QGVAR(Clackers), (_getter getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
_detonators = [_giver] call FUNC(getDetonators);
if (count _detonators == 0) then {
_giver setVariable [QGVAR(Clackers), nil, true];
};
};
}];

View File

@ -0,0 +1,51 @@
/*
Name: XEH_preInit.sqf
Author(s):
Garth de Wet (LH)
Description:
Prepares the functions
Parameters:
None
Returns:
None
Example:
None
*/
#include "script_component.hpp"
PREP(addClacker);
PREP(canDefuse);
PREP(canDetonate);
PREP(defuseExplosive);
PREP(detonateExplosive);
PREP(handleScrollWheel);
PREP(hasExplosives);
PREP(hasPlacedExplosives);
PREP(getDetonators);
PREP(getPlacedExplosives);
PREP(openDetonateUI);
PREP(openPlaceUI);
PREP(openTransmitterUI);
PREP(openTimerSetUI);
PREP(openTriggerSelectionUI);
PREP(place_Approve);
PREP(place_Cancel);
PREP(placeExplosive);
PREP(selectTrigger);
PREP(setupExplosive);
PREP(setPosition);
PREP(startDefuse);
PREP(startTimer);
PREP(triggerType);

View File

@ -0,0 +1,47 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch"};
requiredVersion = 0.60;
requiredAddons[] = {ace_common, ace_interaction};
version = QUOTE(VERSION);
versionStr = QUOTE(VERSION);
versionAr[] = {VERSION_AR};
author[] = {"Garth 'L-H' de Wet"};
authorUrl = "http://garth.snakebiteink.co.za/";
};
};
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
#include "ExplosivesUI.hpp"
class CfgActions {
class None;
class Deactivate:None {
show = 0;
};
class DeactivateMine:None {
show = 0;
};
};
class CfgMineTriggers {
class RangeTrigger;
class MagneticTrigger: RangeTrigger {
mineMagnetic = 1;
mineTriggerRange = 1;
};
};
class ACE_Parameters_Boolean {
GVAR(RequireSpecialist) = 0;
GVAR(PunishNonSpecialists) = 1;
};

View File

@ -1,24 +1,25 @@
/*
Name: AGM_Explosives_fnc_AddClacker
Name: ACE_Explosives_fnc_addClacker
Author(s):
Garth de Wet (LH)
Description:
Adds an explosive as a clacker item to the passed unit if the unit has a AGM_Clacker item.
Adds an explosive as a clacker item to the passed unit if the unit has a ACE_Clacker item.
Parameters:
0: OBJECT - unit
1: OBJECT - Explosive
2: STRING - Magazine
3: ARRAY - Extra vars
Returns:
Nothing
Example:
[_unit, _explosive, "SatchelCharge_Remote_Mag", [ConfigFile >> "CfgAGM_Triggers" >> "Command"]] call AGM_Explosives_fnc_AddClacker;
[_unit, _explosive, "SatchelCharge_Remote_Mag", [ConfigFile >> "CfgACE_Triggers" >> "Command"]] call ACE_Explosives_fnc_AddClacker;
*/
#include "script_component.hpp"
private ["_unit", "_explosive", "_clacker", "_config", "_magazineClass", "_requiredItems", "_hasRequired"];
_unit = _this select 0;
_explosive = _this select 1;
@ -28,7 +29,7 @@ _config = (_this select 3) select (count (_this select 3) - 1);
_requiredItems = getArray(_config >> "requires");
_hasRequired = true;
_detonators = [AGM_player] call AGM_Explosives_fnc_getDetonators;
_detonators = [_unit] call FUNC(getDetonators);
{
if !(_x in _detonators) exitWith{
_hasRequired = false;
@ -36,10 +37,11 @@ _detonators = [AGM_player] call AGM_Explosives_fnc_getDetonators;
} count _requiredItems;
if !(_hasRequired) exitWith {};
_config = ConfigFile >> "CfgMagazines" >> _magazineClass >> "AGM_Triggers" >> configName _config;
_config = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> configName _config;
_clacker = _unit getVariable ["AGM_Clacker", []];
AGM_Explosives_PlacedCount = AGM_Explosives_PlacedCount + 1;
_clacker pushBack [_explosive, getNumber(_config >> "FuseTime"), format [localize "STR_AGM_Explosives_DetonateCode", AGM_Explosives_PlacedCount], _magazineClass, configName ((_this select 3) select (count (_this select 3) - 1))];
_unit setVariable ["AGM_Clacker", _clacker, true];
_unit sideChat format [localize "STR_AGM_Explosives_DetonateCode", AGM_Explosives_PlacedCount];
_clacker = _unit getVariable [QGVAR(Clackers), []];
GVAR(PlacedCount) = GVAR(PlacedCount) + 1;
_clacker pushBack [_explosive, getNumber(_config >> "FuseTime"), format [localize "STR_ACE_Explosives_DetonateCode",
GVAR(PlacedCount)], _magazineClass, configName ((_this select 3) select (count (_this select 3) - 1))];
_unit setVariable [QGVAR(Clackers), _clacker, true];
_unit sideChat format [localize "STR_ACE_Explosives_DetonateCode", GVAR(PlacedCount)];

View File

@ -1,26 +1,27 @@
/*
Name: AGM_Explosives_fnc_CanDefuse
Name: ACE_Explosives_fnc_canDefuse
Author: Garth de Wet (LH)
Description:
Checks if a unit can defuse an explosive
Parameters:
Parameters:
0: OBJECT - unit
Returns:
Nothing
Example:
[player] call AGM_Explosives_fnc_CanDefuse;
[player] call ACE_Explosives_fnc_CanDefuse;
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
if (vehicle _unit != _unit || {!("AGM_DefusalKit" in (items _unit))}) exitWith {false};
_isSpecialist = ([_unit] call AGM_Core_fnc_isEOD);
if (vehicle _unit != _unit || {!("ACE_DefusalKit" in (items _unit))}) exitWith {false};
_isSpecialist = [_unit] call EFUNC(Common,isEOD);
if (AGM_Explosives_RequireSpecialist && {!_isSpecialist}) exitWith {false};
if (GVAR(RequireSpecialist) && {!_isSpecialist}) exitWith {false};
_timeBombCore = nearestObject [_unit, "TimeBombCore"];
_mineBase = nearestObject [_unit, "MineBase"];
@ -30,10 +31,10 @@ _distBase = _unit distance _mineBase;
_distance = 10;
if (_distCore < _distBase) then {
_distance = _distCore;
AGM_Interaction_Target = _timeBombCore;
EGVAR(Interaction,Target) = _timeBombCore;
}else{
_distance = _distBase;
AGM_Interaction_Target = _mineBase;
EGVAR(Interaction,Target) = _mineBase;
};
if (isNil "_distance") exitWith {false};
_distance < 4

View File

@ -0,0 +1,22 @@
/*
Name: ACE_Explosives_fnc_canDetonate
Author: Garth de Wet (LH)
Description:
Checks if a unit can detonate an explosive
Parameters:
0: OBJECT - unit
Returns:
BOOLEAN - if the unit has explosives and detonators.
Example:
[player] call ACE_Explosives_fnc_canDetonate;
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
[_unit] call FUNC(hasPlacedExplosives) and {count ([_unit] call FUNC(getDetonators)) > 0}

View File

@ -1,27 +1,28 @@
/*
Name: AGM_Explosives_fnc_DefuseExplosive
Name: ACE_Explosives_fnc_defuseExplosive
Author: Garth de Wet (LH)
Description:
Defuses an Explosive
Parameters:
Parameters:
0: OBJECT - unit
1: OBJECT - Explosive
Returns:
Nothing
Example:
[player, AGM_Interaction_Target] call AGM_Explosives_fnc_DefuseExplosive;
[player, ACE_Interaction_Target] call ACE_Explosives_fnc_defuseExplosive;
*/
#include "script_component.hpp"
private ["_unit", "_explosive"];
_unit = _this select 0;
_explosive = _this select 1;
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "AGM_explodeOnDefuse") == 1) exitWith {
[_unit, -1, [_explosive, 1], true] call AGM_Explosives_fnc_DetonateExplosive;
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith {
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
};
_unit action ["Deactivate", _unit, _explosive];

View File

@ -1,50 +1,40 @@
/*
Name: AGM_Explosives_fnc_DetonateExplosive
Name: ACE_Explosives_fnc_detonateExplosive
Author(s):
Garth de Wet (LH)
Description:
Detonates a remote Explosive.
Parameters:
0: OBJECT - Unit detonating explosive
1: NUMBER - Max range (-1 to ignore)
2: ARRAY - Explosive
0: OBJECT - Explosive
1: NUMBER - Fuse Time
3: BOOLEAN - Ignore Jammer
Returns:
Nothing
Example:
// Clacker
[player, 100, [Explosive, 1], false] call AGM_Explosives_fnc_DetonateExplosive;
[player, 100, [Explosive, 1]] call ACE_Explosives_fnc_detonateExplosive;
*/
private ["_item","_result", "_ignoreRange", "_ignoreJammer", "_unit", "_range"];
#include "script_component.hpp"
private ["_item","_result", "_ignoreRange", "_unit", "_range"];
_unit = _this select 0;
_range = _this select 1;
_item = _this select 2;
_ignoreRange = (_range == -1);
_ignoreJammer = true;//(_this select 4); // disabled while jammers aren't in place.
_result = true;
if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {false};
if (!_ignoreJammer) then {
{
if (((_x select 2) getVariable ["AGM_JammerEnabled",false]) and {(_x select 0) distance (_item select 0) <= (_x select 1)}) exitWith {
_result = false;
};
} count AGM_Explosives_Jammers;
};
if (!_result) exitWith{};
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
private ["_exp", "_previousExp"];
_previousExp = _item select 0;
_exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "AGM_Explosive");
_exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "ACE_Explosive");
if (_exp != "") then {
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
_exp setDir (getDir _previousExp);

View File

@ -1,21 +1,22 @@
/*
Name: AGM_Explosives_fnc_getDetonators
Name: ACE_Explosives_fnc_getDetonators
Author(s):
Garth de Wet (LH)
Description:
Gets all the detonators of a specific unit
Parameters:
0: OBJECT - Unit to get detonators of
Returns:
ARRAY - Configs of all detonators.
Example:
_detonators = [player] call AGM_Explosives_fnc_getDetonators;
_detonators = [player] call ACE_Explosives_fnc_getDetonators;
*/
#include "script_component.hpp"
private ["_unit", "_items", "_result", "_config"];
_unit = _this select 0;
_items = (items _unit);
@ -23,7 +24,7 @@ _result = [];
{
_config = ConfigFile >> "CfgWeapons" >> _x;
if (getNumber (_config >> "AGM_Detonator") == 1) then {
if (getNumber (_config >> "ACE_Detonator") == 1) then {
_result pushBack _x;
};
} forEach _items;

View File

@ -1,38 +1,39 @@
/*
Name: AGM_Explosives_fnc_getPlacedExplosives
Name: ACE_Explosives_fnc_getPlacedExplosives
Author: Garth de Wet (LH)
Description:
Gets all placed explosives, whether Clacker based or not.
Parameters:
Parameters:
0: OBJECT - unit
1: STRING - (OPTIONAL) Trigger classname for filter.
Returns:
Array: Explosives.
Example:
_allExplosives = [player] call AGM_Explosives_fnc_getPlacedExplosives;
_deadmanExplosives = [player, "DeadManSwitch"] call AGM_Explosives_fnc_getPlacedExplosives;
_allExplosives = [player] call ACE_Explosives_fnc_getPlacedExplosives;
_deadmanExplosives = [player, "DeadManSwitch"] call ACE_Explosives_fnc_getPlacedExplosives;
*/
#include "script_component.hpp"
private ["_unit", "_clackerList", "_adjustedList", "_list", "_filter"];
_unit = _this select 0;
_filter = nil;
if (count _this > 1) then {
_filter = ConfigFile >> "CfgAGM_Triggers" >> (_this select 1);
_filter = ConfigFile >> "CfgACE_Triggers" >> (_this select 1);
};
_clackerList = [];
_adjustedList = false;
_clackerList = _unit getVariable ["AGM_Clacker", []];
_clackerList = _unit getVariable [QGVAR(Clackers), []];
_list = [];
{
if isNull (_x select 0) then {
_clackerList set [_foreachIndex, "X"];
_adjustedList = true;
} else {
if (isNil "_filter" || {(ConfigFile >> "CfgAGM_Triggers" >> (_x select 4)) == _filter}) then {
if (isNil "_filter" || {(ConfigFile >> "CfgACE_Triggers" >> (_x select 4)) == _filter}) then {
_list pushBack _x;
};
};
@ -40,10 +41,10 @@ _list = [];
if (_adjustedList) then {
_clackerList = _clackerList - ["X"];
if (count _clackerList == 0) then {
_unit SetVariable ["AGM_Clacker", nil, true];
_unit SetVariable [QGVAR(Clackers), nil, true];
} else {
_unit SetVariable ["AGM_Clacker", _clackerList, true];
_unit SetVariable [QGVAR(Clackers), _clackerList, true];
};
};
_list
_list

View File

@ -0,0 +1,26 @@
/*
Name: ACE_Explosives_fnc_HandleScrollWheel
Author(s):
L-H
Description:
Handles rotating of Explosives
Parameters:
Number: Scroll amount
Returns:
Boolean: Handled or not.
Example:
1.2 call ACE_Explosives_fnc_HandleScrollWheel;
*/
#include "script_component.hpp"
private ["_obj"];
if (isNull(GVAR(Setup)) || {ACE_Modifier == 0} || !GVAR(pfeh_running)) exitWith {false};
_this = _this * 5;
GVAR(Setup) setDir ((getDir GVAR(Setup)) + _this);
GVAR(TweakedAngle) = GVAR(TweakedAngle) + _this;
true

View File

@ -1,26 +1,27 @@
/*
Name: AGM_Explosives_fnc_hasExplosives
Name: ACE_Explosives_fnc_hasExplosives
Author: Garth de Wet (LH)
Description:
Whether the passed unit has any explosives on them.
Parameters:
Parameters:
0: OBJECT - unit
Returns:
BOOLEAN - True if the unit has explosives.
Example:
_hasExplosives = [player] call AGM_Explosives_fnc_hasExplosives;
_hasExplosives = [player] call ACE_Explosives_fnc_hasExplosives;
*/
#include "script_component.hpp"
private ["_unit", "_result", "_magazines"];
_result = false;
_unit = _this select 0;
_magazines = magazines _unit;
{
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "AGM_Placeable") == 1) exitWith {
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith {
_result = true;
};
} count _magazines;

View File

@ -1,18 +1,19 @@
/*
Name: AGM_Explosives_fnc_hasPlacedExplosives
Name: ACE_Explosives_fnc_hasPlacedExplosives
Author: Garth de Wet (LH)
Description:
Whether the passed unit has placed any explosives or has a clacker that was used when explosives were placed.
Parameters:
Parameters:
0: OBJECT - unit
Returns:
BOOLEAN - True if the unit has explosives.
Example:
_hasPLacedExplosives = [player] call AGM_Explosives_fnc_hasPlacedExplosives;
_hasPLacedExplosives = [player] call ACE_Explosives_fnc_hasPlacedExplosives;
*/
(count (_this call AGM_Explosives_fnc_getPlacedExplosives) > 0)
#include "script_component.hpp"
(count (_this call FUNC(getPlacedExplosives)) > 0)

View File

@ -0,0 +1,28 @@
/*
Name: ACE_Explosives_fnc_module
Author: Garth de Wet (LH)
Description:
Initialises the explosives module
Parameters:
Things
Returns:
Nothing
Example:
*/
#include "script_component.hpp"
if !(isServer) exitWith {};
_logic = _this select 0;
_activated = _this select 2;
if !(_activated) exitWith {};
[_logic, QGVAR(RequireSpecialist), "RequireSpecialist" ] call EFUNC(Common,readBooleanParameterFromModule);
[_logic, QGVAR(PunishNonSpecialists), "PunishNonSpecialists" ] call EFUNC(Common,readBooleanParameterFromModule);
diag_log text "[ACE]: Explosive Module Initialized.";

View File

@ -0,0 +1,63 @@
/*
Name: ACE_Explosives_fnc_openDetonateUI
Author: Garth de Wet (LH)
Description:
Opens the UI for explosive detonation selection
Parameters:
0: OBJECT - unit
0: STRING - Classname of detonator
Returns:
Nothing
Example:
[player, "ACE_M26_Clacker"] call ACE_Explosives_fnc_openDetonateUI;
*/
#include "script_component.hpp"
private ["_unit","_result", "_item"];
call EFUNC(Interaction,hideMenu);
_unit = _this select 0;
_detonator = _this select 1;
_range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range");
_result = [_unit] call FUNC(getPlacedExplosives);
_actions = [localize "STR_ACE_Explosives_DetonateMenu", localize "STR_ACE_Explosives_Detonate"]
call EFUNC(Interaction,prepareSelectMenu);
_count = 0;
{
if (!isNull(_x select 0)) then {
_required = getArray (ConfigFile >> "CfgACE_Triggers" >> (_x select 4) >> "requires");
if (_detonator in _required) then {
_item = ConfigFile >> "CfgMagazines" >> (_x select 3);
_actions = [
_actions,
_x select 2,
getText(_item >> "picture"),
[_foreachIndex, _range]
] call EFUNC(Interaction,AddSelectableItem);
_count = _count + 1;
};
};
} foreach _result;
if (_count > 0) then {
[
_actions,
{
[
ACE_player,
[_this select 1] call EFUNC(Core,toNumber),
(ACE_player getVariable [QGVAR(Clackers), []]) select ([_this select 0] call EFUNC(Core,toNumber)),
false
] call FUNC(detonateExplosive);
call EFUNC(Interaction,hideMenu);
},
{[ACE_player] call FUNC(openTransmitterUI);}
] call EFUNC(Interaction,openSelectMenu);
}else{
call EFUNC(Interaction,hideMenu);
[ACE_player] call FUNC(openTransmitterUI);
[localize "STR_ACE_Explosives_NoExplosivesAvailable"] call EFUNC(Core,displayTextStructured);
};

View File

@ -1,30 +1,31 @@
/*
Name: AGM_Explosives_fnc_openPlaceUI
Name: ACE_Explosives_fnc_openPlaceUI
Author: Garth de Wet (LH)
Description:
Opens the UI for explosive placement selection
Parameters:
Parameters:
0: OBJECT - unit
Returns:
Nothing
Example:
[player] call AGM_Explosives_fnc_openPlaceUI;
[player] call ACE_Explosives_fnc_openPlaceUI;
*/
#include "script_component.hpp"
private ["_unit","_mags", "_item", "_index", "_actions"];
_unit = _this select 0;
call AGM_Explosives_fnc_Place_Cancel;
call FUNC(place_Cancel);
_mags = magazines _unit;
_list = [];
_itemCount = [];
{
_item = ConfigFile >> "CfgMagazines" >> _x;
if (getNumber(_item >> "AGM_Placeable") == 1) then {
if (getNumber(_item >> "ACE_Placeable") == 1) then {
_index = _list find _item;
if (_index != -1) then {
_itemCount set [_index, (_itemCount select _index) + 1];
@ -34,25 +35,26 @@ _itemCount = [];
};
};
} forEach _mags;
_actions = [localize "STR_AGM_Explosives_PlaceMenu", localize "STR_AGM_Explosives_Place"] call AGM_Interaction_fnc_prepareSelectMenu;
_actions = [localize "STR_ACE_Explosives_PlaceMenu", localize "STR_ACE_Explosives_Place"]
call EFUNC(Interaction,prepareSelectMenu);
{
_actions = [
_actions,
format [getText(_x >> "displayName") + " (%1)", _itemCount select _foreachIndex],
getText(_x >> "picture"),
configName _x
] call AGM_Interaction_fnc_AddSelectableItem;
] call EFUNC(Interaction,AddSelectableItem);
} foreach _list;
[
_actions,
{
[_this] call AGM_Explosives_fnc_openTriggerSelectionUI;
[_this] call FUNC(openTriggerSelectionUI);
},
{
call AGM_Interaction_fnc_hideMenu;
if !(profileNamespace getVariable ["AGM_Interaction_AutoCloseMenu", false]) then {
"AGM_Explosives" call AGM_Interaction_fnc_openMenuSelf;
call EFUNC(Interaction,hideMenu);
if !(profileNamespace getVariable [QUOTE( EGVAR(Interaction,AutoCloseMenu) ), false]) then {
"ACE_Explosives" call EFUNC(Interaction,openMenuSelf);
};
}
] call AGM_Interaction_fnc_openSelectMenu;
] call EFUNC(Interaction,openSelectMenu);

View File

@ -0,0 +1,28 @@
/*
Name: ACE_Explosives_fnc_openTimerSetUI
Author: Garth de Wet (LH)
Description:
Opens the UI for timer setting of an explosive
Parameters:
0: String - Magazine
Returns:
Nothing
Example:
[player] call ACE_Explosives_fnc_openTimerSetUI;
*/
#include "script_component.hpp"
private ["_mag"];
_mag = _this select 0;
createDialog "RscACE_SelectTimeUI";
sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes
sliderSetPosition [8845, 30];
buttonSetAction [8860, format[QUOTE([ARR_4(ACE_player,'%1','Timer',floor sliderPosition 8845)] call FUNC(setupExplosive);closeDialog 0;), _mag]];
buttonSetAction [8855, format[QUOTE(['%1'] call FUNC(openTriggerSelectionUI);), _mag]];
ctrlSetText [8870, format[localize "STR_ACE_Explosives_TimerMenu",0, 30]];

View File

@ -0,0 +1,53 @@
/*
Name: ACE_Explosives_fnc_openTransmitterUI
Author: Garth de Wet (LH)
Description:
Opens the UI for selecting the transmitter
Parameters:
0: OBJECT - Unit
Returns:
Nothing
Example:
[player] call ACE_Explosives_fnc_openTransmitterUI;
*/
#include "script_component.hpp"
private ["_items", "_unit", "_count", "_actions", "_config"];
_unit = _this select 0;
_items = (items _unit);
_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"]
call EFUNC(Interaction,prepareSelectMenu);
_detonators = [_unit] call FUNC(getDetonators);
{
_config = ConfigFile >> "CfgWeapons" >> _x;
_actions = [
_actions,
getText(_config >> "displayName"),
getText(_config >> "picture"),
_x
] call EFUNC(Interaction,addSelectableItem);
} count _detonators;
if (count _detonators == 0) then {
call EFUNC(Interaction,hideMenu);
"ACE_Explosives" call EFUNC(Interaction,openMenuSelf);
[format[localize "STR_ACE_Explosives_NoTriggersAvailable", "player"]] call EFUNC(Common,displayTextStructured);
}else{
[
_actions,
{
[ACE_player, _this] call FUNC(openDetonateUI);
},
{
call EFUNC(Interaction,hideMenu);
if !(profileNamespace getVariable [QUOTE( EGVAR(Interaction,AutoCloseMenu) ), false]) then {
"ACE_Explosives" call EFUNC(Interaction,openMenuSelf);
};
}
] call EFUNC(Interaction,openSelectMenu);
};

View File

@ -1,27 +1,29 @@
/*
Name: AGM_Explosives_fnc_openTriggerSelectionUI
Name: ACE_Explosives_fnc_openTriggerSelectionUI
Author: Garth de Wet (LH)
Description:
Opens the UI for explosive trigger selection
Parameters:
Parameters:
0: String - explosive magazine
Returns:
Nothing
Example:
[lbData [8866, lbCurSel 8866]] call AGM_Explosives_fnc_openTriggerSelectionUI;
[lbData [8866, lbCurSel 8866]] call ACE_Explosives_fnc_openTriggerSelectionUI;
*/
#include "script_component.hpp"
private ["_magazine", "_hasRequiredItems","_triggerTypes", "_actions", "_detonators", "_required", "_magTriggers"];
_magazine = _this select 0;
_detonators = [AGM_player] call AGM_Explosives_fnc_getDetonators;
_detonators = [ACE_player] call FUNC(getDetonators);
_triggerTypes = [_magazine] call AGM_Explosives_fnc_TriggerType;
_magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "AGM_Triggers";
_actions = [localize "STR_AGM_Explosives_TriggerMenu", localize "STR_AGM_Explosives_SelectTrigger"] call AGM_Interaction_fnc_prepareSelectMenu;
_triggerTypes = [_magazine] call FUNC(triggerType);
_magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers";
_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"]
call EFUNC(Interaction,prepareSelectMenu);
_count = 0;
{
_required = getArray (_x >> "requires");
@ -37,20 +39,21 @@ _count = 0;
if(isText(_magTriggers >> configName _x >> "displayName"))then{getText(_magTriggers >> configName _x >> "displayName")}else{getText(_x >> "displayName")},
if(isText(_magTriggers >> configName _x >> "picture"))then{getText(_magTriggers >> configName _x >> "picture")}else{getText(_x >> "picture")},
[configName _x, _magazine]
] call AGM_Interaction_fnc_AddSelectableItem;
] call EFUNC(Interaction,addSelectableItem);
_count = _count + 1;
};
} count _triggerTypes;
if (_count == 0) then {
[AGM_player] call AGM_Explosives_fnc_openPlaceUI;
[format[localize "STR_AGM_Explosives_NoTriggersAvailable", getText(configFile >> "CfgMagazines" >> _magazine >> "DisplayName")]] call AGM_Core_fnc_displayTextStructured;
[ACE_player] call FUNC(openPlaceUI);
[format[localize "STR_ACE_Explosives_NoTriggersAvailable",
getText(configFile >> "CfgMagazines" >> _magazine >> "DisplayName")]] call EFUNC(Common,displayTextStructured);
}else{
[
_actions,
{
[_this select 1, _this select 0] call AGM_Explosives_fnc_selectTrigger;
[_this select 1, _this select 0] call FUNC(selectTrigger);
},
{[AGM_player] call AGM_Explosives_fnc_openPlaceUI;}
] call AGM_Interaction_fnc_openSelectMenu;
{[ACE_player] call FUNC(openPlaceUI);}
] call EFUNC(Interaction,openSelectMenu);
};

View File

@ -1,12 +1,12 @@
/*
Name: AGM_Explosives_fnc_PlaceExplosive
Name: ACE_Explosives_fnc_PlaceExplosive
Author(s):
Garth de Wet (LH)
Description:
Places an explosive at the requested position
Parameters:
0: OBJECT - unit
1: POSITION - Position to place explosive
@ -14,13 +14,14 @@
3: STRING - Magazine class
4: Config - Config of trigger
5: ARRAY - variables required for the trigger type
Returns:
OBJECT: Placed explosive
Example:
_explosive = [player, player modelToWorld [0,0.5, 0.1], 134, "SatchelCharge_Remote_Mag", "Command", []] call AGM_Explosives_fnc_PlaceExplosive;
_explosive = [player, player modelToWorld [0,0.5, 0.1], 134, "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_PlaceExplosive;
*/
#include "script_component.hpp"
private ["_pos", "_dir", "_magazineClass", "_ammo", "_triggerSpecificVars", "_unit", "_triggerConfig", "_explosive"];
_unit = _this select 0;
_pos = _this select 1;
@ -34,15 +35,15 @@ if (count _this > 6) then {
};
if (isNil "_triggerConfig") exitWith {
diag_log format ["AGM_Explosives: Error config not passed to PlaceExplosive: %1", _this];
diag_log format ["ACE_Explosives: Error config not passed to PlaceExplosive: %1", _this];
objNull
};
_magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "AGM_Triggers" >> _triggerConfig;
_triggerConfig = ConfigFile >> "CfgAGM_Triggers" >> _triggerConfig;
_magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig;
_triggerConfig = ConfigFile >> "CfgACE_Triggers" >> _triggerConfig;
if (isNil "_triggerConfig") exitWith {
diag_log format ["AGM_Explosives: Error config not found in PlaceExplosive: %1", _this];
diag_log format ["ACE_Explosives: Error config not found in PlaceExplosive: %1", _this];
objNull
};
@ -52,8 +53,10 @@ if (isText(_magazineTrigger >> "ammo")) then {
};
_triggerSpecificVars pushBack _triggerConfig;
_explosive = createVehicle [_ammo, _pos, [], 0, "NONE"];
if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_triggerSpecificVars] call compile (getText (_triggerConfig >> "onPlace"))}) exitWith {_explosive};
if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_triggerSpecificVars]
call compile (getText (_triggerConfig >> "onPlace"))}) exitWith {_explosive};
if (_setDir) then {
[[_explosive, _dir, getNumber (_magazineTrigger >> "pitch")], "AGM_Explosives_fnc_setPos"] call AGM_Core_fnc_execRemoteFnc;
[[_explosive, _dir, getNumber (_magazineTrigger >> "pitch")], QUOTE(FUNC(setPosition))]
call EFUNC(Common,execRemoteFnc);
};
_explosive

View File

@ -0,0 +1,108 @@
/*
Name: ACE_Explosives_fnc_Place_Approve
Author(s):
Garth de Wet (LH)
Description:
Approves placement of the explosive, releases the placement object for it to settle in a location suitable for the explosive to be created.
Parameters:
Nothing
Returns:
Nothing
Example:
call ACE_Explosives_fnc_Place_Approve;
*/
#include "script_component.hpp"
if (GVAR(pfeh_running)) then {
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
GVAR(pfeh_running) = false;
};
private ["_mag", "_setup", "_player"];
_setup = GVAR(Setup);
GVAR(Setup) = objNull;
[GVAR(placer), "ACE_Explosives", false] call EFUNC(Common,setForceWalkStatus);
GVAR(placer) = objNull;
_player = ACE_player;
[_player, "DefaultAction", _player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler);
[_player, "MenuBack", _player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
call EFUNC(Interaction,hideMouseHint);
if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
_dir = (getDir _setup);
if (_dir > 180) then {
_dir = _dir - 180;
} else {
_dir = 180 + _dir;
};
_setup setVariable [QGVAR(Direction), _dir];
_player setVariable [QGVAR(PlantingExplosive), true];
_setup addEventHandler ["EpeContactStart", {
if (!((_this select 0) getVariable [QGVAR(Handled), false])) then {
private ["_player", "_pos", "_attachTo"];
_player = ACE_player;
_pos = getPosATL (_this select 0);
(_this select 0) enableSimulationGlobal false;
if (surfaceIsWater _pos) then {
_pos = getPosASL (_this select 0);
(_this select 0) setPosASL _pos;
}else{
(_this select 0) setPosATL _pos;
};
(_this select 0) setVariable [QGVAR(Handled), true];
_player setVariable [QGVAR(PlantingExplosive), false];
_attachTo = objNull;
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
_attachTo = (_this select 1);
};
[(_this select 0),_attachTo, _pos] spawn { // TODO: Change to scheduled delay execution
private ["_mag", "_setup", "_dir", "_player"];
_setup = _this select 0;
_player = ACE_player;
_mag = _setup getVariable [QGVAR(Class), ""];
_dir = _setup getVariable [QGVAR(Direction), 0];
sleep getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime");
_explosive = [_player, _this select 2, _dir, _mag, _setup getVariable QGVAR(Trigger),
[_setup getVariable QGVAR(Timer)], isNull (_this select 1)] call FUNC(placeExplosive);
deleteVehicle _setup;
if (!isNull(_explosive)) then {
_player RemoveMagazine _mag;
if (!isNull (_this select 1)) then {
_explosive attachTo [(_this select 1)];
_dir = _dir - (getDir (_this select 1));
[[_explosive, _dir, 0], QUOTE(FUNC(setPosition))] call EFUNC(Common,execRemoteFnc);
};
};
};
};
}];
_setup enableSimulationGlobal true;
_player playActionNow "MedicOther";
[_setup] spawn { // TODO: Change to scheduled delay execution
private ["_setup", "_player"];
_setup = _this select 0;
_player = ACE_player;
sleep 5;
if (!isNull _setup) then {
private ["_mag", "_dir", "_delayTime"];
_mag = _setup getVariable [QGVAR(Class), ""];
_dir = _setup getVariable [QGVAR(Direction), 0];
_delayTime = (getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime")) - 5;
if (_delayTime > 0) then {
sleep _delayTime;
};
if (!isNull _setup) then {
[_player, GetPosATL _setup, _dir, _mag, _setup getVariable QGVAR(Trigger),
[_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive);
deleteVehicle _setup;
_player RemoveMagazine _mag;
_player setVariable [QGVAR(PlantingExplosive), false];
};
};
};
}else{
deleteVehicle _setup;
};

View File

@ -0,0 +1,35 @@
/*
Name: ACE_Explosives_fnc_Place_Cancel
Author(s):
Garth de Wet (LH)
Description:
Cancels placement of the explosive
Parameters:
Nothing
Returns:
Nothing
Example:
call ACE_Explosives_fnc_Place_Cancel;
*/
#include "script_component.hpp"
if (GVAR(pfeh_running)) then {
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
GVAR(pfeh_running) = false;
};
if (!isNull (GVAR(Setup))) then {
deleteVehicle GVAR(Setup);
};
GVAR(Setup) = objNull;
if (isNil {GVAR(placer)}) then {
GVAR(placer) = objNull;
};
[GVAR(placer), "ACE_Explosives", false] call EFUNC(Common,setForceWalkStatus);
GVAR(placer) = objNull;
call EFUNC(Interaction,hideMouseHint);
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler);
[ACE_player, "MenuBack", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);

View File

@ -1,29 +1,30 @@
/*
Name: AGM_Explosives_fnc_selectTrigger
Name: ACE_Explosives_fnc_selectTrigger
Author: Garth de Wet (LH)
Description:
Selects a trigger for an explosive.
Parameters:
Parameters:
0: String - Magazine
1: String - trigger index in AGM_triggers of magazine class
1: String - trigger index in ACE_triggers of magazine class
Returns:
Nothing
Example:
["SatchelCharge_Remote_Mag","Timer"] call AGM_Explosives_fnc_selectTrigger;
["SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger;
*/
#include "script_component.hpp"
private ["_magazine","_trigger"];
closeDialog 0;
_magazine = _this select 0;
_trigger = _this select 1;
_config = ConfigFile >> "CfgAGM_Triggers" >> _trigger;
call AGM_Interaction_fnc_hideMenu;
_config = ConfigFile >> "CfgACE_Triggers" >> _trigger;
call EFUNC(Interaction,hideMenu);
// If the onSetup function returns true, it is handled elsewhere
if (isText(_config >> "onSetup") && {[_magazine] call compile getText (_config >> "onSetup")}) exitWith {};
[AGM_player, _magazine, _trigger] call AGM_Explosives_fnc_SetupExplosive;
[ACE_player, _magazine, _trigger] call FUNC(setupExplosive);

View File

@ -1,27 +1,28 @@
/*
Name: AGM_Explosives_fnc_SetPos
Name: ACE_Explosives_fnc_SetPos
Author(s):
Garth de Wet (LH)
Description:
Sets the Dir and pitch
Parameters:
0: OBJECT - Object
1: NUMBER - Direction
2: NUMBER - Pitch
Returns:
Nothing
Example:
[_explosive, 150, 90] call AGM_Explosives_fnc_SetPos;
[_explosive, 150, 90] call ACE_Explosives_fnc_SetPos;
*/
#include "script_component.hpp"
private "_ex";
_ex=_this select 0;
_ex setDir (_this select 1);
if ((_this select 2) != 0) then {
[_ex, _this select 2, 0] call BIS_fnc_setPitchBank;
[_ex, _this select 2, 0] call CALLSTACK(BIS_fnc_setPitchBank);
};
//_ex setVectorUp (surfaceNormal _pos);

View File

@ -0,0 +1,67 @@
/*
Name: ACE_Explosives_fnc_SetupExplosive
Author(s):
Garth de Wet (LH)
Description:
Starts the setup process for the passed explosive.
Parameters:
0: OBJECT - Unit placing explosive.
1: STRING - Classname of explosive to place. (CfgMagazine class)
2: Config - Trigger Config
3: NUMBER - (optional) timer
Returns:
Nothing
Example:
[player, "SatchelCharge_Remote_Mag", "Command"] call ACE_Explosives_fnc_SetupExplosive;
*/
#include "script_component.hpp"
private ["_unit", "_class", "_config", "_timer"];
_unit = _this select 0;
_class = _this select 1;
_config = _this select 2;
_timer = _this select 3;
GVAR(placer) = _unit;
// Commented out due to the fact there is a distinction between who can deactivate mines and who can plant them in standard configs.
// Would require custom config entries (ACE_ExplosiveSpecialist/ACE_Specialist) which excludes custom mods.
//if (ACE_Explosives_RequireSpecialist && {!([_unit] call ACE_Core_fnc_isEOD)}) exitWith {};
if (isNil "_config") then {
_config = getArray(ConfigFile >> "CfgMagazines" >> _class >> "ACE_Triggers" >> "SupportedTriggers") select 0;
};
GVAR(Setup) = getText(ConfigFile >> "CfgMagazines" >> _class >> "ACE_SetupObject") createVehicleLocal [0,0,-10000];
GVAR(Setup) enableSimulationGlobal false;
GVAR(Setup) setVariable [QGVAR(Class), _class];
GVAR(Setup) setVariable [QGVAR(Trigger), _config];
//GVAR(Setup) setVariable [QGVAR(Offset), GetArray(ConfigFile >> "CfgVehicles" >> typeof GVAR(Setup) >> "ACE_Offset")];
if (!isNil "_timer") then {
GVAR(Setup) setVariable [QGVAR(Timer), _timer];
};
[_unit, "ACE_Explosives", true] call EFUNC(Core,setForceWalkStatus);
GVAR(TweakedAngle) = 180;
[QGVAR(Placement),"OnEachFrame", {
private "_player";
_player = ACE_player;
if (GVAR(placer) != _player) exitWith {
call FUNC(place_Cancel);
};
GVAR(pfeh_running) = true;
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
//_pos = _pos vectorAdd ((VectorDir GVAR(Setup)) vectorCrossProduct (GVAR(Setup) getVariable [QGVAR(Offset), [0,0,0]]));
GVAR(Setup) setPosATL _pos;
if (ACE_Modifier == 0) then {
GVAR(Setup) setDir (GVAR(TweakedAngle) + getDir _player);
};
}] call CALLSTACK(BIS_fnc_addStackedEventHandler);
[localize "STR_ACE_Explosives_PlaceAction", localize "STR_ACE_Explosives_CancelAction",
localize "STR_ACE_Explosives_ScrollAction"] call EFUNC(Interaction,showMouseHint);
_unit setVariable [QGVAR(Place), [_unit, "DefaultAction",
{GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Approve);}] call EFUNC(Core,AddActionEventHandler)];
_unit setVariable [QGVAR(Cancel), [_unit, "MenuBack",
{GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Cancel);}] call EFUNC(Core,AddActionEventHandler)];

View File

@ -0,0 +1,68 @@
/*
Name: ACE_Explosives_fnc_StartDefuse
Author: Garth de Wet (LH)
Description:
Starts defusing an explosive
Parameters:
0: OBJECT - Unit to defuse explosive
1: OBJECT - Target explosive
Returns:
Nothing
Example:
[player, ACE_Interaction_Target] call ACE_Explosives_fnc_StartDefuse;
*/
#include "script_component.hpp"
private ["_unit","_target"];
_unit = _this select 0;
_target = _this select 1;
_fnc_DefuseTime = {
_target = _this select 1;
_defuseTime = 5;
if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime")) then {
_defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime");
};
if (!(_this select 0) && {GVAR(PunishNonSpecialists)}) then {
_defuseTime = _defuseTime * 1.5;
};
_defuseTime
};
_actionToPlay = "MedicOther";
if (STANCE _unit == "Prone") then {
_actionToPlay = "PutDown";
};
if (ACE_player != _unit) then {
// If the unit is a player, call the function on the player.
if (isPlayer _unit) then {
[[_unit, _target], QUOTE(FUNC(startDefuse)), _unit] call EFUNC(Common,execRemoteFnc);
} else {
// TODO: use scheduled delay execution
[_unit, _target, [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime] spawn {
(_this select 0) playActionNow _actionToPlay;
(_this select 0) disableAI "MOVE";
(_this select 0) disableAI "TARGET";
sleep (_this select 2);
[(_this select 0), (_this select 1)] call FUNC(defuseExplosive);
(_this select 0) enableAI "MOVE";
(_this select 0) enableAI "TARGET";
};
};
} else {
_unit playActionNow _actionToPlay;
if (GVAR(RequireSpecialist)) then {
if ([_unit] call EFUNC(Common,isEOD)) then {
[[true, _target] call _fnc_DefuseTime, [_unit,_target],
QFUNC(defuseExplosive), localize "STR_ACE_Explosives_DefusingExplosive"] call EFUNC(Common,progressBar);
};
} else {
[[([_unit] call EFUNC(Common,isEOD)), _target] call _fnc_DefuseTime, [_unit,_target],
QFUNC(defuseExplosive), localize "STR_ACE_Explosives_DefusingExplosive"] call EFUNC(Common,progressBar);
};
};

View File

@ -0,0 +1,27 @@
/*
Name: ACE_Explosives_fnc_startTimer
Author(s):
Garth de Wet (LH)
Description:
Starts a timer for an explosive.
Parameters:
0: OBJECT - Explosive
1: NUMBER - time till detonation
Returns:
Nothing
Example:
[_explosive, 10] call ACE_Explosives_fnc_startTimer;
*/
#include "script_component.hpp"
[{
private ["_explosive"];
_explosive = _this select 0;
if (!isNull _explosive) then {
[_explosive, -1, [_explosive, 0], true] call FUNC(detonateExplosive);
};
},_this select 1, _this] call CALLSTACK(CBA_fnc_addPerFrameHandler);

View File

@ -1,27 +1,28 @@
/*
Name: AGM_Explosives_fnc_TriggerType
Name: ACE_Explosives_fnc_TriggerType
Author(s):
Garth de Wet (LH)
Description:
Gets the types of triggers associated with the explosive
Parameters:
0: String - Explosive magazine
Returns:
ARRAY
Example:
_supports = ["SatchelCharge_Remote_Mag"] call AGM_Explosives_fnc_TriggerType;
_supports = ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_TriggerType;
*/
#include "script_component.hpp"
private "_result";
_result = [];
_config = getArray (ConfigFile >> "CfgMagazines" >> (_this select 0) >> "AGM_Triggers" >> "AGM_Triggers");
_config = getArray (ConfigFile >> "CfgMagazines" >> (_this select 0) >> "ACE_Triggers" >> "SupportedTriggers");
_count = count _config;
for "_index" from 0 to (_count - 1) do {
_result set [_index, ConfigFile >> "CfgAGM_Triggers" >> (_config select _index)];
_result set [_index, ConfigFile >> "CfgACE_Triggers" >> (_config select _index)];
};
_result

Some files were not shown because too many files have changed in this diff Show More