Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions addons/rearm/functions/fnc_addRearmActions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ private _cswCarryMagazines = [];
private _vehicleActions = [];
{
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
private _needRearmMags = ([_vehicle] call FUNC(getNeedRearmMagazines)) apply {_x select 0};

Expand All @@ -57,7 +59,7 @@ private _vehicleActions = [];
// [Level 0] adds a single action to rearm the entire vic
private _action = [
_vehicle,
getText(configOf _vehicle >> "displayName"),
_actionName,
_icon,
{_this call FUNC(rearmEntireVehicle)},
{true},
Expand All @@ -84,7 +86,7 @@ private _vehicleActions = [];

private _action = [
_vehicle,
getText(configOf _vehicle >> "displayName"),
_actionName,
_icon,
{},
{true},
Expand Down