mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Interaction Menu - Show distance to target on vehicle actions (#9644)
* add distance to action
* sort by distance
* Revert "sort by distance"
This reverts commit 89834613dd
.
* show distance for crewed vehicles
* Update fnc_createVehiclesActions.sqf
This commit is contained in:
parent
d1f0dc5e83
commit
5e792082ec
@ -23,8 +23,11 @@ params ["_vehicles", "_statement", "_target"];
|
||||
_vehicles apply {
|
||||
private _name = getText ((configOf _x) >> "displayName");
|
||||
private _ownerName = [_x, true] call EFUNC(common,getName);
|
||||
private _distanceStr = (ACE_player distance _x) toFixed 1;
|
||||
if ("" != _ownerName) then {
|
||||
_name = format ["%1 (%2)", _name, _ownerName];
|
||||
_name = format ["%1 (%2, %3m)", _name, _ownerName, _distanceStr];
|
||||
} else {
|
||||
_name = format ["%1 (%2m)", _name, _distanceStr];
|
||||
};
|
||||
private _icon = [_x] call EFUNC(common,getVehicleIcon);
|
||||
private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
||||
|
Loading…
Reference in New Issue
Block a user