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.
270
crafts.lua
@ -194,19 +194,17 @@ minetest.register_craft( {
|
|||||||
--
|
--
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:glass_table_small_square 2',
|
type = "shapeless",
|
||||||
recipe = {
|
output = 'homedecor:glass_table_small_square',
|
||||||
{ 'homedecor:glass_table_small_round', 'homedecor:glass_table_small_round', 'homedecor:glass_table_small_round' },
|
recipe = { 'homedecor:glass_table_small_round' },
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:glass_table_large 2',
|
type = "shapeless",
|
||||||
recipe = {
|
output = 'homedecor:glass_table_large',
|
||||||
{ 'homedecor:glass_table_small_square', 'homedecor:glass_table_small_square' },
|
recipe = { 'homedecor:glass_table_small_square' },
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -306,10 +304,9 @@ minetest.register_craft({
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
output = 'homedecor:wood_table_small_square 2',
|
output = 'homedecor:wood_table_small_square 2',
|
||||||
recipe = {
|
recipe = { 'homedecor:wood_table_small_round' },
|
||||||
{ 'homedecor:wood_table_small_round', 'homedecor:wood_table_small_round', 'homedecor:wood_table_small_round' },
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -321,10 +318,9 @@ minetest.register_craft({
|
|||||||
--
|
--
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
output = 'homedecor:wood_table_large 2',
|
output = 'homedecor:wood_table_large 2',
|
||||||
recipe = {
|
recipe = { 'homedecor:wood_table_small_square' },
|
||||||
{ 'homedecor:wood_table_small_square', 'homedecor:wood_table_small_square' },
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -630,7 +626,7 @@ minetest.register_craft({
|
|||||||
-- Table legs and stuff
|
-- Table legs and stuff
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:table_legs_wrought_iron 2',
|
output = 'homedecor:table_legs_wrought_iron 3',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'default:iron_lump', '' },
|
{ '', 'default:iron_lump', '' },
|
||||||
{ '', 'default:iron_lump', '' },
|
{ '', 'default:iron_lump', '' },
|
||||||
@ -641,7 +637,7 @@ minetest.register_craft( {
|
|||||||
--
|
--
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:pole_wrought_iron 2',
|
output = 'homedecor:pole_wrought_iron 4',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ 'default:iron_lump', },
|
{ 'default:iron_lump', },
|
||||||
{ 'default:iron_lump', },
|
{ 'default:iron_lump', },
|
||||||
@ -650,7 +646,7 @@ minetest.register_craft( {
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:fence_wrought_iron 4',
|
output = 'homedecor:fence_wrought_iron 6',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ 'default:iron_lump','default:iron_lump','default:iron_lump' },
|
{ 'default:iron_lump','default:iron_lump','default:iron_lump' },
|
||||||
{ 'default:iron_lump','default:iron_lump','default:iron_lump' },
|
{ 'default:iron_lump','default:iron_lump','default:iron_lump' },
|
||||||
@ -771,91 +767,6 @@ minetest.register_craft({
|
|||||||
burntime = 30,
|
burntime = 30,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
minetest.register_craftitem("homedecor:drawer_large", {
|
|
||||||
description = "Large Wooden Drawer",
|
|
||||||
inventory_image = "homedecor_drawer_large.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = 'homedecor:drawer_large',
|
|
||||||
recipe = {
|
|
||||||
{ 'default:wood', 'default:steel_ingot', 'default:wood' },
|
|
||||||
{ 'default:wood', 'default:wood', 'default:wood' },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = 'fuel',
|
|
||||||
recipe = 'homedecor:drawer_large',
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
minetest.register_craftitem("homedecor:dresser_oak", {
|
|
||||||
description = "Three-Drawer Oak Dresser",
|
|
||||||
inventory_image = "homedecor_dresser_oak_inv.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = 'homedecor:dresser_oak',
|
|
||||||
recipe = {
|
|
||||||
{ 'default:wood', 'homedecor:drawer_large', 'default:wood' },
|
|
||||||
{ 'default:wood', 'homedecor:drawer_large', 'default:wood' },
|
|
||||||
{ 'default:wood', 'homedecor:drawer_large', 'default:wood' },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = 'fuel',
|
|
||||||
recipe = 'homedecor:dresser_oak',
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
minetest.register_craftitem("homedecor:dresser_mahogany", {
|
|
||||||
description = "Three-Drawer Mahogany Dresser",
|
|
||||||
inventory_image = "homedecor_dresser_mahogany_inv.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = 'shapeless',
|
|
||||||
output = 'homedecor:dresser_mahogany',
|
|
||||||
recipe = {
|
|
||||||
'homedecor:dresser_oak',
|
|
||||||
'unifieddyes:dark_orange',
|
|
||||||
'unifieddyes:dark_orange',
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{'unifieddyes:dark_orange', 'vessels:glass_bottle'},
|
|
||||||
{'unifieddyes:dark_orange', 'vessels:glass_bottle'}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = 'shapeless',
|
|
||||||
output = 'homedecor:dresser_mahogany',
|
|
||||||
recipe = {
|
|
||||||
'homedecor:dresser_oak',
|
|
||||||
'default:dirt',
|
|
||||||
'default:dirt',
|
|
||||||
'default:coal_lump',
|
|
||||||
'default:coal_lump',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = 'fuel',
|
|
||||||
recipe = 'homedecor:dresser_oak',
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- ==========================================================
|
-- ==========================================================
|
||||||
-- Recipes that require materials from Calinou's Moreores mod
|
-- Recipes that require materials from Calinou's Moreores mod
|
||||||
|
|
||||||
@ -875,7 +786,7 @@ minetest.register_craft( {
|
|||||||
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:table_legs_brass 2',
|
output = 'homedecor:table_legs_brass 3',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'homedecor:brass_ingot', '' },
|
{ '', 'homedecor:brass_ingot', '' },
|
||||||
{ '', 'homedecor:brass_ingot', '' },
|
{ '', 'homedecor:brass_ingot', '' },
|
||||||
@ -884,7 +795,7 @@ minetest.register_craft( {
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:pole_brass 2',
|
output = 'homedecor:pole_brass 4',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'homedecor:brass_ingot', '' },
|
{ '', 'homedecor:brass_ingot', '' },
|
||||||
{ '', 'homedecor:brass_ingot', '' },
|
{ '', 'homedecor:brass_ingot', '' },
|
||||||
@ -893,7 +804,7 @@ minetest.register_craft( {
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = 'homedecor:fence_brass 4',
|
output = 'homedecor:fence_brass 6',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' },
|
{ 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' },
|
||||||
{ 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' },
|
{ 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' },
|
||||||
@ -1038,5 +949,154 @@ minetest.register_craft( {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Curtains
|
||||||
|
|
||||||
|
local curtaincolors = {
|
||||||
|
"red",
|
||||||
|
"green",
|
||||||
|
"blue",
|
||||||
|
"white",
|
||||||
|
"pink",
|
||||||
|
"violet"
|
||||||
|
}
|
||||||
|
|
||||||
|
for c in ipairs(curtaincolors) do
|
||||||
|
local color = curtaincolors[c]
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "homedecor:curtain_"..color.." 3",
|
||||||
|
recipe = {
|
||||||
|
{ "wool:"..color, "", ""},
|
||||||
|
{ "wool:"..color, "", ""},
|
||||||
|
{ "wool:"..color, "", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Recycling recipes
|
||||||
|
|
||||||
|
-- Glass object recycle via the glass fragments item/recipe in the Vessels mod.
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "vessels:glass_fragments",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:glass_table_small_round",
|
||||||
|
"homedecor:glass_table_small_round",
|
||||||
|
"homedecor:glass_table_small_round"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "vessels:glass_fragments",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:glass_table_small_square",
|
||||||
|
"homedecor:glass_table_small_square",
|
||||||
|
"homedecor:glass_table_small_square"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "vessels:glass_fragments",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:glass_table_large",
|
||||||
|
"homedecor:glass_table_large",
|
||||||
|
"homedecor:glass_table_large"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Wooden tabletops can turn into sticks
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "default:stick 4",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:wood_table_small_round",
|
||||||
|
"homedecor:wood_table_small_round",
|
||||||
|
"homedecor:wood_table_small_round"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "default:stick 4",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:wood_table_small_square",
|
||||||
|
"homedecor:wood_table_small_square",
|
||||||
|
"homedecor:wood_table_small_square"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "default:stick 4",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:wood_table_large",
|
||||||
|
"homedecor:wood_table_large",
|
||||||
|
"homedecor:wood_table_large"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Kitchen stuff
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:oven",
|
||||||
|
recipe = {
|
||||||
|
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
|
||||||
|
{"default:steel_ingot", "moreblocks:ironglass", "default:steel_ingot", },
|
||||||
|
{"default:steel_ingot", "moreores:copper_ingot", "default:steel_ingot", },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:refrigerator 2",
|
||||||
|
recipe = {
|
||||||
|
{"default:steel_ingot", "moreblocks:glowglass", "default:steel_ingot", },
|
||||||
|
{"default:steel_ingot", "moreores:tin_ingot", "default:steel_ingot", },
|
||||||
|
{"default:steel_ingot", "default:clay", "default:steel_ingot", },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:kitchen_cabinet",
|
||||||
|
recipe = {
|
||||||
|
{"default:wood", "default:stick", "default:wood", },
|
||||||
|
{"default:wood", "default:stick", "default:wood", },
|
||||||
|
{"default:wood", "default:stick", "default:wood", },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "homedecor:kitchen_cabinet_half 2",
|
||||||
|
recipe = { "homedecor:kitchen_cabinet" }
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:kitchen_cabinet_with_sink",
|
||||||
|
recipe = {
|
||||||
|
{"default:wood", "default:steel_ingot", "default:wood", },
|
||||||
|
{"default:wood", "default:steel_ingot", "default:wood", },
|
||||||
|
{"default:wood", "default:stick", "default:wood", },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Lighting
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:glowlight_thick 6",
|
||||||
|
recipe = {
|
||||||
|
{"moreblocks:superglowglass", "moreblocks:superglowglass", "moreblocks:superglowglass", },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:glowlight_thin 6",
|
||||||
|
recipe = {
|
||||||
|
{"homedecor:glowlight_thick", "homedecor:glowlight_thick", "homedecor:glowlight_thick", },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
85
dressers.lua
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
-- This file supplies dressers
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craftitem("homedecor:drawer_large", {
|
||||||
|
description = "Large Wooden Drawer",
|
||||||
|
inventory_image = "homedecor_drawer_large.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = 'homedecor:drawer_large',
|
||||||
|
recipe = {
|
||||||
|
{ 'default:wood', 'default:steel_ingot', 'default:wood' },
|
||||||
|
{ 'default:wood', 'default:wood', 'default:wood' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'fuel',
|
||||||
|
recipe = 'homedecor:drawer_large',
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
minetest.register_craftitem("homedecor:dresser_oak", {
|
||||||
|
description = "Three-Drawer Oak Dresser",
|
||||||
|
inventory_image = "homedecor_dresser_oak_inv.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = 'homedecor:dresser_oak',
|
||||||
|
recipe = {
|
||||||
|
{ 'default:wood', 'homedecor:drawer_large', 'default:wood' },
|
||||||
|
{ 'default:wood', 'homedecor:drawer_large', 'default:wood' },
|
||||||
|
{ 'default:wood', 'homedecor:drawer_large', 'default:wood' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'fuel',
|
||||||
|
recipe = 'homedecor:dresser_oak',
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
minetest.register_craftitem("homedecor:dresser_mahogany", {
|
||||||
|
description = "Three-Drawer Mahogany Dresser",
|
||||||
|
inventory_image = "homedecor_dresser_mahogany_inv.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = 'shapeless',
|
||||||
|
output = 'homedecor:dresser_mahogany',
|
||||||
|
recipe = {
|
||||||
|
'homedecor:dresser_oak',
|
||||||
|
'unifieddyes:dark_orange',
|
||||||
|
'unifieddyes:dark_orange',
|
||||||
|
},
|
||||||
|
replacements = {
|
||||||
|
{'unifieddyes:dark_orange', 'vessels:glass_bottle'},
|
||||||
|
{'unifieddyes:dark_orange', 'vessels:glass_bottle'}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = 'shapeless',
|
||||||
|
output = 'homedecor:dresser_mahogany',
|
||||||
|
recipe = {
|
||||||
|
'homedecor:dresser_oak',
|
||||||
|
'default:dirt',
|
||||||
|
'default:dirt',
|
||||||
|
'default:coal_lump',
|
||||||
|
'default:coal_lump',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'fuel',
|
||||||
|
recipe = 'homedecor:dresser_oak',
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
284
init.lua
@ -1,18 +1,21 @@
|
|||||||
-- Home Decor mod by VanessaE
|
-- Home Decor mod by VanessaE
|
||||||
-- 2012-06-12
|
-- 2012-09-30
|
||||||
--
|
--
|
||||||
-- Mostly my own code, with bits and pieces lifted from Minetest's default
|
-- Mostly my own code, with bits and pieces lifted from Minetest's default
|
||||||
-- lua files, from ironzorg's flowers mod
|
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
||||||
|
-- for helping me figure out the inventories used in the nightstands/dressers.
|
||||||
--
|
--
|
||||||
-- See also, foldingdoors.lua (borrowed heavily from Minetest's default
|
-- The code for ovens, nightstands, refrigerators are basically modified
|
||||||
-- doors mod)
|
-- copies of the code for chests and furnaces.
|
||||||
--
|
--
|
||||||
-- This mod requires the presence of the "unifieddyes" mod, which also
|
-- License: LGPL
|
||||||
-- supplies ironzorg's flowers mod.
|
|
||||||
--
|
|
||||||
-- License: GPL
|
|
||||||
--
|
--
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("homedecor").."/kitchen_cabinet.lua")
|
||||||
|
dofile(minetest.get_modpath("homedecor").."/refrigerator.lua")
|
||||||
|
dofile(minetest.get_modpath("homedecor").."/oven.lua")
|
||||||
|
dofile(minetest.get_modpath("homedecor").."/nightstands.lua")
|
||||||
|
dofile(minetest.get_modpath("homedecor").."/dressers.lua")
|
||||||
dofile(minetest.get_modpath("homedecor").."/television.lua")
|
dofile(minetest.get_modpath("homedecor").."/television.lua")
|
||||||
dofile(minetest.get_modpath("homedecor").."/foldingdoors_oak.lua")
|
dofile(minetest.get_modpath("homedecor").."/foldingdoors_oak.lua")
|
||||||
dofile(minetest.get_modpath("homedecor").."/foldingdoors_mahogany.lua")
|
dofile(minetest.get_modpath("homedecor").."/foldingdoors_mahogany.lua")
|
||||||
@ -290,180 +293,6 @@ minetest.register_node('homedecor:stereo', {
|
|||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node('homedecor:nightstand_oak_one_drawer', {
|
|
||||||
description = "Oak Nightstand with One Drawer",
|
|
||||||
tiles = { 'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_1_drawer_front.png'},
|
|
||||||
sunlight_propagates = false,
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
walkable = true,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
|
||||||
meta:set_string("formspec",
|
|
||||||
"size[8,6]"..
|
|
||||||
"list[current_name;main;0,0;8,1;]"..
|
|
||||||
"list[current_player;main;0,2;8,4;]")
|
|
||||||
meta:set_string("infotext", "One-drawer Nightstand")
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
inv:set_size("main", 8)
|
|
||||||
end,
|
|
||||||
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", player:get_player_name()..
|
|
||||||
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node('homedecor:nightstand_oak_two_drawers', {
|
|
||||||
description = "Oak Nightstand with One Drawer",
|
|
||||||
tiles = { 'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_sides.png',
|
|
||||||
'homedecor_nightstand_oak_2_drawer_front.png'},
|
|
||||||
sunlight_propagates = false,
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
walkable = true,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
|
||||||
meta:set_string("formspec",
|
|
||||||
"size[8,7]"..
|
|
||||||
"list[current_name;main;0,0;8,2;]"..
|
|
||||||
"list[current_player;main;0,3;8,4;]")
|
|
||||||
meta:set_string("infotext", "Two-drawer Nightstand")
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
inv:set_size("main", 16)
|
|
||||||
end,
|
|
||||||
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", player:get_player_name()..
|
|
||||||
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node('homedecor:nightstand_mahogany_one_drawer', {
|
|
||||||
description = "Oak Nightstand with One Drawer",
|
|
||||||
tiles = { 'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_1_drawer_front.png'},
|
|
||||||
sunlight_propagates = false,
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
walkable = true,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
|
||||||
meta:set_string("formspec",
|
|
||||||
"size[8,6]"..
|
|
||||||
"list[current_name;main;0,0;8,1;]"..
|
|
||||||
"list[current_player;main;0,2;8,4;]")
|
|
||||||
meta:set_string("infotext", "One-drawer Nightstand")
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
inv:set_size("main", 8)
|
|
||||||
end,
|
|
||||||
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", player:get_player_name()..
|
|
||||||
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node('homedecor:nightstand_mahogany_two_drawers', {
|
|
||||||
description = "Oak Nightstand with One Drawer",
|
|
||||||
tiles = { 'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_sides.png',
|
|
||||||
'homedecor_nightstand_mahogany_2_drawer_front.png'},
|
|
||||||
sunlight_propagates = false,
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
walkable = true,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
|
||||||
meta:set_string("formspec",
|
|
||||||
"size[8,7]"..
|
|
||||||
"list[current_name;main;0,0;8,2;]"..
|
|
||||||
"list[current_player;main;0,3;8,4;]")
|
|
||||||
meta:set_string("infotext", "Two-drawer Nightstand")
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
inv:set_size("main", 16)
|
|
||||||
end,
|
|
||||||
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", player:get_player_name()..
|
|
||||||
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
||||||
minetest.log("action", player:get_player_name()..
|
|
||||||
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node('homedecor:utility_table_top', {
|
minetest.register_node('homedecor:utility_table_top', {
|
||||||
description = "Utility Table",
|
description = "Utility Table",
|
||||||
tiles = { 'homedecor_utility_table_top.png' },
|
tiles = { 'homedecor_utility_table_top.png' },
|
||||||
@ -941,10 +770,6 @@ minetest.register_node('homedecor:utilitytable2', {
|
|||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- ===================================================
|
|
||||||
-- everything after this line is for testing purposes.
|
|
||||||
-- ===================================================
|
|
||||||
|
|
||||||
-- cylinder-shaped objects courtesy Jeija
|
-- cylinder-shaped objects courtesy Jeija
|
||||||
|
|
||||||
local cylbox = {}
|
local cylbox = {}
|
||||||
@ -1076,4 +901,91 @@ minetest.register_node('homedecor:speaker_small', {
|
|||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:glowlight_thick', {
|
||||||
|
description = "Glowlight (thick)",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = { 'homedecor_glowlight_tb.png',
|
||||||
|
'homedecor_glowlight_tb.png',
|
||||||
|
'homedecor_glowlight_thick_sides.png',
|
||||||
|
'homedecor_glowlight_thick_sides.png',
|
||||||
|
'homedecor_glowlight_thick_sides.png',
|
||||||
|
'homedecor_glowlight_thick_sides.png'},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
light_source = LIGHT_MAX,
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:glowlight_thin', {
|
||||||
|
description = "Glowlight (thin)",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = { 'homedecor_glowlight_tb.png',
|
||||||
|
'homedecor_glowlight_tb.png',
|
||||||
|
'homedecor_glowlight_thin_sides.png',
|
||||||
|
'homedecor_glowlight_thin_sides.png',
|
||||||
|
'homedecor_glowlight_thin_sides.png',
|
||||||
|
'homedecor_glowlight_thin_sides.png'},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
light_source = LIGHT_MAX-1,
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
local curtaincolors = {
|
||||||
|
"red",
|
||||||
|
"green",
|
||||||
|
"blue",
|
||||||
|
"white",
|
||||||
|
"pink",
|
||||||
|
"violet"
|
||||||
|
}
|
||||||
|
|
||||||
|
for c in ipairs(curtaincolors) do
|
||||||
|
local color = curtaincolors[c]
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:curtain_"..color, {
|
||||||
|
description = "Curtains ("..color..")",
|
||||||
|
tiles = { "homedecor_curtain_"..color..".png" },
|
||||||
|
inventory_image = "homedecor_curtain_"..color..".png",
|
||||||
|
wield_image = "homedecor_curtain_"..color..".png",
|
||||||
|
drawtype = 'signlike',
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = false,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
paramtype2 = 'wallmounted',
|
||||||
|
selection_box = {
|
||||||
|
type = "wallmounted",
|
||||||
|
--wall_side = = <default>
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
print("[HomeDecor] Loaded!")
|
print("[HomeDecor] Loaded!")
|
||||||
|
142
kitchen_cabinet.lua
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
-- This file supplies Kitchen cabinets and kitchen sink
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:kitchen_cabinet', {
|
||||||
|
description = "Kitchen Cabinet",
|
||||||
|
tiles = { 'homedecor_kitchen_cabinet_top.png',
|
||||||
|
'homedecor_kitchen_cabinet_bottom.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_front.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,8]"..
|
||||||
|
"list[current_name;main;0,0;8,3;]"..
|
||||||
|
"list[current_player;main;0,4;8,4;]")
|
||||||
|
meta:set_string("infotext", "Kitchen cabinet")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 24)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in kitchen cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to kitchen cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from kitchen cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:kitchen_cabinet_half', {
|
||||||
|
drawtype="nodebox",
|
||||||
|
description = 'Half-height Kitchen Cabinet (on ceiling)',
|
||||||
|
tiles = { 'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_bottom.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_front_half.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,7]"..
|
||||||
|
"list[current_name;main;0,0;6,2;]"..
|
||||||
|
"list[current_player;main;0,3;8,4;]")
|
||||||
|
meta:set_string("infotext", "Kitchen cabinet")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 12)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in kitchen cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to kitchen cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from kitchen cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:kitchen_cabinet_with_sink', {
|
||||||
|
description = "Kitchen Cabinet with sink",
|
||||||
|
tiles = { 'homedecor_kitchen_cabinet_sinktop.png',
|
||||||
|
'homedecor_kitchen_cabinet_bottom.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
'homedecor_kitchen_cabinet_front.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,7]"..
|
||||||
|
"list[current_name;main;0,0;8,2;]"..
|
||||||
|
"list[current_player;main;0,3;8,4;]")
|
||||||
|
meta:set_string("infotext", "Under-sink cabinet")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 16)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in under-sink cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to under-sink cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from under-sink cabinet at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
235
nightstands.lua
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
-- This file supplies nightstands
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:nightstand_oak_one_drawer', {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
description = "Oak Nightstand with One Drawer",
|
||||||
|
tiles = { 'homedecor_nightstand_oak_top.png',
|
||||||
|
'homedecor_nightstand_oak_bottom.png',
|
||||||
|
'homedecor_nightstand_oak_right.png',
|
||||||
|
'homedecor_nightstand_oak_left.png',
|
||||||
|
'homedecor_nightstand_oak_back.png',
|
||||||
|
'homedecor_nightstand_oak_1_drawer_front.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -8/16, 0, -30/64, 8/16, 8/16, 8/16 }, -- top half
|
||||||
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64}, -- drawer face
|
||||||
|
{ -8/16, -8/16, -30/64, -7/16, 0, 8/16 }, -- left
|
||||||
|
{ 7/16, -8/16, -30/64, 8/16, 0, 8/16 }, -- right
|
||||||
|
{ -8/16, -8/16, 7/16, 8/16, 0, 8/16 }, -- back
|
||||||
|
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,6]"..
|
||||||
|
"list[current_name;main;0,0;8,1;]"..
|
||||||
|
"list[current_player;main;0,2;8,4;]")
|
||||||
|
meta:set_string("infotext", "One-drawer Nightstand")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 8)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:nightstand_oak_two_drawers', {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
description = "Oak Nightstand with One Drawer",
|
||||||
|
tiles = { 'homedecor_nightstand_oak_top.png',
|
||||||
|
'homedecor_nightstand_oak_bottom.png',
|
||||||
|
'homedecor_nightstand_oak_right.png',
|
||||||
|
'homedecor_nightstand_oak_left.png',
|
||||||
|
'homedecor_nightstand_oak_back.png',
|
||||||
|
'homedecor_nightstand_oak_2_drawer_front.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -8/16, -8/16, -30/64, 8/16, 8/16, 8/16 }, -- main body
|
||||||
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64 }, -- top drawer face
|
||||||
|
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,7]"..
|
||||||
|
"list[current_name;main;0,0;8,2;]"..
|
||||||
|
"list[current_player;main;0,3;8,4;]")
|
||||||
|
meta:set_string("infotext", "Two-drawer Nightstand")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 16)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:nightstand_mahogany_one_drawer', {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
description = "Mahogany Nightstand with One Drawer",
|
||||||
|
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
||||||
|
'homedecor_nightstand_mahogany_bottom.png',
|
||||||
|
'homedecor_nightstand_mahogany_right.png',
|
||||||
|
'homedecor_nightstand_mahogany_left.png',
|
||||||
|
'homedecor_nightstand_mahogany_back.png',
|
||||||
|
'homedecor_nightstand_mahogany_1_drawer_front.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -8/16, 0, -30/64, 8/16, 8/16, 8/16 }, -- top half
|
||||||
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64}, -- drawer face
|
||||||
|
{ -8/16, -8/16, -30/64, -7/16, 0, 8/16 }, -- left
|
||||||
|
{ 7/16, -8/16, -30/64, 8/16, 0, 8/16 }, -- right
|
||||||
|
{ -8/16, -8/16, 7/16, 8/16, 0, 8/16 }, -- back
|
||||||
|
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,6]"..
|
||||||
|
"list[current_name;main;0,0;8,1;]"..
|
||||||
|
"list[current_player;main;0,2;8,4;]")
|
||||||
|
meta:set_string("infotext", "One-drawer Nightstand")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 8)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:nightstand_mahogany_two_drawers', {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
description = "Mahogany Nightstand with Two Drawers",
|
||||||
|
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
||||||
|
'homedecor_nightstand_mahogany_bottom.png',
|
||||||
|
'homedecor_nightstand_mahogany_right.png',
|
||||||
|
'homedecor_nightstand_mahogany_left.png',
|
||||||
|
'homedecor_nightstand_mahogany_back.png',
|
||||||
|
'homedecor_nightstand_mahogany_2_drawer_front.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -8/16, -8/16, -30/64, 8/16, 8/16, 8/16 }, -- main body
|
||||||
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64 }, -- top drawer face
|
||||||
|
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,7]"..
|
||||||
|
"list[current_name;main;0,0;8,2;]"..
|
||||||
|
"list[current_player;main;0,3;8,4;]")
|
||||||
|
meta:set_string("infotext", "Two-drawer Nightstand")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 16)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
188
oven.lua
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
-- This code supplies an oven/stove. Basically it's just a copy of the default furnace with different textures.
|
||||||
|
|
||||||
|
default.oven_inactive_formspec =
|
||||||
|
"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", {
|
||||||
|
description = "Oven",
|
||||||
|
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,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec", default.oven_inactive_formspec)
|
||||||
|
meta:set_string("infotext", "Oven")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("fuel", 1)
|
||||||
|
inv:set_size("src", 1)
|
||||||
|
inv:set_size("dst", 4)
|
||||||
|
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,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:oven_active", {
|
||||||
|
description = "Oven",
|
||||||
|
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)
|
||||||
|
meta:set_string("formspec", default.oven_inactive_formspec)
|
||||||
|
meta:set_string("infotext", "Oven");
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("fuel", 1)
|
||||||
|
inv:set_size("src", 1)
|
||||||
|
inv:set_size("dst", 4)
|
||||||
|
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,
|
||||||
|
})
|
||||||
|
|
||||||
|
function hacky_swap_node(pos,name)
|
||||||
|
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
|
||||||
|
|
||||||
|
if srclist then
|
||||||
|
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||||
|
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)
|
||||||
|
meta:set_float("src_time", meta:get_float("src_time") + 1)
|
||||||
|
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
|
||||||
|
srcstack = inv:get_stack("src", 1)
|
||||||
|
srcstack:take_item()
|
||||||
|
inv:set_stack("src", 1, srcstack)
|
||||||
|
else
|
||||||
|
print("Could not insert '"..cooked.item:to_string().."'")
|
||||||
|
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)
|
||||||
|
meta:set_string("infotext","Oven active: "..percent.."%")
|
||||||
|
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
|
||||||
|
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
|
||||||
|
fuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
||||||
|
end
|
||||||
|
|
||||||
|
if fuel.time <= 0 then
|
||||||
|
meta:set_string("infotext","Oven out of fuel")
|
||||||
|
hacky_swap_node(pos,"homedecor:oven")
|
||||||
|
meta:set_string("formspec", default.oven_inactive_formspec)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if cooked.item:is_empty() then
|
||||||
|
if was_active then
|
||||||
|
meta:set_string("infotext","Oven is empty")
|
||||||
|
hacky_swap_node(pos,"homedecor:oven")
|
||||||
|
meta:set_string("formspec", default.oven_inactive_formspec)
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
meta:set_string("fuel_totaltime", fuel.time)
|
||||||
|
meta:set_string("fuel_time", 0)
|
||||||
|
|
||||||
|
local stack = inv:get_stack("fuel", 1)
|
||||||
|
stack:take_item()
|
||||||
|
inv:set_stack("fuel", 1, stack)
|
||||||
|
end,
|
||||||
|
})
|
45
refrigerator.lua
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
-- This file supplies refrigerators
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:refrigerator', {
|
||||||
|
description = "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'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[8,8]"..
|
||||||
|
"list[current_name;main;0,0;8,3;]"..
|
||||||
|
"list[current_player;main;0,4;8,4;]")
|
||||||
|
meta:set_string("infotext", "Refrigerator")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 24)
|
||||||
|
end,
|
||||||
|
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", player:get_player_name()..
|
||||||
|
" moves stuff in refrigerator at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" moves stuff to refrigerator at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
minetest.log("action", player:get_player_name()..
|
||||||
|
" takes stuff from refrigerator at "..minetest.pos_to_string(pos))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
BIN
textures/homedecor_curtain_blue.png
Normal file
After Width: | Height: | Size: 411 B |
BIN
textures/homedecor_curtain_green.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
textures/homedecor_curtain_pink.png
Normal file
After Width: | Height: | Size: 626 B |
BIN
textures/homedecor_curtain_red.png
Normal file
After Width: | Height: | Size: 431 B |
BIN
textures/homedecor_curtain_violet.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
textures/homedecor_curtain_white.png
Normal file
After Width: | Height: | Size: 308 B |
BIN
textures/homedecor_glowlight_tb.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
textures/homedecor_glowlight_thick_sides.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
textures/homedecor_glowlight_thin_sides.png
Normal file
After Width: | Height: | Size: 209 B |
BIN
textures/homedecor_kitchen_cabinet_bottom.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
textures/homedecor_kitchen_cabinet_front.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
textures/homedecor_kitchen_cabinet_front_half.png
Normal file
After Width: | Height: | Size: 380 B |
BIN
textures/homedecor_kitchen_cabinet_sides.png
Normal file
After Width: | Height: | Size: 429 B |
BIN
textures/homedecor_kitchen_cabinet_sinktop.png
Normal file
After Width: | Height: | Size: 347 B |
BIN
textures/homedecor_kitchen_cabinet_top.png
Normal file
After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 535 B |
BIN
textures/homedecor_nightstand_mahogany_back.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
textures/homedecor_nightstand_mahogany_bottom.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_nightstand_mahogany_left.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_nightstand_mahogany_right.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_nightstand_mahogany_top.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 632 B |
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 583 B |
BIN
textures/homedecor_nightstand_oak_back.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_nightstand_oak_bottom.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_nightstand_oak_left.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
textures/homedecor_nightstand_oak_right.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
textures/homedecor_nightstand_oak_top.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_oven_bottom.png
Normal file
After Width: | Height: | Size: 584 B |
BIN
textures/homedecor_oven_front.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
textures/homedecor_oven_front_active.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
textures/homedecor_oven_side.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
textures/homedecor_oven_top.png
Normal file
After Width: | Height: | Size: 389 B |
BIN
textures/homedecor_refrigerator_back.png
Normal file
After Width: | Height: | Size: 553 B |
BIN
textures/homedecor_refrigerator_bottom.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
textures/homedecor_refrigerator_front.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
textures/homedecor_refrigerator_left.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
textures/homedecor_refrigerator_right.png
Normal file
After Width: | Height: | Size: 458 B |
BIN
textures/homedecor_refrigerator_top.png
Normal file
After Width: | Height: | Size: 494 B |