Stop the ovens when the output bins are full

This commit is contained in:
Samuel Sieb 2013-04-30 11:47:40 -07:00
parent b5d319d3e5
commit 0d41a4d0ac
2 changed files with 14 additions and 0 deletions

View File

@ -285,6 +285,13 @@ minetest.register_abm({
return
end
if inv:room_for_item("dst",cooked.item) then
meta:set_string("infotext", S("Oven output bins are full"))
hacky_swap_node(pos, "homedecor:microwave_oven")
meta:set_string("formspec", mw_oven_inactive_formspec)
return
end
meta:set_string("fuel_totaltime", fuel.time)
meta:set_string("fuel_time", 0)

View File

@ -261,6 +261,13 @@ minetest.register_abm({
return
end
if inv:room_for_item("dst",cooked.item) then
meta:set_string("infotext", S("Oven output bins are full"))
hacky_swap_node(pos, "homedecor:oven")
meta:set_string("formspec", oven_inactive_formspec)
return
end
meta:set_string("fuel_totaltime", fuel.time)
meta:set_string("fuel_time", 0)