---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by steph.
--- DateTime: 2/25/2022 11:10 PM
---
---Quick list to allow the mechanic repair option to be set enabled for all vehicle parts---
---
require "Vehicles/ISUI/ISVehicleMechanics"

local enableRepairs = ISVehicleMechanics.doPartContextMenu

function ISVehicleMechanics:doPartContextMenu(part, x, y)

    if (part:getId() == ("GloveBox") or ("Heater") or ("Battery") or ("Brake") or ("Door") or ("EngineDoor") or
            ("GasTank") or ("Tire") or ("Trunk") or ("TrunkDoor") or ("Headlight") or ("Seat") or ("Window)") or
            ("Muffler") or ("Radio") or ("Suspension") or ("Windshield") or ("TowBar"))then


        if part:getCondition() < 100 then
            part:getScriptPart():setRepairMechanic(true);
        elseif part:getCondition() == 100 then
            part:getScriptPart():setRepairMechanic(false);
        end
    end

    enableRepairs(self, part, x, y)

end