From 0d41a4d0ac47f553662105b6183cf7c38a3aa081 Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Tue, 30 Apr 2013 11:47:40 -0700 Subject: [PATCH] Stop the ovens when the output bins are full --- microwave_oven.lua | 7 +++++++ oven.lua | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/microwave_oven.lua b/microwave_oven.lua index ab9ed4e..512ad1b 100644 --- a/microwave_oven.lua +++ b/microwave_oven.lua @@ -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) diff --git a/oven.lua b/oven.lua index 3495f0e..ee81a22 100644 --- a/oven.lua +++ b/oven.lua @@ -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)