Skip to content

Commit f800e93

Browse files
authored
Change moduleGarrsion from Custom Selection box to Combo Dropdown (#159)
1 parent 7e2f5bd commit f800e93

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

addons/wp/Cfg3DEN.hpp

-16
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,6 @@ class Cfg3DEN {
2727
};
2828
};
2929
};
30-
class GVAR(ExitConditions): Title {
31-
attributeLoad = QUOTE((_this controlsGroupCtrl 100) lbSetCurSel (0 max _value min 5));
32-
attributeSave = QUOTE(lbCurSel (_this controlsGroupCtrl 100));
33-
class Controls: Controls {
34-
class Title: Title {};
35-
class Value: ctrlToolbox {
36-
idc = 100;
37-
x = QUOTE(48 * GRID_3DEN_W);
38-
w = QUOTE(82 * GRID_3DEN_W);
39-
h = QUOTE(5 * GRID_3DEN_H);
40-
rows = 1;
41-
columns = 6;
42-
strings[] = { CSTRING(Random), CSTRING(All), CSTRING(FiredNear), CSTRING(Fired), CSTRING(Hit), CSTRING(None) };
43-
};
44-
};
45-
};
4630
};
4731
class Object {
4832
class AttributeCategories {

addons/wp/functions/Modules/fnc_moduleGarrison.sqf

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ switch (_mode) do {
9696
private _exitCondition = _logic getVariable [QGVAR(ExitConditions), TASK_GARRISON_EXITCONDITIONS];
9797
private _patrol = _logic getVariable [QGVAR(Patrol), TASK_GARRISON_PATROL];
9898
{
99-
[_x, getPos _logic, _range, _area, _teleport, _sortByHeight, _exitCondition - 2, _patrol] remoteExec [QFUNC(taskGarrison), leader _x];
99+
[_x, getPos _logic, _range, _area, _teleport, _sortByHeight, _exitCondition, _patrol] remoteExec [QFUNC(taskGarrison), leader _x];
100100
} forEach _groups;
101101

102102
deleteVehicle _logic;

addons/wp/modules.hpp

+27-4
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,40 @@ class GVAR(TaskGarrison) : GVAR(BaseModule) {
237237
isRectangle = 0;
238238
};
239239
class Attributes: AttributesBase {
240-
class GVAR(ExitConditions) {
240+
class GVAR(ExitConditions): Combo {
241241
displayName = CSTRING(Module_TaskGarrison_ExitCondition_DisplayName);
242242
tooltip = CSTRING(Module_TaskGarrison_ExitCondition_Tooltip);
243243
property = QGVAR(ExitConditions);
244244
defaultValue = QUOTE(TASK_GARRISON_EXITCONDITIONS);
245245
unique = 0;
246-
validate = "number";
247246
condition = "0";
248-
typeName = "NUMBER";
249-
control = QGVAR(ExitConditions);
250247
expression = "_this setVariable ['%s', _value, true];";
248+
class Values {
249+
class Random {
250+
name = CSTRING(Random);
251+
value = -2;
252+
};
253+
class All {
254+
name = CSTRING(All);
255+
value = -1;
256+
};
257+
class FiredNear {
258+
name = CSTRING(FiredNear);
259+
value = 2;
260+
};
261+
class Fired {
262+
name = CSTRING(Fired);
263+
value = 1;
264+
};
265+
class Hit {
266+
name = CSTRING(Hit);
267+
value = 0;
268+
};
269+
class None {
270+
name = CSTRING(None);
271+
value = 3;
272+
};
273+
};
251274
};
252275
class GVAR(SortByHeight): Checkbox {
253276
displayName = CSTRING(Module_TaskGarrison_SortByHeight_DisplayName);

0 commit comments

Comments
 (0)