Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
private ["_partsNeeded","_itemsNeeded","_partsToActOn","_partToActOn","_brokenParts","_repairableParts","_salvageableParts","_itemAction","_equippedMagazines","_vehicle","_action","_usedArray","_missingArray","_duration","_progress","_sleepDuration","_startTime","_label"];
private ["_partsNeeded","_itemsNeeded","_partsToActOn","_partToActOn","_brokenParts","_repairableParts","_sortedRepairableParts","_salvageableParts","_itemAction","_equippedMagazines","_vehicle","_action","_usedArray","_missingArray","_duration","_progress","_sleepDuration","_startTime","_label"];

_partsNeeded = [];
_itemsNeeded = [];
_partsToActOn = [];
_partToActOn = [];
_repairableParts =[];
_sortedRepairableParts =[];
_salvageableParts =[];
_equippedMagazines = magazines player;
_vehicle = _this select 1;
Expand Down Expand Up @@ -322,6 +323,10 @@ if (_action == 'repairAllCar') then
};
}forEach _partsToActOn;

//sort _repairableParts by damage DESCEND

_sortedRepairableParts = [_repairableParts,[],{_vehicle getHitPointDamage _x}, "DESCEND"] call BIS_fnc_sortBy;

//Check for all required tools and parts

if (_itemAction == 0) then
Expand Down Expand Up @@ -389,7 +394,7 @@ else
{
if(_itemAction == 0) then
{
_partToActOn pushback (_repairableParts select 0);
_partToActOn pushback (_sortedRepairableParts select 0);
}
else
{
Expand Down Expand Up @@ -496,4 +501,4 @@ catch
(findDisplay 46) displayRemoveEventHandler ["KeyDown", _keyDownHandle];
(findDisplay 46) displayRemoveEventHandler ["MouseButtonDown", _mouseButtonDownHandle];
ExileClientActionDelayShown = false;
ExileClientActionDelayAbort = false;
ExileClientActionDelayAbort = false;