This commit is contained in:
VKing 2016-01-14 23:05:56 +01:00
parent 575f37c8fd
commit 8bdb2cb7f7
12 changed files with 60 additions and 64 deletions

View File

@ -3,7 +3,7 @@ class CfgAmmo {
class Default;
class TimeBombCore: Default {
ACE_DefuseTime = 5;
GVAR(DefuseTime) = 5;
};
/*
class BoundingMineCore: TimeBombCore;
@ -29,7 +29,7 @@ class CfgAmmo {
*/
class DirectionalBombBase;
class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase {
ACE_Explosive = "ClaymoreDirectionalMine_Remote_Ammo_Scripted";
GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted";
GVAR(defuseObjectPosition[]) = {0, 0, 0.038};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
@ -42,27 +42,23 @@ class CfgAmmo {
class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase {
indirectHitRange = 20;
ACE_explodeOnDefuse = 1;
GVAR(explodeOnDefuseChance) = 1;
};
class ACE_SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo {
class SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "RemoteTrigger";
ACE_explodeOnDefuse = 0;
GVAR(explodeOnDefuseChance) = 0;
};
class ACE_SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo {
class SLAMDirectionalMine_Timer_Ammo: SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "TimeTrigger";
ACE_explodeOnDefuse = 0;
GVAR(explodeOnDefuseChance) = 0;
};
class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "ACE_MagneticTrigger";
explosionAngle = 360;
indirectHitRange = 1;
mineInconspicuousness = 25;
icon = "iconExplosiveGP";
class SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "MagneticTrigger";
};
class PipeBombBase;
class DemoCharge_Remote_Ammo: PipeBombBase {
ACE_Explosive = "DemoCharge_Remote_Ammo_Scripted";
GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted";
GVAR(defuseObjectPosition[]) = {0.07, 0, 0.055};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
@ -71,7 +67,7 @@ class CfgAmmo {
indirectHitRange = 7;
};
class SatchelCharge_Remote_Ammo: PipeBombBase {
ACE_Explosive = "SatchelCharge_Remote_Ammo_Scripted";
GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted";
GVAR(defuseObjectPosition[]) = {0.1, 0.1, 0.05};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
@ -82,49 +78,49 @@ class CfgAmmo {
class IEDUrbanBig_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
};
class ACE_IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo {
class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo {
mineTrigger = "RemoteTrigger";
};
class ACE_IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo {
class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo {
mineTrigger = "RangeTrigger";
};
class IEDUrbanSmall_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
};
class ACE_IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo {
class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo {
mineTrigger = "RemoteTrigger";
};
class ACE_IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo {
mineTrigger = "RangeTriggerShort";
class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo {
mineTrigger = "RangeTrigger";
};
class IEDLandBig_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
};
class ACE_IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo {
class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo {
mineTrigger = "RemoteTrigger";
};
class ACE_IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo {
class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo {
mineTrigger = "RangeTrigger";
};
class IEDLandSmall_Remote_Ammo: PipeBombBase {
triggerWhenDestroyed = 1;
ACE_explodeOnDefuse = 0.02;
GVAR(explodeOnDefuseChance) = 0.02;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
};
class ACE_IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo {
class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo {
mineTrigger = "RemoteTrigger";
};
class ACE_IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo {
mineTrigger = "RangeTriggerShort";
class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo {
mineTrigger = "RangeTrigger";
};
};

View File

@ -1,10 +1,10 @@
class CfgMagazines {
class CA_Magazine;
class ATMine_Range_Mag: CA_Magazine {
ACE_Placeable = 1;
GVAR(Placeable) = 1;
useAction = 0;
ACE_SetupObject = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object.
ACE_DelayTime = 2.5;
GVAR(SetupObject) = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object.
GVAR(DelayTime) = 2.5;
class ACE_Triggers {
SupportedTriggers[] = {"PressurePlate"};
class PressurePlate {
@ -13,7 +13,7 @@ class CfgMagazines {
};
};
class APERSBoundingMine_Range_Mag: ATMine_Range_Mag {
ACE_SetupObject = "ACE_Explosives_Place_APERSBoundingMine";
GVAR(SetupObject) = "ACE_Explosives_Place_APERSBoundingMine";
class ACE_Triggers {
SupportedTriggers[] = {"PressurePlate"};
class PressurePlate {
@ -22,7 +22,7 @@ class CfgMagazines {
};
};
class APERSMine_Range_Mag: ATMine_Range_Mag {
ACE_SetupObject = "ACE_Explosives_Place_APERSMine";
GVAR(SetupObject) = "ACE_Explosives_Place_APERSMine";
class ACE_Triggers {
SupportedTriggers[] = {"PressurePlate"};
class PressurePlate {
@ -31,7 +31,7 @@ class CfgMagazines {
};
};
class APERSTripMine_Wire_Mag: ATMine_Range_Mag {
ACE_SetupObject = "ACE_Explosives_Place_APERSTripwireMine";
GVAR(SetupObject) = "ACE_Explosives_Place_APERSTripwireMine";
class ACE_Triggers {
SupportedTriggers[] = {"Tripwire"};
class Tripwire;
@ -39,10 +39,10 @@ class CfgMagazines {
};
class ClaymoreDirectionalMine_Remote_Mag: CA_Magazine {
ACE_Placeable = 1;
GVAR(Placeable) = 1;
useAction = 0;
ACE_SetupObject = "ACE_Explosives_Place_Claymore";
ACE_DelayTime = 1.5;
GVAR(SetupObject) = "ACE_Explosives_Place_Claymore";
GVAR(DelayTime) = 1.5;
class ACE_Triggers {
SupportedTriggers[] = {"Command", "MK16_Transmitter"};
class Command {
@ -53,10 +53,10 @@ class CfgMagazines {
};
class SatchelCharge_Remote_Mag: CA_Magazine {
ACE_Placeable = 1;
GVAR(Placeable) = 1;
useAction = 0;
ACE_SetupObject = "ACE_Explosives_Place_SatchelCharge";
ACE_DelayTime = 1;
GVAR(SetupObject) = "ACE_Explosives_Place_SatchelCharge";
GVAR(DelayTime) = 1;
class ACE_Triggers {
SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"};
class Timer {
@ -70,12 +70,12 @@ class CfgMagazines {
};
};
class DemoCharge_Remote_Mag: SatchelCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_DemoCharge";
GVAR(SetupObject) = "ACE_Explosives_Place_DemoCharge";
model = "\A3\Weapons_F\explosives\c4_charge_small_d";
};
class SLAMDirectionalMine_Wire_Mag: ATMine_Range_Mag {
ACE_SetupObject = "ACE_Explosives_Place_SLAM";
GVAR(SetupObject) = "ACE_Explosives_Place_SLAM";
class ACE_Triggers {
SupportedTriggers[] = {"IRSensor", "PressurePlate", "Timer", "Command", "MK16_Transmitter"};
class PressurePlate{
@ -99,7 +99,7 @@ class CfgMagazines {
};
class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig";
GVAR(SetupObject) = "ACE_Explosives_Place_IEDUrbanBig";
class ACE_Triggers {
SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
class Command {
@ -118,7 +118,7 @@ class CfgMagazines {
};
class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig";
GVAR(SetupObject) = "ACE_Explosives_Place_IEDLandBig";
class ACE_Triggers: ACE_Triggers {
class Command: Command {
ammo = "ACE_IEDLandBig_Command_Ammo";
@ -129,7 +129,7 @@ class CfgMagazines {
};
};
class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall";
GVAR(SetupObject) = "ACE_Explosives_Place_IEDUrbanSmall";
class ACE_Triggers {
SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
class Command {
@ -147,7 +147,7 @@ class CfgMagazines {
};
};
class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall";
GVAR(SetupObject) = "ACE_Explosives_Place_IEDLandSmall";
class ACE_Triggers: ACE_Triggers {
class Command: Command {
ammo = "ACE_IEDLandSmall_Command_Ammo";

View File

@ -13,8 +13,8 @@ class CfgWeapons {
descriptionShort = CSTRING(clacker_description);
picture = PATHTOF(Data\UI\Clacker.paa);
model = QUOTE(PATHTOF(data\ace_m57.p3d));
ACE_Range = 250;
ACE_Detonator = 1;
GVAR(Range) = 250;
GVAR(Detonator) = 1;
GVAR(triggerType) = "Command";
class ItemInfo: ACE_ExplosiveItem {
@ -25,7 +25,7 @@ class CfgWeapons {
class ACE_M26_Clacker: ACE_Clacker {
displayName = CSTRING(M26_displayName);
picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa);
ACE_Range = 5000;
GVAR(Range) = 5000;
GVAR(triggerType) = "MK16_Transmitter";
};
class ACE_DefusalKit: ACE_ItemCore {
@ -46,8 +46,8 @@ class CfgWeapons {
descriptionShort = CSTRING(DeadManSwitch_description);
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
model = "\A3\weapons_F\ammo\mag_univ.p3d";
ACE_Range = 100;
ACE_Detonator = 1;
GVAR(Range) = 100;
GVAR(Detonator) = 1;
GVAR(triggerType) = "DeadManSwitch";
class ItemInfo: ACE_ExplosiveItem {
@ -61,8 +61,8 @@ class CfgWeapons {
descriptionShort = CSTRING(cellphone_description);
picture = PATHTOF(Data\UI\Cellphone_UI.paa);
model = "\A3\weapons_F\ammo\mag_univ.p3d";
ACE_Range = 15000;
ACE_Detonator = 1;
GVAR(Range) = 15000;
GVAR(Detonator) = 1;
GVAR(triggerType) = "Cellphone";
class ItemInfo: ACE_ExplosiveItem {

View File

@ -21,7 +21,7 @@ TRACE_2("params",_unit,_detonator);
private ["_result", "_item", "_children", "_range", "_required"];
_range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range");
_range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> QGVAR(Range));
_result = [_unit] call FUNC(getPlacedExplosives);
_children = [];

View File

@ -22,7 +22,7 @@ _list = [];
_itemCount = [];
{
_item = ConfigFile >> "CfgMagazines" >> _x;
if (getNumber(_item >> "ACE_Placeable") == 1) then {
if (getNumber(_item >> QGVAR(Placeable)) == 1) then {
_index = _list find _item;
if (_index != -1) then {
_itemCount set [_index, (_itemCount select _index) + 1];

View File

@ -19,7 +19,7 @@
params ["_unit", "_explosive"];
TRACE_2("params",_unit,_explosive);
if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse"))}) exitWith {
if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith {
TRACE_1("exploding on defuse",_explosive);
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
};

View File

@ -33,7 +33,7 @@ if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRA
if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
private ["_exp", "_previousExp"];
_previousExp = _item select 0;
_exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> "ACE_Explosive");
_exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> QGVAR(Explosive));
if (_exp != "") then {
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
_exp setDir (getDir _previousExp);

View File

@ -26,7 +26,7 @@ _result = [];
{
_config = ConfigFile >> "CfgWeapons" >> _x;
if (getNumber (_config >> "ACE_Detonator") == 1 && {!(_x in _result)}) then {
if (getNumber (_config >> QGVAR(Detonator)) == 1 && {!(_x in _result)}) then {
_result pushBack _x;
};
} forEach _items;

View File

@ -23,7 +23,7 @@ private ["_result", "_magazines"];
_result = false;
_magazines = magazines _unit;
{
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith {
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> QGVAR(Placeable)) == 1) exitWith {
_result = true;
};
} count _magazines;

View File

@ -26,7 +26,7 @@ private ["_config", "_detonators"];
if (_receiver != ace_player) exitWith {};
_config = ConfigFile >> "CfgWeapons" >> _item;
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
if (isClass _config && {getNumber(_config >> QGVAR(Detonator)) == 1}) then {
private ["_clackerItems"];
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
_receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true];

View File

@ -27,7 +27,7 @@ TRACE_3("params",_vehicle,_unit,_magClassname);
private["_isAttachable", "_setupObjectClass", "_supportedTriggers", "_p3dModel"];
//Get setup object vehicle and model:
_setupObjectClass = getText(ConfigFile >> "CfgMagazines" >> _magClassname >> "ACE_SetupObject");
_setupObjectClass = getText(ConfigFile >> "CfgMagazines" >> _magClassname >> QGVAR(SetupObject));
if (!isClass (configFile >> "CfgVehicles" >> _setupObjectClass)) exitWith {ERROR("Bad Vehicle");};
_p3dModel = getText (configFile >> "CfgVehicles" >> _setupObjectClass >> "model");
if (_p3dModel == "") exitWith {ERROR("No Model");}; //"" - will crash game!

View File

@ -28,8 +28,8 @@ _fnc_DefuseTime = {
TRACE_2("defuseTime",_specialist,_target);
private ["_defuseTime"];
_defuseTime = 5;
if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime")) then {
_defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime");
if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime))) then {
_defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime));
};
if (!_specialist && {GVAR(PunishNonSpecialists)}) then {
_defuseTime = _defuseTime * 1.5;