Skip to content

Commit

Permalink
refactor(client/target): check DoesVehicleUseFuel in canInteract
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Jul 14, 2024
1 parent 70432ec commit 387078c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ else
icon = "fas fa-gas-pump",
label = locale('start_fueling'),
canInteract = function(entity)
if state.isFueling or cache.vehicle then
if state.isFueling or cache.vehicle or not DoesVehicleUseFuel(state.lastVehicle) then
return false
end

Expand Down Expand Up @@ -88,7 +88,7 @@ if config.petrolCan.enabled then
icon = "fas fa-gas-pump",
label = locale('start_fueling'),
canInteract = function(entity)
if state.isFueling or cache.vehicle or lib.progressActive() then
if state.isFueling or cache.vehicle or lib.progressActive() or not DoesVehicleUseFuel(entity) then
return false
end
return state.petrolCan and config.petrolCan.enabled
Expand Down

0 comments on commit 387078c

Please sign in to comment.