fix another nil crash

This commit is contained in:
Vanessa Ezekowitz 2013-12-01 23:58:49 -05:00
parent 36f7fa59a1
commit 34b2580ed1

View File

@ -176,13 +176,15 @@ minetest.register_abm({
return
end
meta:set_string("fuel_totaltime", fuel.time)
meta:set_string("fuel_time", 0)
if consume then
local stack = inv:get_stack("fuel", 1)
stack:take_item()
inv:set_stack("fuel", 1, stack)
end
if fuel and fuel.time then
meta:set_string("fuel_totaltime", fuel.time)
meta:set_string("fuel_time", 0)
if consume then
local stack = inv:get_stack("fuel", 1)
stack:take_item()
inv:set_stack("fuel", 1, stack)
end
end
end,
})