Compare commits

...

2 Commits

Author SHA1 Message Date
Alexsandro Percy ccb95e1195 improved compatibility 2023-08-12 12:21:57 -03:00
Alexsandro Percy 837dc8e3c7 biofuel is optional 2023-08-12 11:59:04 -03:00
11 changed files with 14 additions and 11 deletions

View File

@ -2,4 +2,4 @@ name=automobiles_buggy
title=Buggy
description=A buggy
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib

View File

@ -2,4 +2,4 @@ name=automobiles_catrelle
title=Catrelle
description=Une 4L pour mes amis français
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib

View File

@ -2,4 +2,4 @@ name=automobiles_coupe
title=Coupe
description=A coupe
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib

View File

@ -2,4 +2,4 @@ name=automobiles_delorean
title=Delorean
description=A Delorean
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib

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

@ -4,7 +4,8 @@ local S = minetest.get_translator(minetest.get_current_modname())
automobiles_lib = {}
automobiles_lib.fuel = {['biofuel:biofuel'] = 1,['biofuel:bottle_fuel'] = 1,
['biofuel:phial_fuel'] = 0.25, ['biofuel:fuel_can'] = 10}
['biofuel:phial_fuel'] = 0.25, ['biofuel:fuel_can'] = 10,
['airutils:biofuel'] = 1,}
automobiles_lib.gravity = 9.8
automobiles_lib.is_creative = minetest.settings:get_bool("creative_mode", false)

View File

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

View File

@ -2,4 +2,4 @@ name=automobiles_motorcycle
title=Motorcycle
description=A motorcycle
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib

View File

@ -2,4 +2,4 @@ name=automobiles_roadster
title=Roadster
description=A roadster automobile
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib

View File

@ -2,4 +2,4 @@ name=automobiles_trans_am
title=Trans Am
description=A Trans AM car to escape from the Smokey Bear
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib

View File

@ -2,4 +2,4 @@ name=automobiles_vespa
title=Vespa
description=A Vespa motorcycle
author=apercy
depends=biofuel,automobiles_lib
depends=automobiles_lib