Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
-- This code supplies an oven/stove. Basically it's just a copy of the default furnace with different textures.
|
|
|
|
|
2013-03-05 08:18:56 +01:00
|
|
|
-- Boilerplate to support localized strings if intllib mod is installed.
|
|
|
|
local S
|
|
|
|
if (minetest.get_modpath("intllib")) then
|
|
|
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
|
|
|
S = intllib.Getter(minetest.get_current_modname())
|
|
|
|
else
|
|
|
|
S = function ( s ) return s end
|
|
|
|
end
|
|
|
|
|
2013-04-05 12:53:02 +02:00
|
|
|
local oven_inactive_formspec =
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
"size[8,9]"..
|
|
|
|
"image[2,2;1,1;default_furnace_fire_bg.png]"..
|
|
|
|
"list[current_name;fuel;2,3;1,1;]"..
|
|
|
|
"list[current_name;src;2,1;1,1;]"..
|
|
|
|
"list[current_name;dst;5,1;2,2;]"..
|
|
|
|
"list[current_player;main;0,5;8,4;]"
|
|
|
|
|
|
|
|
minetest.register_node("homedecor:oven", {
|
2013-03-05 08:18:56 +01:00
|
|
|
description = S("Oven"),
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
tiles = {"homedecor_oven_top.png", "homedecor_oven_bottom.png", "homedecor_oven_side.png",
|
|
|
|
"homedecor_oven_side.png", "homedecor_oven_side.png", "homedecor_oven_front.png"},
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
|
|
|
legacy_facedir_simple = true,
|
2013-03-17 00:46:30 +01:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
on_construct = function(pos)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
2013-04-05 12:53:02 +02:00
|
|
|
meta:set_string("formspec", oven_inactive_formspec)
|
|
|
|
meta:set_string("infotext", S("Oven"))
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
local inv = meta:get_inventory()
|
|
|
|
inv:set_size("fuel", 1)
|
|
|
|
inv:set_size("src", 1)
|
2013-04-05 12:53:02 +02:00
|
|
|
inv:set_size("dst", 2)
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
end,
|
|
|
|
can_dig = function(pos,player)
|
|
|
|
local meta = minetest.env:get_meta(pos);
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
if not inv:is_empty("fuel") then
|
|
|
|
return false
|
|
|
|
elseif not inv:is_empty("dst") then
|
|
|
|
return false
|
|
|
|
elseif not inv:is_empty("src") then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
return true
|
|
|
|
end,
|
2013-04-05 12:53:02 +02:00
|
|
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
if listname == "fuel" then
|
|
|
|
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
|
|
|
if inv:is_empty("src") then
|
|
|
|
meta:set_string("infotext",S("Oven is empty"))
|
|
|
|
end
|
|
|
|
return stack:get_count()
|
|
|
|
else
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
elseif listname == "src" then
|
|
|
|
return stack:get_count()
|
|
|
|
elseif listname == "dst" then
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
local stack = inv:get_stack(from_list, from_index)
|
|
|
|
if to_list == "fuel" then
|
|
|
|
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
|
|
|
if inv:is_empty("src") then
|
|
|
|
meta:set_string("infotext",S("Oven is empty"))
|
|
|
|
end
|
|
|
|
return count
|
|
|
|
else
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
elseif to_list == "src" then
|
|
|
|
return count
|
|
|
|
elseif to_list == "dst" then
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
end,
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("homedecor:oven_active", {
|
2013-03-05 08:18:56 +01:00
|
|
|
description = S("Oven"),
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
tiles = {"homedecor_oven_top.png", "homedecor_oven_bottom.png", "homedecor_oven_side.png",
|
|
|
|
"homedecor_oven_side.png", "homedecor_oven_side.png", "homedecor_oven_front_active.png"},
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
light_source = 8,
|
|
|
|
drop = "homedecor:oven",
|
|
|
|
groups = {cracky=2, not_in_creative_inventory=1},
|
|
|
|
legacy_facedir_simple = true,
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
on_construct = function(pos)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
2013-04-05 12:53:02 +02:00
|
|
|
meta:set_string("formspec", mw_oven_inactive_formspec)
|
2013-03-05 08:18:56 +01:00
|
|
|
meta:set_string("infotext", S("Oven"))
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
local inv = meta:get_inventory()
|
|
|
|
inv:set_size("fuel", 1)
|
|
|
|
inv:set_size("src", 1)
|
2013-04-05 12:53:02 +02:00
|
|
|
inv:set_size("dst", 2)
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
end,
|
|
|
|
can_dig = function(pos,player)
|
|
|
|
local meta = minetest.env:get_meta(pos);
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
if not inv:is_empty("fuel") then
|
|
|
|
return false
|
|
|
|
elseif not inv:is_empty("dst") then
|
|
|
|
return false
|
|
|
|
elseif not inv:is_empty("src") then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
return true
|
|
|
|
end,
|
2013-04-05 12:53:02 +02:00
|
|
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
if listname == "fuel" then
|
|
|
|
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
|
|
|
if inv:is_empty("src") then
|
|
|
|
meta:set_string("infotext",S("Oven is empty"))
|
|
|
|
end
|
|
|
|
return stack:get_count()
|
|
|
|
else
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
elseif listname == "src" then
|
|
|
|
return stack:get_count()
|
|
|
|
elseif listname == "dst" then
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
local stack = inv:get_stack(from_list, from_index)
|
|
|
|
if to_list == "fuel" then
|
|
|
|
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
|
|
|
if inv:is_empty("src") then
|
|
|
|
meta:set_string("infotext",S("Oven is empty"))
|
|
|
|
end
|
|
|
|
return count
|
|
|
|
else
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
elseif to_list == "src" then
|
|
|
|
return count
|
|
|
|
elseif to_list == "dst" then
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
end,
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
})
|
|
|
|
|
2013-04-05 12:53:02 +02:00
|
|
|
local function hacky_swap_node(pos,name)
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
local node = minetest.env:get_node(pos)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
|
|
|
local meta0 = meta:to_table()
|
|
|
|
if node.name == name then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
node.name = name
|
|
|
|
local meta0 = meta:to_table()
|
|
|
|
minetest.env:set_node(pos,node)
|
|
|
|
meta = minetest.env:get_meta(pos)
|
|
|
|
meta:from_table(meta0)
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"homedecor:oven","homedecor:oven_active"},
|
|
|
|
interval = 1.0,
|
|
|
|
chance = 1,
|
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
|
|
|
for i, name in ipairs({
|
|
|
|
"fuel_totaltime",
|
|
|
|
"fuel_time",
|
|
|
|
"src_totaltime",
|
|
|
|
"src_time"
|
|
|
|
}) do
|
|
|
|
if meta:get_string(name) == "" then
|
|
|
|
meta:set_float(name, 0.0)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
|
|
|
|
local srclist = inv:get_list("src")
|
|
|
|
local cooked = nil
|
2013-04-05 12:53:02 +02:00
|
|
|
local aftercooked
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
|
|
|
|
if srclist then
|
2013-04-05 12:53:02 +02:00
|
|
|
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
local was_active = false
|
|
|
|
|
|
|
|
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
|
|
|
was_active = true
|
|
|
|
meta:set_float("fuel_time", meta:get_float("fuel_time") + 1)
|
2013-04-05 12:53:02 +02:00
|
|
|
meta:set_float("src_time", meta:get_float("src_time") + 1.25)
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
if cooked and cooked.item and meta:get_float("src_time") >= cooked.time then
|
|
|
|
-- check if there's room for output in "dst" list
|
|
|
|
if inv:room_for_item("dst",cooked.item) then
|
|
|
|
-- Put result in "dst" list
|
|
|
|
inv:add_item("dst", cooked.item)
|
|
|
|
-- take stuff from "src" list
|
2013-04-05 12:53:02 +02:00
|
|
|
inv:set_stack("src", 1, aftercooked.items[1])
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
else
|
2013-03-05 08:18:56 +01:00
|
|
|
print(S("Could not insert '%s'"):format(cooked.item:to_string()))
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
end
|
|
|
|
meta:set_string("src_time", 0)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
|
|
|
local percent = math.floor(meta:get_float("fuel_time") /
|
|
|
|
meta:get_float("fuel_totaltime") * 100)
|
2013-03-05 08:18:56 +01:00
|
|
|
meta:set_string("infotext",S("Oven active: %d%%"):format(percent))
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
hacky_swap_node(pos,"homedecor:oven_active")
|
|
|
|
meta:set_string("formspec",
|
|
|
|
"size[8,9]"..
|
|
|
|
"image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:"..
|
|
|
|
(100-percent)..":default_furnace_fire_fg.png]"..
|
|
|
|
"list[current_name;fuel;2,3;1,1;]"..
|
|
|
|
"list[current_name;src;2,1;1,1;]"..
|
|
|
|
"list[current_name;dst;5,1;2,2;]"..
|
|
|
|
"list[current_player;main;0,5;8,4;]")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local fuel = nil
|
2013-04-05 12:53:02 +02:00
|
|
|
local afterfuel
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
local cooked = nil
|
|
|
|
local fuellist = inv:get_list("fuel")
|
|
|
|
local srclist = inv:get_list("src")
|
|
|
|
|
|
|
|
if srclist then
|
|
|
|
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
|
|
|
end
|
|
|
|
if fuellist then
|
2013-04-05 12:53:02 +02:00
|
|
|
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
if fuel.time <= 0 then
|
2013-03-05 08:18:56 +01:00
|
|
|
meta:set_string("infotext",S("Oven out of fuel"))
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
hacky_swap_node(pos,"homedecor:oven")
|
2013-04-05 12:53:02 +02:00
|
|
|
meta:set_string("formspec", oven_inactive_formspec)
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if cooked.item:is_empty() then
|
|
|
|
if was_active then
|
2013-03-05 08:18:56 +01:00
|
|
|
meta:set_string("infotext",S("Oven is empty"))
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
hacky_swap_node(pos,"homedecor:oven")
|
2013-04-05 12:53:02 +02:00
|
|
|
meta:set_string("formspec", oven_inactive_formspec)
|
2013-03-09 05:22:10 +01:00
|
|
|
end
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2013-04-30 20:47:40 +02:00
|
|
|
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
|
|
|
|
|
2013-03-09 05:22:10 +01:00
|
|
|
meta:set_string("fuel_totaltime", fuel.time)
|
|
|
|
meta:set_string("fuel_time", 0)
|
|
|
|
|
2013-04-05 12:53:02 +02:00
|
|
|
inv:set_stack("fuel", 1, afterfuel.items[1])
|
2013-03-09 05:22:10 +01:00
|
|
|
end,
|
|
|
|
})
|