Skip to content

Commit 3770103

Browse files
committed
Merge branch 'master' into infantry-select-weapon
2 parents a804745 + 10f5c2d commit 3770103

File tree

132 files changed

+1855
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+1855
-276
lines changed

.gitattributes

+13
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,16 @@
22
*.png binary
33
*.jpg binary
44
*.paa binary
5+
6+
# Change GitHub language categorization
7+
addons/**/*.cpp linguist-language=SQF
8+
addons/**/*.hpp linguist-language=SQF
9+
10+
optionals/**/*.cpp linguist-language=SQF
11+
optionals/**/*.hpp linguist-language=SQF
12+
13+
# Do not count extras in language usage stats
14+
extras/* linguist-vendored
15+
16+
# Do not count hemtt includes in language usage stats
17+
include/* linguist-vendored

.github/workflows/build.yml

+19-14
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,31 @@ jobs:
1010
validate:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout the source code
14-
uses: actions/checkout@v2
15-
- name: Validate SQF
16-
run: python3 tools/sqf_validator.py
17-
- name: Validate Config
18-
run: python3 tools/config_style_checker.py
19-
- name: Validate Stringtables
20-
run: python3 tools/stringtable_validator.py
21-
- name: Validate Return Types
22-
run: python3 tools/return_checker.py
23-
- name: Check for BOM
24-
uses: arma-actions/bom-check@master
13+
- name: Checkout the source code
14+
uses: actions/checkout@v2
15+
- name: Validate SQF
16+
run: python3 tools/sqf_validator.py
17+
- name: Validate Config
18+
run: python3 tools/config_style_checker.py
19+
- name: Validate Stringtables
20+
run: python3 tools/stringtable_validator.py
21+
- name: Validate Return Types
22+
run: python3 tools/return_checker.py
23+
- name: Check for BOM
24+
uses: arma-actions/bom-check@master
2525
build:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout the source code
2929
uses: actions/checkout@v2
30-
with:
31-
fetch-depth: 1
3230
- name: Build with HEMTT
3331
uses: arma-actions/hemtt@master
3432
with:
3533
command: build --release --ci
34+
- name: Set short commit hash
35+
run: echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
36+
- name: Upload Artifact
37+
uses: actions/upload-artifact@v2
38+
with:
39+
name: zen-${{ env.SHA_SHORT }}-nobin
40+
path: releases/*/* # Upload folder to avoid double-zip artifacts

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<p align="center">
66
<a href="https://github.com/zen-mod/ZEN/releases">
7-
<img src="https://img.shields.io/badge/Version-1.10.0-blue.svg?style=flat-square" alt="Zeus Enhanced Version">
7+
<img src="https://img.shields.io/badge/Version-1.11.0-blue.svg?style=flat-square" alt="Zeus Enhanced Version">
88
</a>
99
<a href="https://github.com/zen-mod/ZEN/issues">
1010
<img src="https://img.shields.io/github/issues-raw/zen-mod/ZEN.svg?style=flat-square&label=Issues" alt="Zeus Enhanced Issues">

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.0.24
1+
1.11.0.26

addons/ai/functions/fnc_garrison.sqf

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ params ["_units", "_position", "_radius", "_fillMode", "_topDown"];
2424
private _buildings = _position nearObjects ["Building", _radius] apply {
2525
_x buildingPos -1
2626
} select {
27-
!(_x isEqualTo [])
27+
_x isNotEqualTo []
2828
};
2929

3030
if (_topDown) then {
@@ -67,7 +67,7 @@ private _fnc_moveUnit = {
6767

6868
switch (_fillMode) do {
6969
case 0: { // Even filling
70-
while {!(_units isEqualTo [])} do {
70+
while {_units isNotEqualTo []} do {
7171
private _currentBuilding = _buildings select 0;
7272

7373
if (_currentBuilding isEqualTo []) then {
@@ -87,7 +87,7 @@ switch (_fillMode) do {
8787
};
8888
};
8989
case 1: { // Building by building
90-
while {!(_units isEqualTo [])} do {
90+
while {_units isNotEqualTo []} do {
9191
private _currentBuilding = _buildings select 0;
9292

9393
if (_currentBuilding isEqualTo []) then {
@@ -104,7 +104,7 @@ switch (_fillMode) do {
104104
};
105105
};
106106
case 2: { // Random
107-
while {!(_units isEqualTo [])} do {
107+
while {_units isNotEqualTo []} do {
108108
private _currentBuilding = selectRandom _buildings;
109109

110110
if (_currentBuilding isEqualTo []) then {

addons/ai/functions/fnc_waypointFastrope.sqf

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ waitUntil {
118118
[_vehicle, false, false] call ace_fastroping_fnc_deployAI;
119119

120120
// Wait for all units to finish fastroping
121-
waitUntil {!(_vehicle getVariable ["ace_fastroping_deployedRopes", []] isEqualTo [])};
122-
waitUntil { _vehicle getVariable ["ace_fastroping_deployedRopes", []] isEqualTo []};
121+
waitUntil {_vehicle getVariable ["ace_fastroping_deployedRopes", []] isNotEqualTo []};
122+
waitUntil {_vehicle getVariable ["ace_fastroping_deployedRopes", []] isEqualTo []};
123123

124124
// Stow the helicopter's fastrope system
125125
_vehicle call ace_fastroping_fnc_stowFRIES;

addons/ai/stringtable.xml

+20
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<English>Land</English>
66
<German>Landen</German>
77
<Korean>착륙</Korean>
8+
<Japanese>着陸</Japanese>
89
</Key>
910
<Key ID="STR_ZEN_AI_Fastrope">
1011
<English>Fastrope</English>
@@ -28,6 +29,7 @@
2829
<English>Search Building</English>
2930
<German>Gebäude durchsuchen</German>
3031
<Polish>Przeszukaj budynek</Polish>
32+
<Japanese>建物捜索</Japanese>
3133
</Key>
3234
<Key ID="STR_ZEN_AI_CouldNotGarrisonAll">
3335
<English>Unable to garrison all units - not enough positions</English>
@@ -139,91 +141,109 @@
139141
<German>Deckung suchen</German>
140142
<Korean>엄폐물 수색</Korean>
141143
<Polish>Szukaj Osłony</Polish>
144+
<Japanese>遮蔽検索</Japanese>
142145
</Key>
143146
<Key ID="STR_ZEN_AI_AimingError">
144147
<English>Aiming Error</English>
145148
<Polish>Błąd w celowaniu</Polish>
146149
<Korean>조준 오류</Korean>
150+
<Japanese>照準エラー</Japanese>
147151
</Key>
148152
<Key ID="STR_ZEN_AI_AnimChange">
149153
<English>Anim Change</English>
150154
<Polish>Zmiana animacji</Polish>
155+
<Japanese>アニメーション変更</Japanese>
151156
</Key>
152157
<Key ID="STR_ZEN_AI_AutoCombat">
153158
<English>Auto Combat</English>
154159
<German>Automatischer Kampf</German>
155160
<Korean>자동 전투</Korean>
156161
<Polish>Automatyczna walka</Polish>
162+
<Japanese>自動戦闘</Japanese>
157163
</Key>
158164
<Key ID="STR_ZEN_AI_AutoTarget">
159165
<English>Auto Target</English>
160166
<Polish>Automatyczne namierzanie</Polish>
161167
<Korean>자동 조준</Korean>
168+
<Japanese>自動捕捉</Japanese>
162169
</Key>
163170
<Key ID="STR_ZEN_AI_CheckVisible">
164171
<English>Check Visible</English>
165172
<Polish>Sprawdź Widoczne</Polish>
166173
<Korean>표시 확인</Korean>
174+
<Japanese>射線権威</Japanese>
167175
</Key>
168176
<Key ID="STR_ZEN_AI_Cover">
169177
<English>Cover</English>
170178
<Polish>Osłona</Polish>
171179
<Korean>은신하기</Korean>
180+
<Japanese>遮蔽</Japanese>
172181
</Key>
173182
<Key ID="STR_ZEN_AI_FSM">
174183
<English>FSM</English>
175184
<Korean>유한 상태 기계</Korean>
185+
<Japanese>FSM</Japanese>
176186
</Key>
177187
<Key ID="STR_ZEN_AI_LightsVehicle">
178188
<English>Lights (Vehicle)</English>
179189
<Polish>Światła (Pojazd)</Polish>
180190
<Korean>조명 (차량)</Korean>
191+
<Japanese>ライト (車両)</Japanese>
181192
</Key>
182193
<Key ID="STR_ZEN_AI_MineDetection">
183194
<English>Mine Detection</English>
184195
<Polish>Wykrywanie Min</Polish>
185196
<Korean>광산 탐지</Korean>
197+
<Japanese>地雷探知</Japanese>
186198
</Key>
187199
<Key ID="STR_ZEN_AI_Move">
188200
<English>Move</English>
189201
<Polish>Rusz</Polish>
190202
<Korean>이동</Korean>
203+
<Japanese>移動</Japanese>
191204
</Key>
192205
<Key ID="STR_ZEN_AI_Nightvision">
193206
<English>Nightvision</English>
194207
<Polish>Noktowizja</Polish>
195208
<Korean>야간 투시</Korean>
209+
<Japanese>暗視装置</Japanese>
196210
</Key>
197211
<Key ID="STR_ZEN_AI_Path">
198212
<English>Path</English>
199213
<Polish>Ścieżka</Polish>
200214
<Korean>경로</Korean>
215+
<Japanese>経路</Japanese>
201216
</Key>
202217
<Key ID="STR_ZEN_AI_RadioProtocol">
203218
<English>Radio Protocol</English>
204219
<Polish>Protokół radiowy</Polish>
205220
<Korean>무선 프로토콜</Korean>
221+
<Japanese>無線プロトコル</Japanese>
206222
</Key>
207223
<Key ID="STR_ZEN_AI_Suppression">
208224
<English>Suppression</English>
209225
<German>Unterdrückung</German>
210226
<Korean>제압</Korean>
211227
<Polish>Przygwożdżenie</Polish>
228+
<Japanese>制圧射撃</Japanese>
212229
</Key>
213230
<Key ID="STR_ZEN_AI_Target">
214231
<English>Target</English>
215232
<Polish>Cel</Polish>
216233
<Korean>목표물</Korean>
234+
<Japanese>目標</Japanese>
217235
</Key>
218236
<Key ID="STR_ZEN_AI_TeamSwitch">
219237
<English>Team Switch</English>
220238
<Polish>Zmiana drużyny</Polish>
221239
<Korean>팀 변경</Korean>
240+
<Japanese>チーム切り替え</Japanese>
222241
</Key>
223242
<Key ID="STR_ZEN_AI_WeaponAim">
224243
<English>Weapon Aim</English>
225244
<Polish>Celowanie Bronią</Polish>
226245
<Korean>무기 조준</Korean>
246+
<Japanese>武器照準</Japanese>
227247
</Key>
228248
</Package>
229249
</Project>

addons/area_markers/CfgVehicles.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
class CfgVehicles {
2-
class Module_F;
32
class EGVAR(modules,moduleBase);
4-
53
class GVAR(module): EGVAR(modules,moduleBase) {
64
displayName = CSTRING(CreateAreaMarker);
75
function = QFUNC(module);

addons/area_markers/functions/fnc_configure.sqf

+28-47
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,14 @@ markerSize _marker params ["_sizeA", "_sizeB"];
2929

3030
private _ctrl = _ctrlConfigure controlsGroupCtrl _idc;
3131
_ctrl ctrlSetText str _value;
32-
33-
_ctrl ctrlAddEventHandler ["KeyDown", {
34-
params ["_ctrl"];
35-
36-
private _value = ctrlText _ctrl;
37-
private _filter = toArray ".-0123456789";
38-
_value = toString (toArray _value select {_x in _filter});
39-
40-
_ctrl ctrlSetText _value;
41-
}];
4232
} forEach [
4333
[IDC_CONFIGURE_SIZE_A, _sizeA],
4434
[IDC_CONFIGURE_SIZE_B, _sizeB]
4535
];
4636

4737
private _ctrlRotationSlider = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_ROTATION_SLIDER;
4838
private _ctrlRotationEdit = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_ROTATION_EDIT;
49-
[_ctrlRotationSlider, _ctrlRotationEdit, 0, 360, markerDir _marker, 15, {format ["%1%2", round _this, toString [ASCII_DEGREE]]}] call EFUNC(common,initSliderEdit);
39+
[_ctrlRotationSlider, _ctrlRotationEdit, 0, 360, markerDir _marker, 15, EFUNC(common,formatDegrees)] call EFUNC(common,initSliderEdit);
5040

5141
private _ctrlShape = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_SHAPE;
5242
_ctrlShape lbSetCurSel (["RECTANGLE", "ELLIPSE"] find markerShape _marker);
@@ -123,51 +113,42 @@ _ctrlButtonOK ctrlAddEventHandler ["ButtonClick", {
123113

124114
// Special handling for keyboard input when edit boxes have focus
125115
// Needed to prevent interaction with Zeus display but still allow keyboard use with edit boxes
126-
{
127-
private _ctrl = _ctrlConfigure controlsGroupCtrl _x;
128-
129-
_ctrl ctrlAddEventHandler ["SetFocus", {
130-
params ["_ctrl"];
131-
132-
private _ctrlConfigure = ctrlParent _ctrl displayCtrl IDC_CONFIGURE_GROUP;
133-
_ctrlConfigure setVariable [QGVAR(focus), _ctrl];
134-
}];
135-
136-
_ctrl ctrlAddEventHandler ["SetFocus", {
137-
params ["_ctrl"];
138-
139-
private _ctrlConfigure = ctrlParent _ctrl displayCtrl IDC_CONFIGURE_GROUP;
140-
_ctrlConfigure setVariable [QGVAR(focus), nil];
141-
}];
142-
} forEach [
143-
IDC_CONFIGURE_SIZE_A,
144-
IDC_CONFIGURE_SIZE_B,
145-
IDC_CONFIGURE_ROTATION_EDIT,
146-
IDC_CONFIGURE_ALPHA_EDIT
147-
];
148-
149116
private _keyDownEH = _display displayAddEventHandler ["KeyDown", {
150117
call {
151-
params ["_display", "_keyCode"];
118+
params ["_display", "_keyCode", "", "_ctrl"];
152119

153120
if (_keyCode in [DIK_UP, DIK_DOWN, DIK_LEFT, DIK_RIGHT]) exitWith {false};
154121

155122
if (_keyCode in [DIK_BACKSPACE, DIK_DELETE]) then {
156-
private _ctrlConfigure = _display displayCtrl IDC_CONFIGURE_GROUP;
157-
private _ctrlEdit = _ctrlConfigure getVariable QGVAR(focus);
158-
if (isNil "_ctrlEdit") exitWith {};
159-
160-
private _text = ctrlText _ctrlEdit;
161-
162-
if (_keyCode == DIK_BACKSPACE) then {
163-
_text = _text select [0, count _text - 1];
123+
private _ctrlEdit = focusedCtrl _display;
124+
125+
if (ctrlIDC _ctrlEdit in IDCS_CONFIGURE_EDIT_BOXES) then {
126+
ctrlTextSelection _ctrlEdit params ["_start", "_length"];
127+
128+
// Update length based on key to delete individual characters without selecting them
129+
if (_length == 0) then {
130+
_length = [1, -1] select (_keyCode == DIK_BACKSPACE);
131+
};
132+
133+
// Get the selection start position from the left-hand side when the selection is made from right to left
134+
if (_length < 0) then {
135+
_start = _start + _length;
136+
};
137+
138+
// Delete the selected characters and update the edit box's text and selection
139+
private _characters = toArray ctrlText _ctrlEdit;
140+
_characters deleteRange [_start, abs _length];
141+
_ctrlEdit ctrlSetText toString _characters;
142+
_ctrlEdit ctrlSetTextSelection [_start, 0];
164143
};
144+
};
165145

166-
if (_keyCode == DIK_DELETE) then {
167-
_text = _text select [1, count _text - 1];
168-
};
146+
if (_keyCode == DIK_A && {_ctrl}) then {
147+
private _ctrlEdit = focusedCtrl _display;
169148

170-
_ctrlEdit ctrlSetText _text;
149+
if (ctrlIDC _ctrlEdit in IDCS_CONFIGURE_EDIT_BOXES) then {
150+
_ctrlEdit ctrlSetTextSelection [0, count toArray ctrlText _ctrlEdit];
151+
};
171152
};
172153

173154
if (_keyCode in [DIK_ESCAPE, DIK_RETURN]) then {

addons/area_markers/script_component.hpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,6 @@
5353
#define IDC_CONFIGURE_ALPHA_SLIDER 42878
5454
#define IDC_CONFIGURE_ALPHA_EDIT 42879
5555
#define IDC_CONFIGURE_OK 42880
56-
#define IDC_CONFIGURE_CANCEL 428781
56+
#define IDC_CONFIGURE_CANCEL 42881
57+
58+
#define IDCS_CONFIGURE_EDIT_BOXES [IDC_CONFIGURE_SIZE_A, IDC_CONFIGURE_SIZE_B, IDC_CONFIGURE_ROTATION_EDIT, IDC_CONFIGURE_ALPHA_EDIT]

addons/attributes/functions/fnc_open.sqf

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ private _contentPosY = 0;
4848
_ctrlLabel ctrlSetText _displayName;
4949
_ctrlLabel ctrlSetTooltip _tooltip;
5050

51+
// Get dynamic value info for the control if needed
52+
if (_valueInfo isEqualType {}) then {
53+
_valueInfo = _entity call _valueInfo;
54+
};
55+
5156
// Execute attribute control specific init function
5257
private _function = getText (configFile >> _control >> "function");
5358
[_controlsGroup, _entity call _defaultValue, _valueInfo, _entity] call (missionNamespace getVariable _function);

addons/attributes/initAttributes.sqf

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
"Object",
190190
LSTRING(PlateNumber),
191191
QGVAR(edit),
192-
{_this select [0, MAX_PLATE_CHARACTERS]},
192+
[{_this select [0, MAX_PLATE_CHARACTERS]}],
193193
{
194194
[QEGVAR(common,setPlateNumber), [_entity, _value], _entity] call CBA_fnc_targetEvent;
195195
},

0 commit comments

Comments
 (0)