Skip to content

Commit 9def352

Browse files
authored
Improve Toggle AI Pathing keybind with hint icons (#725)
1 parent 5de15ba commit 9def352

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

addons/editor/initKeybinds.sqf

+8-17
Original file line numberDiff line numberDiff line change
@@ -223,32 +223,23 @@
223223

224224
[[ELSTRING(main,DisplayName), LSTRING(AIControl)], QGVAR(toggleAIPATH), [LSTRING(ToggleAIPATH), LSTRING(ToggleAIPATH_Description)], {
225225
if (!isNull curatorCamera && {!GETMVAR(RscDisplayCurator_search,false)}) then {
226-
private _enabled = 0;
227-
private _disabled = 0;
228-
229226
{
230227
if (!isPlayer _x && {_x == vehicle _x || {_x == driver vehicle _x}}) then {
231228
private _isPathEnabled = _x checkAIFeature "PATH";
232229
private _eventName = [QEGVAR(common,enableAI), QEGVAR(common,disableAI)] select _isPathEnabled;
233230
[_eventName, [_x, "PATH"], _x] call CBA_fnc_globalEvent;
234231

235-
if (_isPathEnabled) then {
236-
_disabled = _disabled + 1;
237-
} else {
238-
_enabled = _enabled + 1;
239-
};
232+
private _icon = [
233+
"\a3\3den\Data\Displays\Display3DEN\PanelRight\modeWaypoints_ca.paa",
234+
"\a3\3den\Data\CfgWaypoints\hold_ca.paa"
235+
] select _isPathEnabled;
236+
237+
[[
238+
["ICON", [_x, _icon]]
239+
], 3, _x] call EFUNC(common,drawHint);
240240
};
241241
} forEach SELECTED_OBJECTS;
242242

243-
[
244-
"%1 - %2: %3 - %4: %5",
245-
LLSTRING(AIPathToggled),
246-
LELSTRING(common,Enabled),
247-
_enabled,
248-
LELSTRING(common,Disabled),
249-
_disabled
250-
] call EFUNC(common,showMessage);
251-
252243
true // handled
253244
};
254245
}, {}, [0, [false, false, false]]] call CBA_fnc_addKeybind; // Default: Unbound

addons/editor/stringtable.xml

-3
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,5 @@
411411
<Key ID="STR_ZEN_Editor_ToggleAIPath_Description">
412412
<English>Makes selected AI units start or stop moving. Does not affect aiming or shooting. Similar to "Hold Position" in RTS games.</English>
413413
</Key>
414-
<Key ID="STR_ZEN_Editor_AIPathToggled">
415-
<English>AI Pathing Toggled</English>
416-
</Key>
417414
</Package>
418415
</Project>

0 commit comments

Comments
 (0)