mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Rearm - Show distance to target on actions (#9866)
* Show rearm distance in action * Update addons/rearm/functions/fnc_addRearmActions.sqf --------- Co-authored-by: Cyruz143 <root.cyruz@gmail.com> Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
017d47f8c9
commit
8c69bd25ea
@ -30,7 +30,9 @@ private _cswCarryMagazines = [];
|
|||||||
private _vehicleActions = [];
|
private _vehicleActions = [];
|
||||||
{
|
{
|
||||||
private _vehicle = _x;
|
private _vehicle = _x;
|
||||||
|
private _displayName = getText (configOf _vehicle >> "displayName");
|
||||||
|
private _distanceStr = (ACE_player distance _vehicle) toFixed 1;
|
||||||
|
private _actionName = format ["%1 (%2m)", _displayName, _distanceStr];
|
||||||
// Array of magazines that can be rearmed in the vehicle
|
// Array of magazines that can be rearmed in the vehicle
|
||||||
private _needRearmMags = ([_vehicle] call FUNC(getNeedRearmMagazines)) apply {_x select 0};
|
private _needRearmMags = ([_vehicle] call FUNC(getNeedRearmMagazines)) apply {_x select 0};
|
||||||
|
|
||||||
@ -57,7 +59,7 @@ private _vehicleActions = [];
|
|||||||
// [Level 0] adds a single action to rearm the entire vic
|
// [Level 0] adds a single action to rearm the entire vic
|
||||||
private _action = [
|
private _action = [
|
||||||
_vehicle,
|
_vehicle,
|
||||||
getText(configOf _vehicle >> "displayName"),
|
_actionName,
|
||||||
_icon,
|
_icon,
|
||||||
{_this call FUNC(rearmEntireVehicle)},
|
{_this call FUNC(rearmEntireVehicle)},
|
||||||
{true},
|
{true},
|
||||||
@ -84,7 +86,7 @@ private _vehicleActions = [];
|
|||||||
|
|
||||||
private _action = [
|
private _action = [
|
||||||
_vehicle,
|
_vehicle,
|
||||||
getText(configOf _vehicle >> "displayName"),
|
_actionName,
|
||||||
_icon,
|
_icon,
|
||||||
{},
|
{},
|
||||||
{true},
|
{true},
|
||||||
|
Loading…
Reference in New Issue
Block a user