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 file supplies refrigerators
|
|
|
|
|
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
|
|
|
|
|
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:refrigerator', {
|
2013-03-05 08:18:56 +01:00
|
|
|
drawtype = "nodebox",
|
|
|
|
description = S("Refrigerator"),
|
|
|
|
tiles = {
|
|
|
|
'homedecor_refrigerator_top.png',
|
|
|
|
'homedecor_refrigerator_bottom.png',
|
|
|
|
'homedecor_refrigerator_right.png',
|
|
|
|
'homedecor_refrigerator_left.png',
|
|
|
|
'homedecor_refrigerator_back.png',
|
|
|
|
'homedecor_refrigerator_front.png'
|
|
|
|
},
|
|
|
|
inventory_image = "homedecor_refrigerator_inv.png",
|
|
|
|
sunlight_propagates = false,
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3 },
|
2012-10-03 06:36:25 +02:00
|
|
|
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
|
|
|
},
|
|
|
|
|
2013-03-17 00:46:30 +01:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2013-03-05 08:18:56 +01:00
|
|
|
on_construct = function(pos)
|
|
|
|
local meta = minetest.env:get_meta(pos)
|
|
|
|
meta:set_string("formspec",
|
|
|
|
"size[10,10]"..
|
|
|
|
"list[current_name;main;0,0;10,5;]"..
|
|
|
|
"list[current_player;main;1,6;8,4;]")
|
|
|
|
meta:set_string("infotext", S("Refrigerator"))
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
inv:set_size("main",50)
|
|
|
|
end,
|
2012-10-03 09:44:57 +02:00
|
|
|
|
2013-03-05 08:18:56 +01:00
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
local pos = pointed_thing.above
|
|
|
|
if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then
|
|
|
|
minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place a refrigerator!') )
|
|
|
|
return
|
|
|
|
end
|
|
|
|
return minetest.item_place(itemstack, placer, pointed_thing)
|
|
|
|
end,
|
2012-10-03 09:44:57 +02:00
|
|
|
|
2013-03-05 08:18:56 +01:00
|
|
|
can_dig = function(pos,player)
|
|
|
|
local meta = minetest.env:get_meta(pos);
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
return inv:is_empty("main")
|
|
|
|
end,
|
|
|
|
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
|
|
minetest.log("action", S("%s moves stuff in refrigerator at %s"):format(
|
|
|
|
player:get_player_name(),
|
|
|
|
minetest.pos_to_string(pos)
|
|
|
|
))
|
|
|
|
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
|
|
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
2013-03-05 08:18:56 +01:00
|
|
|
minetest.log("action", S("%s moves stuff to refrigerator at %s"):format(
|
|
|
|
player:get_player_name(),
|
|
|
|
minetest.pos_to_string(pos)
|
|
|
|
))
|
|
|
|
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
|
|
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
2013-03-05 08:18:56 +01:00
|
|
|
minetest.log("action", S("%s takes stuff from refrigerator at %s"):format(
|
|
|
|
player:get_player_name(),
|
|
|
|
minetest.pos_to_string(pos)
|
|
|
|
))
|
|
|
|
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
|
|
|
})
|