From ccb95e119565b70629ac739d5cb5a3b4d2a51f80 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Sat, 12 Aug 2023 12:21:57 -0300 Subject: [PATCH] improved compatibility --- automobiles_lib/fuel_management.lua | 4 +++- automobiles_lib/mod.conf | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/automobiles_lib/fuel_management.lua b/automobiles_lib/fuel_management.lua index c1f439f..cda34ec 100755 --- a/automobiles_lib/fuel_management.lua +++ b/automobiles_lib/fuel_management.lua @@ -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 diff --git a/automobiles_lib/mod.conf b/automobiles_lib/mod.conf index 121be30..7275947 100755 --- a/automobiles_lib/mod.conf +++ b/automobiles_lib/mod.conf @@ -1,3 +1,3 @@ name = automobiles_lib -depends=player_api -optional_depends=emote, biofuel +depends=player_api, biofuel +optional_depends=emote