Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Commit b3b0ba2

Browse files
committed
Stage work
1 parent 517b108 commit b3b0ba2

File tree

6 files changed

+106
-24
lines changed

6 files changed

+106
-24
lines changed

addons/ieds/CfgVehicles.hpp

+45-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class CfgVehicles {
22
class ACE_Module;
33
class GVAR(createIed): ACE_Module {
4-
author = "STR_ACE_common_ACETeam";
4+
author = ACECSTRING(common,ACETeam);
55
category = "ACE_missionModules";
66
displayName = CSTRING(Module);
77
function = QFUNC(moduleInit);
@@ -10,37 +10,64 @@ class CfgVehicles {
1010
isTriggerActivated = 0;
1111
isDisposable = 0;
1212
// icon = ""; // TODO add module icon
13-
class Arguments {
13+
class Arguments {
1414
class typeOfIED {
15-
displayName = "Type";
16-
description = "The Type of the IED";
15+
displayName = CSTRING(Type);
16+
description = CSTRING(Type_Description);
1717
typeName = "NUMBER";
1818
class values {
19-
class land {name="Normal"; value=0; default=1; };
20-
class urban {name="Urban"; value=1; };
19+
class land {
20+
name = CSTRING(Type_Normal);
21+
value = 0; default = 1;
22+
};
23+
class urban {
24+
name = CSTRING(Type_Urban);
25+
value = 1;
26+
};
2127
};
2228
};
23-
2429
class sizeOfIED {
25-
displayName = "Size";
26-
description = "The size of the IED";
30+
displayName = CSTRING(Size);
31+
description = CSTRING(Size_Description);
2732
typeName = "NUMBER";
2833
class values {
29-
class small {name="Small"; value=1; default=1; };
30-
class large {name="Large"; value=0; };
34+
class small {
35+
name = CSTRING(Size_Normal);
36+
value = 0; default = 1;
37+
};
38+
class large {
39+
name = CSTRING(Size_Urban);
40+
value = 1;
41+
};
3142
};
3243
};
3344

3445
class heightOfIED {
35-
displayName = "Height";
36-
description = "The height that the IED is burried";
46+
displayName = CSTRING(Height);
47+
description = CSTRING(Height_Description);
3748
typeName = "NUMBER";
3849
class values {
39-
class Above {name="Above Ground"; value=0; default=1; };
40-
class slightly {name="Slightly burried"; value=1; };
41-
class medium {name="Medium burried"; value=2; };
42-
class almost {name="Almost burried"; value=3; };
43-
class fully {name="Fully burried"; value=4; };
50+
class Above {
51+
name = CSTRING(Height_AboveGround);
52+
value = 0;
53+
default = 1;
54+
};
55+
class slightly {
56+
name = CSTRING(Height_SlightlyBurried);
57+
value = 1;
58+
};
59+
class medium {
60+
name = CSTRING(Height_MediumBurried);
61+
value = 2;
62+
};
63+
class almost {
64+
name = CSTRING(Height_AlmostBurried);
65+
value = 3;
66+
};
67+
class fully {
68+
name = CSTRING(Height_FullyBurried);
69+
value = 4;
70+
};
4471
};
4572
};
4673

addons/ieds/config.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
class CfgPatches {
44
class ADDON {
5+
name = COMPONENT_NAME;
56
units[] = {};
67
weapons[] = {};
78
requiredVersion = REQUIRED_VERSION;
89
requiredAddons[] = {"acex_main", "ace_explosives"};
9-
author[]= {"Glowbal"};
10+
author = ACECSTRING(common,ACETeam);
11+
authors[]= {"Glowbal"};
1012
authorUrl = "https://github.com/glowbal";
1113
VERSION_CONFIG;
1214
};

addons/ieds/functions/fnc_createIEDObject.sqf

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
params ["_logic"];
88

9-
private ["_logic","_typeOfIED", "_sizeOfIED", "_heightOfIED", "_iedClass", "_iedCreated"];
10-
119
if (isNull _logic) exitwith {};
1210

1311
private _typeOfIED = _logic getvariable ["typeOfIED", 0];
@@ -27,13 +25,13 @@ private _iedClass = switch (_typeOfIED) do {
2725
case 1: { URBAN_IEDS select _sizeOfIED };
2826
};
2927

30-
private _iedCreated = _iedClass createVehicle (getPos _logic);
31-
28+
private _iedCreated = _iedClass createVehicle [0,0,0];
3229
_iedCreated setPos [getPos _Logic select 0, getPos _Logic select 1, (getPos _Logic select 2) + _heightOfIED];
3330

3431
if (_logic getvariable ["iedActivationType", 0] == 0) then {
3532
private _mine = createMine [_iedClass, getPos _iedCreated, [], 0];
36-
_mine setDir ((getDir _iedCreated)+90);
33+
_mine setDir ((getDir _iedCreated) + 90);
34+
_mine setPos _iedCreated;
3735
_iedCreated setvariable [QGVAR(pressurePlate), _mine];
3836
hideObjectGlobal _mine;
3937
};
@@ -68,4 +66,6 @@ _iedCreated addEventHandler ["Killed", {
6866
deleteVehicle _ied;
6967
}];
7068

69+
["acex_iedCreated", [_iedCreated, _typeOfIED, _sizeOfIED, _heightOfIED]] call CBA_fnc_localEvent;
70+
7171
_iedCreated;

addons/ieds/functions/fnc_onIEDActivated.sqf

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ private _chain = _logic getvariable [QGVAR(collection), []];
2424

2525
private _trigger = _iedLogic getvariable [QGVAR(linkedIED), objNull];
2626
if (!(isNull _trigger)) then {
27+
["acex_iedActivated", [_trigger]] call CBA_fnc_localEvent;
28+
2729
[_iedLogic, _trigger, _logic] spawn { // using a spawn because it doesn't matter to much if an ied isn't detonated at a reliable time
2830
params ["_iedLogic", "_trigger", "_master"];
2931
if (!isNull _trigger) then {

addons/ieds/script_component.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#define COMPONENT ieds
2+
#define COMPONENT_BEAUTIFIED IEDs
23
#include "\z\acex\addons\main\script_mod.hpp"
34

5+
// #define DEBUG_MODE_FULL
6+
// #define DISABLE_COMPILE_CACHE
7+
// #define CBA_DEBUG_SYNCHRONOUS
8+
// #define ENABLE_PERFORMANCE_COUNTERS
9+
410
#ifdef DEBUG_ENABLED_IEDS
511
#define DEBUG_MODE_FULL
612
#endif

addons/ieds/stringtable.xml

+45
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,50 @@
44
<Key ID="STR_ACEX_ieds_Module">
55
<English>Create IED</English>
66
</Key>
7+
<Key ID="STR_ACEX_ieds_Type">
8+
<English>Type</English>
9+
</Key>
10+
<Key ID="STR_ACEX_ieds_Type_Description">
11+
<English>The Type of the IED</English>
12+
</Key>
13+
<Key ID="STR_ACEX_ieds_Type_Urban">
14+
<English>Urban</English>
15+
</Key>
16+
<Key ID="STR_ACEX_ieds_Type_Normal">
17+
<English>Normal</English>
18+
</Key>
19+
<Key ID="STR_ACEX_ieds_Size">
20+
<English>Size</English>
21+
</Key>
22+
<Key ID="STR_ACEX_ieds_Size_Description">
23+
<English>The Size of the IED</English>
24+
</Key>
25+
<Key ID="STR_ACEX_ieds_Size_Small">
26+
<English>Small</English>
27+
</Key>
28+
<Key ID="STR_ACEX_ieds_Size_Large">
29+
<English>Large</English>
30+
</Key>
31+
<Key ID="STR_ACEX_ieds_Height">
32+
<English>Height</English>
33+
</Key>
34+
<Key ID="STR_ACEX_ieds_Height_Description">
35+
<English>The height that the IED is burried</English>
36+
</Key>
37+
<Key ID="STR_ACEX_ieds_Height_AboveGround">
38+
<English>Above Ground</English>
39+
</Key>
40+
<Key ID="STR_ACEX_ieds_Height_SlightlyBurried">
41+
<English>Slightly burried</English>
42+
</Key>
43+
<Key ID="STR_ACEX_ieds_Height_MediumBurried">
44+
<English>Medium burried</English>
45+
</Key>
46+
<Key ID="STR_ACEX_ieds_Height_AlmostBurried">
47+
<English>Almost burried</English>
48+
</Key>
49+
<Key ID="STR_ACEX_ieds_Height_FullyBurried">
50+
<English>Fully burried</English>
51+
</Key>
752
</Package>
853
</Project>

0 commit comments

Comments
 (0)