oil firebox bugfix

This commit is contained in:
Joachim Stolberg 2020-03-11 19:25:54 +01:00
parent e32bdfe950
commit cf6410dcf6

View File

@ -95,11 +95,8 @@ minetest.register_node("techage:oilfirebox", {
on_timer = node_timer, on_timer = node_timer,
can_dig = fuel.can_dig, can_dig = fuel.can_dig,
allow_metadata_inventory_put = fuel.allow_metadata_inventory_put,
allow_metadata_inventory_take = fuel.allow_metadata_inventory_take,
on_rightclick = fuel.on_rightclick, on_rightclick = fuel.on_rightclick,
on_receive_fields = fuel.on_receive_fields, on_receive_fields = fuel.on_receive_fields,
on_punch = fuel.on_punch,
on_construct = function(pos) on_construct = function(pos)
techage.add_node(pos, "techage:oilfirebox") techage.add_node(pos, "techage:oilfirebox")
@ -111,7 +108,6 @@ minetest.register_node("techage:oilfirebox", {
local meta = M(pos) local meta = M(pos)
meta:set_string("formspec", fuel.formspec(nvm)) meta:set_string("formspec", fuel.formspec(nvm))
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size('fuel', 1)
firehole(pos, false) firehole(pos, false)
end, end,
@ -119,14 +115,14 @@ minetest.register_node("techage:oilfirebox", {
firehole(pos, nil) firehole(pos, nil)
end, end,
on_metadata_inventory_put = function(pos, listname, index, stack, player) on_punch = function(pos, node, puncher, pointed_thing)
local nvm = techage.get_nvm(pos) local nvm = techage.get_nvm(pos)
nvm.liquid = nvm.liquid or {} fuel.on_punch(pos, node, puncher, pointed_thing)
nvm.liquid.amount = nvm.liquid.amount or 0 if nvm.liquid and nvm.liquid.amount and nvm.liquid.amount > 0 then
minetest.after(1, start_firebox, pos, nvm) minetest.after(1, start_firebox, pos, nvm)
fuel.on_metadata_inventory_put(pos, listname, index, stack, player) end
end, end,
liquid = { liquid = {
capa = fuel.CAPACITY, capa = fuel.CAPACITY,
fuel_cat = fuel.BT_BITUMEN, fuel_cat = fuel.BT_BITUMEN,