improved compatibility

This commit is contained in:
Alexsandro Percy 2023-08-12 12:21:57 -03:00
parent 837dc8e3c7
commit ccb95e1195
2 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,9 @@ function automobiles_lib.loadFuel(self, player_name, free, max_fuel)
if fuel or free == true then
local stack = ItemStack(item_name .. " 1")
if self._energy < max_fuel then
if free == false then inv:remove_item("main", stack) end
itmstck:set_count(1)
if free == false then inv:remove_item("main", itmstck) end
if fuel then
self._energy = self._energy + fuel
end

View File

@ -1,3 +1,3 @@
name = automobiles_lib
depends=player_api
optional_depends=emote, biofuel
depends=player_api, biofuel
optional_depends=emote