Compare commits
16 Commits
2018-11-23
...
2019-05-04
Author | SHA1 | Date | |
---|---|---|---|
32fc5dc49b | |||
854e96d4c0 | |||
6e61cc4ad8 | |||
2ee1cd6887 | |||
0cd8bd7780 | |||
8b78caf7c6 | |||
18d74e2f09 | |||
b94139c9df | |||
bb808a944c | |||
b08c0905c0 | |||
95590f23c5 | |||
554ec8028d | |||
0ab1040760 | |||
52375443ed | |||
ac71c0f189 | |||
04cb59401b |
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
minetest.register_alias("building_blocks:slab_tar", "stairs:slab_Tar")
|
||||
|
@ -1,5 +1,5 @@
|
||||
default
|
||||
homedecor_i18n
|
||||
homedecor_common
|
||||
moreblocks?
|
||||
gloopblocks?
|
||||
stairs?
|
||||
|
@ -1,7 +1,7 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
local modpath = minetest.get_modpath("building_blocks")
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
||||
dofile(modpath.."/node_stairs.lua")
|
||||
dofile(modpath.."/others.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
local stairs_groups_names = {"cracky","choppy","flammable","crumbly","snappy"}
|
||||
|
||||
@ -33,7 +33,7 @@ local function building_blocks_stairs(nodename, def)
|
||||
("%s Slab"):format(def.description),
|
||||
def.sounds
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = S("Small bundle of sticks"),
|
||||
@ -20,4 +20,4 @@ minetest.register_tool("building_blocks:knife", {
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
|
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 450 B |
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
-- Amiga 500 lookalike
|
||||
computer.register("computer:shefriendSOO", {
|
||||
|
@ -1,2 +1,2 @@
|
||||
default
|
||||
homedecor_i18n
|
||||
homedecor_common
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
-- This file defines some items in order to not have to depend on other mods.
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
if (not minetest.get_modpath("homedecor")) then
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
local shapes = {
|
||||
{ { x = {0, 1, 0, 1}, y = {0, 0, 1, 1} } },
|
||||
@ -231,7 +231,7 @@ local function step(pos, fields)
|
||||
local scr = { formsize, background,
|
||||
t.boardstring, t.previewstring,
|
||||
draw_shape(t.cur, t.x, t.y, t.rot, boardx, boardy),
|
||||
"label[3.8,0.1;"..S("Next...").."]label[3.8,2.7;"..S("Score: "),
|
||||
"label[3.8,0.1;"..S("Next...").."]label[3.8,2.7;"..S("Score: "),
|
||||
t.score, close, buttons }
|
||||
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
Most code and all textures by Vanessa Ezekowitz.
|
||||
Most code and textures by Vanessa Ezekowitz.
|
||||
|
||||
Some code copied and modified from the game's default mods (especially
|
||||
doors) and ironzorg's flowers mod.
|
||||
|
||||
Whatever is stated here applies to all homedecor modpack components, as
|
||||
appropriate.
|
||||
|
||||
Licenses:
|
||||
* Door open/close sound by Slanesh on freesound.org
|
||||
http://freesound.org/people/Slanesh/sounds/31768/
|
||||
@ -14,3 +17,4 @@ Licenses:
|
||||
http://www.freesfx.co.uk/sfx/book?p=3
|
||||
* Phone ringing sound by andyt's on http://www.freesfx.co.uk/
|
||||
http://www.freesfx.co.uk/sfx/phone?p=5
|
||||
|
@ -1,2 +1,2 @@
|
||||
default
|
||||
homedecor
|
||||
default
|
||||
homedecor_common
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
screwdriver = screwdriver or {}
|
||||
|
||||
|
@ -1,166 +0,0 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_dark", {
|
||||
description = S("Bathroom/kitchen tiles (dark)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xff606060 },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_medium", {
|
||||
description = S("Bathroom/kitchen tiles (medium)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffc0c0c0 },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_light", {
|
||||
description = S("Bathroom/kitchen tiles (light)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffffffff },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
})
|
||||
|
||||
local tr_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.375, -0.3125, 0.25, 0.375, 0.375, 0.5 }
|
||||
}
|
||||
|
||||
homedecor.register("towel_rod", {
|
||||
description = S("Towel rod with towel"),
|
||||
mesh = "homedecor_towel_rod.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_terrycloth.png",
|
||||
"default_wood.png",
|
||||
},
|
||||
inventory_image = "homedecor_towel_rod_inv.png",
|
||||
selection_box = tr_cbox,
|
||||
walkable = false,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("medicine_cabinet", {
|
||||
description = S("Medicine cabinet"),
|
||||
mesh = "homedecor_medicine_cabinet.obj",
|
||||
tiles = {
|
||||
'default_wood.png',
|
||||
'homedecor_medicine_cabinet_mirror.png'
|
||||
},
|
||||
inventory_image = "homedecor_medicine_cabinet_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
node.name = "homedecor:medicine_cabinet_open"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
infotext=S("Medicine cabinet"),
|
||||
inventory = {
|
||||
size=6,
|
||||
},
|
||||
})
|
||||
|
||||
homedecor.register("medicine_cabinet_open", {
|
||||
mesh = "homedecor_medicine_cabinet_open.obj",
|
||||
tiles = {
|
||||
'default_wood.png',
|
||||
'homedecor_medicine_cabinet_mirror.png',
|
||||
'homedecor_medicine_cabinet_inside.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, -0.25, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
drop = "homedecor:medicine_cabinet",
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
node.name = "homedecor:medicine_cabinet"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
})
|
||||
|
||||
-- convert old static nodes
|
||||
|
||||
homedecor.old_static_bathroom_tiles = {
|
||||
"homedecor:tiles_1",
|
||||
"homedecor:tiles_2",
|
||||
"homedecor:tiles_3",
|
||||
"homedecor:tiles_4",
|
||||
"homedecor:tiles_red",
|
||||
"homedecor:tiles_tan",
|
||||
"homedecor:tiles_yellow",
|
||||
"homedecor:tiles_green",
|
||||
"homedecor:tiles_blue"
|
||||
}
|
||||
|
||||
local old_to_color = {
|
||||
"light_grey",
|
||||
"grey",
|
||||
"black",
|
||||
"black"
|
||||
}
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:convert_bathroom_tiles",
|
||||
label = "Convert bathroom tiles to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_static_bathroom_tiles,
|
||||
action = function(pos, node)
|
||||
local name = node.name
|
||||
local newname = "homedecor:bathroom_tiles_light"
|
||||
local a = string.find(name, "_")
|
||||
local color = string.sub(name, a + 1)
|
||||
|
||||
if color == "tan" then
|
||||
color = "yellow_s50"
|
||||
elseif color == "1" or color == "2" or color == "3" or color == "4" then
|
||||
if color == "4" then
|
||||
newname = "homedecor:bathroom_tiles_medium"
|
||||
end
|
||||
color = old_to_color[tonumber(color)]
|
||||
elseif color ~= "yellow" then
|
||||
color = color.."_s50"
|
||||
end
|
||||
|
||||
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
|
||||
|
||||
minetest.set_node(pos, { name = newname, param2 = paletteidx })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
})
|
3033
homedecor/crafts.lua
@ -1,19 +0,0 @@
|
||||
default
|
||||
basic_materials
|
||||
unifieddyes
|
||||
homedecor_i18n
|
||||
creative
|
||||
currency?
|
||||
building_blocks?
|
||||
signs_lib?
|
||||
moreblocks?
|
||||
technic?
|
||||
dye?
|
||||
bees?
|
||||
bucket?
|
||||
beds?
|
||||
flowers?
|
||||
3d_armor?
|
||||
skinsdb?
|
||||
mesecons?
|
||||
darkage?
|
@ -1,143 +0,0 @@
|
||||
-- Various home electronics
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor.register("speaker", {
|
||||
description = S("Large Stereo Speaker"),
|
||||
mesh="homedecor_speaker_large.obj",
|
||||
tiles = {
|
||||
"homedecor_speaker_sides.png",
|
||||
"homedecor_speaker_front.png"
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:speaker_open", param2 = node.param2})
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("speaker_open", {
|
||||
description = S("Large Stereo Speaker, open front"),
|
||||
mesh="homedecor_speaker_large_open.obj",
|
||||
tiles = {
|
||||
"homedecor_speaker_sides.png",
|
||||
"homedecor_speaker_driver.png",
|
||||
"homedecor_speaker_open_front.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
|
||||
},
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.set_node(pos, {name = "homedecor:speaker", param2 = node.param2})
|
||||
end
|
||||
})
|
||||
|
||||
local spk_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -3/16, -8/16, 1/16, 3/16, -2/16, 7/16 }
|
||||
}
|
||||
|
||||
homedecor.register("speaker_small", {
|
||||
description = S("Small Surround Speaker"),
|
||||
mesh="homedecor_speaker_small.obj",
|
||||
tiles = {
|
||||
"homedecor_speaker_sides.png",
|
||||
"homedecor_speaker_front.png"
|
||||
},
|
||||
selection_box = spk_cbox,
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("stereo", {
|
||||
description = S("Stereo Receiver"),
|
||||
tiles = { 'homedecor_stereo_top.png',
|
||||
'homedecor_stereo_bottom.png',
|
||||
'homedecor_stereo_left.png^[transformFX',
|
||||
'homedecor_stereo_left.png',
|
||||
'homedecor_stereo_back.png',
|
||||
'homedecor_stereo_front.png'},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("projection_screen", {
|
||||
description = S("Projection Screen Material"),
|
||||
drawtype = 'signlike',
|
||||
tiles = { 'homedecor_projection_screen.png' },
|
||||
wield_image = 'homedecor_projection_screen_inv.png',
|
||||
inventory_image = 'homedecor_projection_screen_inv.png',
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
paramtype2 = 'wallmounted',
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_side = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
homedecor.register("television", {
|
||||
description = S("Small CRT Television"),
|
||||
tiles = { 'homedecor_television_top.png',
|
||||
'homedecor_television_bottom.png',
|
||||
'homedecor_television_left.png^[transformFX',
|
||||
'homedecor_television_left.png',
|
||||
'homedecor_television_back.png',
|
||||
{ name="homedecor_television_front_animated.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=80.0
|
||||
}
|
||||
}
|
||||
},
|
||||
light_source = default.LIGHT_MAX - 1,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("dvd_vcr", {
|
||||
description = S("DVD and VCR"),
|
||||
tiles = {
|
||||
"homedecor_dvdvcr_top.png",
|
||||
"homedecor_dvdvcr_bottom.png",
|
||||
"homedecor_dvdvcr_sides.png",
|
||||
"homedecor_dvdvcr_sides.png^[transformFX",
|
||||
"homedecor_dvdvcr_back.png",
|
||||
"homedecor_dvdvcr_front.png",
|
||||
},
|
||||
inventory_image = "homedecor_dvdvcr_inv.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, -0.25, 0.3125, -0.375, 0.1875},
|
||||
{-0.25, -0.5, -0.25, 0.25, -0.1875, 0.125},
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
local tel_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.1875, 0.25, -0.21, 0.15 }
|
||||
}
|
||||
|
||||
homedecor.register("telephone", {
|
||||
mesh = "homedecor_telephone.obj",
|
||||
tiles = {
|
||||
"homedecor_telephone_dial.png",
|
||||
"homedecor_telephone_base.png",
|
||||
"homedecor_telephone_handset.png",
|
||||
"homedecor_telephone_cord.png",
|
||||
},
|
||||
inventory_image = "homedecor_telephone_inv.png",
|
||||
description = S("Telephone"),
|
||||
groups = {snappy=3},
|
||||
selection_box = tel_cbox,
|
||||
walkable = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
@ -1,280 +0,0 @@
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table",
|
||||
recipe = {
|
||||
{ "default:wood","default:wood", "default:wood" },
|
||||
{ "group:stick", "", "group:stick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:table_mahogany",
|
||||
recipe = {
|
||||
"homedecor:table",
|
||||
"dye:brown",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:table_mahogany",
|
||||
recipe = {
|
||||
"homedecor:table",
|
||||
"unifieddyes:dark_orange",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:table_white",
|
||||
recipe = {
|
||||
"homedecor:table",
|
||||
"dye:white",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_mahogany",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_white",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:kitchen_chair_wood 2",
|
||||
recipe = {
|
||||
{ "group:stick",""},
|
||||
{ "group:wood","group:wood" },
|
||||
{ "group:stick","group:stick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:armchair 2",
|
||||
recipe = {
|
||||
{ "wool:white",""},
|
||||
{ "group:wood","group:wood" },
|
||||
{ "wool:white","wool:white" },
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:armchair",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:armchair",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:kitchen_chair_padded",
|
||||
recipe = {
|
||||
"homedecor:kitchen_chair_wood",
|
||||
"wool:white",
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:kitchen_chair_padded",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:kitchen_chair_padded",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:kitchen_chair_wood",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:kitchen_chair_padded",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:armchair",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:standing_lamp_off",
|
||||
recipe = {
|
||||
{"homedecor:table_lamp_off"},
|
||||
{"group:stick"},
|
||||
{"group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:standing_lamp_off",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:standing_lamp_off",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_lamp_off",
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{ "wool:white", "default:torch", "wool:white"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "stairs:slab_wood", "" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{ "cottages:wool", "default:torch", "cottages:wool"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "stairs:slab_wood", "" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{ "wool:white", "default:torch", "wool:white"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "moreblocks:slab_wood", "" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{ "cottages:wool", "default:torch", "cottages:wool"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "moreblocks:slab_wood", "" },
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:toilet",
|
||||
recipe = {
|
||||
{ "","","bucket:bucket_water"},
|
||||
{ "group:marble","group:marble", "group:marble" },
|
||||
{ "", "bucket:bucket_empty", "" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:sink",
|
||||
recipe = {
|
||||
{ "group:marble","bucket:bucket_empty", "group:marble" },
|
||||
{ "", "group:marble", "" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:taps",
|
||||
recipe = {
|
||||
{ "default:steel_ingot","bucket:bucket_water", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:taps_brass",
|
||||
recipe = {
|
||||
{ "technic:brass_ingot","bucket:bucket_water", "technic:brass_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:shower_tray",
|
||||
recipe = {
|
||||
{ "group:marble","bucket:bucket_empty", "group:marble" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:shower_head",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "bucket:bucket_water"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:bathtub_clawfoot_brass_taps",
|
||||
recipe = {
|
||||
{ "homedecor:taps_brass", "", "" },
|
||||
{ "group:marble", "", "group:marble" },
|
||||
{"default:steel_ingot", "group:marble", "default:steel_ingot"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:bathtub_clawfoot_chrome_taps",
|
||||
recipe = {
|
||||
{ "homedecor:taps", "", "" },
|
||||
{ "group:marble", "", "group:marble" },
|
||||
{"default:steel_ingot", "group:marble", "default:steel_ingot"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:bars 6",
|
||||
recipe = {
|
||||
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" },
|
||||
{ "homedecor:pole_wrought_iron","homedecor:pole_wrought_iron","homedecor:pole_wrought_iron" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:L_binding_bars 3",
|
||||
recipe = {
|
||||
{ "homedecor:bars","" },
|
||||
{ "homedecor:bars","homedecor:bars" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:torch_wall 10",
|
||||
recipe = {
|
||||
{ "default:coal_lump" },
|
||||
{ "default:steel_ingot" },
|
||||
},
|
||||
})
|
@ -1,24 +0,0 @@
|
||||
local handlerpath = homedecor.modpath .. "/handlers/"
|
||||
|
||||
-- nodebox arithmetics and helpers
|
||||
-- (please keep non-generic nodeboxes with their node definition)
|
||||
dofile(handlerpath.."nodeboxes.lua")
|
||||
|
||||
-- expand and unexpand decor
|
||||
dofile(handlerpath.."expansion.lua")
|
||||
|
||||
-- register nodes that cook stuff
|
||||
dofile(handlerpath.."furnaces.lua")
|
||||
|
||||
-- inventory related functionality, like initialization, ownership and spawning locked versions
|
||||
dofile(handlerpath.."inventory.lua")
|
||||
|
||||
-- glue it all together into a registration function
|
||||
dofile(handlerpath.."registration.lua")
|
||||
|
||||
-- some nodes have particle spawners
|
||||
dofile(handlerpath.."water_particles.lua")
|
||||
|
||||
|
||||
dofile(handlerpath.."mt_game_beds_functions.lua")
|
||||
dofile(handlerpath.."sit.lua")
|
@ -1,256 +0,0 @@
|
||||
-- This file supplies refrigerators
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
-- steel-textured fridge
|
||||
homedecor.register("refrigerator_steel", {
|
||||
mesh = "homedecor_refrigerator.obj",
|
||||
tiles = { "homedecor_refrigerator_steel.png" },
|
||||
inventory_image = "homedecor_refrigerator_steel_inv.png",
|
||||
description = S("Refrigerator (stainless steel)"),
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
selection_box = homedecor.nodebox.slab_y(2),
|
||||
collision_box = homedecor.nodebox.slab_y(2),
|
||||
expand = { top="placeholder" },
|
||||
infotext=S("Refrigerator"),
|
||||
inventory = {
|
||||
size=50,
|
||||
lockable=true,
|
||||
},
|
||||
on_rotate = screwdriver.rotate_simple
|
||||
})
|
||||
|
||||
-- white, enameled fridge
|
||||
homedecor.register("refrigerator_white", {
|
||||
mesh = "homedecor_refrigerator.obj",
|
||||
tiles = { "homedecor_refrigerator_white.png" },
|
||||
inventory_image = "homedecor_refrigerator_white_inv.png",
|
||||
description = S("Refrigerator"),
|
||||
groups = {snappy=3},
|
||||
selection_box = homedecor.nodebox.slab_y(2),
|
||||
collision_box = homedecor.nodebox.slab_y(2),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
expand = { top="placeholder" },
|
||||
infotext=S("Refrigerator"),
|
||||
inventory = {
|
||||
size=50,
|
||||
lockable=true,
|
||||
},
|
||||
on_rotate = screwdriver.rotate_simple
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_white_bottom", "homedecor:refrigerator_white")
|
||||
minetest.register_alias("homedecor:refrigerator_white_top", "air")
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_steel_bottom", "homedecor:refrigerator_steel")
|
||||
minetest.register_alias("homedecor:refrigerator_steel_top", "air")
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_white_bottom_locked", "homedecor:refrigerator_white_locked")
|
||||
minetest.register_alias("homedecor:refrigerator_white_top_locked", "air")
|
||||
minetest.register_alias("homedecor:refrigerator_locked", "homedecor:refrigerator_white_locked")
|
||||
|
||||
minetest.register_alias("homedecor:refrigerator_steel_bottom_locked", "homedecor:refrigerator_steel_locked")
|
||||
minetest.register_alias("homedecor:refrigerator_steel_top_locked", "air")
|
||||
|
||||
-- kitchen "furnaces"
|
||||
homedecor.register_furnace("oven", {
|
||||
description = S("Oven"),
|
||||
tile_format = "homedecor_oven_%s%s.png",
|
||||
output_slots = 4,
|
||||
output_width = 2,
|
||||
cook_speed = 1.25,
|
||||
})
|
||||
|
||||
homedecor.register_furnace("oven_steel", {
|
||||
description = S("Oven (stainless steel)"),
|
||||
tile_format = "homedecor_oven_steel_%s%s.png",
|
||||
output_slots = 4,
|
||||
output_width = 2,
|
||||
cook_speed = 1.25,
|
||||
})
|
||||
|
||||
homedecor.register_furnace("microwave_oven", {
|
||||
description = S("Microwave Oven"),
|
||||
tiles = {
|
||||
"homedecor_microwave_top.png", "homedecor_microwave_top.png^[transformR180",
|
||||
"homedecor_microwave_top.png^[transformR270", "homedecor_microwave_top.png^[transformR90",
|
||||
"homedecor_microwave_top.png^[transformR180", "homedecor_microwave_front.png"
|
||||
},
|
||||
tiles_active = {
|
||||
"homedecor_microwave_top.png", "homedecor_microwave_top.png^[transformR180",
|
||||
"homedecor_microwave_top.png^[transformR270", "homedecor_microwave_top.png^[transformR90",
|
||||
"homedecor_microwave_top.png^[transformR180", "homedecor_microwave_front_active.png"
|
||||
},
|
||||
output_slots = 2,
|
||||
output_width = 2,
|
||||
cook_speed = 1.5,
|
||||
extra_nodedef_fields = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.125, 0.5, 0.125, 0.5 },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- coffee!
|
||||
-- coffee!
|
||||
-- coffee!
|
||||
|
||||
local cm_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ 0, -8/16, 0, 7/16, 3/16, 8/16 },
|
||||
{ -4/16, -8/16, -6/16, -1/16, -5/16, -3/16 }
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("coffee_maker", {
|
||||
mesh = "homedecor_coffeemaker.obj",
|
||||
tiles = {
|
||||
"homedecor_coffeemaker_decanter.png",
|
||||
"homedecor_coffeemaker_cup.png",
|
||||
"homedecor_coffeemaker_case.png",
|
||||
},
|
||||
description = S("Coffee Maker"),
|
||||
inventory_image = "homedecor_coffeemaker_inv.png",
|
||||
walkable = false,
|
||||
groups = {snappy=3},
|
||||
selection_box = cm_cbox,
|
||||
node_box = cm_cbox,
|
||||
on_rotate = screwdriver.disallow
|
||||
})
|
||||
|
||||
local fdir_to_steampos = {
|
||||
x = { 0.15, 0.275, -0.15, -0.275 },
|
||||
z = { 0.275, -0.15, -0.275, 0.15 }
|
||||
}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = "homedecor:coffee_maker",
|
||||
label = "sfx",
|
||||
interval = 2,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local fdir = node.param2
|
||||
if fdir and fdir < 4 then
|
||||
|
||||
local steamx = fdir_to_steampos.x[fdir + 1]
|
||||
local steamz = fdir_to_steampos.z[fdir + 1]
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 1,
|
||||
time = 1,
|
||||
minpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
maxpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
minvel = {x=-0.003, y=0.01, z=-0.003},
|
||||
maxvel = {x=0.003, y=0.01, z=-0.003},
|
||||
minacc = {x=0.0,y=-0.0,z=-0.0},
|
||||
maxacc = {x=0.0,y=0.003,z=-0.0},
|
||||
minexptime = 2,
|
||||
maxexptime = 5,
|
||||
minsize = 1,
|
||||
maxsize = 1.2,
|
||||
collisiondetection = false,
|
||||
texture = "homedecor_steam.png",
|
||||
})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("toaster", {
|
||||
description = S("Toaster"),
|
||||
tiles = { "homedecor_toaster_sides.png" },
|
||||
inventory_image = "homedecor_toaster_inv.png",
|
||||
walkable = false,
|
||||
groups = { snappy=3 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:toaster_loaf", param2 = fdir })
|
||||
minetest.sound_play("toaster", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("toaster_loaf", {
|
||||
tiles = {
|
||||
"homedecor_toaster_toploaf.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png",
|
||||
"homedecor_toaster_sides.png"
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy=3, not_in_creative_inventory=1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:toaster", param2 = fdir })
|
||||
return itemstack
|
||||
end,
|
||||
drop = "homedecor:toaster"
|
||||
})
|
||||
|
||||
|
||||
homedecor.register("dishwasher", {
|
||||
description = S("Dishwasher"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_dishwasher_top.png",
|
||||
"homedecor_dishwasher_bottom.png",
|
||||
"homedecor_dishwasher_sides.png",
|
||||
"homedecor_dishwasher_sides.png^[transformFX",
|
||||
"homedecor_dishwasher_back.png",
|
||||
"homedecor_dishwasher_front.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.4375},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.1875, 0.1875},
|
||||
{-0.4375, -0.5, -0.5, 0.4375, 0.4375, 0.4375},
|
||||
}
|
||||
},
|
||||
selection_box = { type = "regular" },
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
||||
local materials = { N_("granite"), N_("marble"), N_("steel"), N_("wood") }
|
||||
|
||||
for _, m in ipairs(materials) do
|
||||
homedecor.register("dishwasher_"..m, {
|
||||
description = S("Dishwasher (@1)", S(m)),
|
||||
tiles = {
|
||||
"homedecor_kitchen_cabinet_top_"..m..".png",
|
||||
"homedecor_dishwasher_bottom.png",
|
||||
"homedecor_dishwasher_sides.png",
|
||||
"homedecor_dishwasher_sides.png^[transformFX",
|
||||
"homedecor_dishwasher_back.png",
|
||||
"homedecor_dishwasher_front.png"
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
@ -1,157 +0,0 @@
|
||||
-- This file supplies Kitchen cabinets and kitchen sink
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local cabinet_sides = "(default_wood.png^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
|
||||
local cabinet_bottom = "(default_wood.png^[colorize:#000000:100)^(homedecor_kitchen_cabinet_bevel.png^[colorize:#46321580)"
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
local counter_materials = { "", N_("granite"), N_("marble"), N_("steel") }
|
||||
|
||||
for _, mat in ipairs(counter_materials) do
|
||||
|
||||
local desc = S("Kitchen Cabinet")
|
||||
local material = ""
|
||||
|
||||
if mat ~= "" then
|
||||
desc = S("Kitchen Cabinet (@1 top)", S(mat))
|
||||
material = "_"..mat
|
||||
end
|
||||
|
||||
homedecor.register("kitchen_cabinet"..material, {
|
||||
description = desc,
|
||||
tiles = { 'homedecor_kitchen_cabinet_top'..material..'.png',
|
||||
cabinet_bottom,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
'homedecor_kitchen_cabinet_front.png'},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
infotext=S("Kitchen Cabinet"),
|
||||
inventory = {
|
||||
size=24,
|
||||
lockable=true,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
local kitchen_cabinet_half_box = homedecor.nodebox.slab_y(0.5, 0.5)
|
||||
homedecor.register("kitchen_cabinet_half", {
|
||||
description = S('Half-height Kitchen Cabinet (on ceiling)'),
|
||||
tiles = {
|
||||
cabinet_sides,
|
||||
cabinet_bottom,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
cabinet_sides,
|
||||
'homedecor_kitchen_cabinet_front_half.png'
|
||||
},
|
||||
selection_box = kitchen_cabinet_half_box,
|
||||
node_box = kitchen_cabinet_half_box,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
infotext=S("Kitchen Cabinet"),
|
||||
inventory = {
|
||||
size=12,
|
||||
lockable=true,
|
||||
},
|
||||
})
|
||||
|
||||
homedecor.register("kitchen_cabinet_with_sink", {
|
||||
description = S("Kitchen Cabinet with sink"),
|
||||
mesh = "homedecor_kitchen_sink.obj",
|
||||
tiles = {
|
||||
"homedecor_kitchen_sink_top.png",
|
||||
"homedecor_kitchen_cabinet_front.png",
|
||||
cabinet_sides,
|
||||
cabinet_bottom
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
infotext=S("Under-sink cabinet"),
|
||||
inventory = {
|
||||
size=16,
|
||||
lockable=true,
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, -8/16, 8/16, 6/16, 8/16 },
|
||||
{ -8/16, 6/16, -8/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, 6/16, -8/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, 6/16, -8/16, 8/16, 8/16, -6/16 },
|
||||
{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
}
|
||||
},
|
||||
on_destruct = function(pos)
|
||||
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
end
|
||||
})
|
||||
|
||||
local cp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.375, -0.5, -0.5, 0.375, -0.3125, 0.3125 }
|
||||
}
|
||||
|
||||
homedecor.register("copper_pans", {
|
||||
description = S("Copper pans"),
|
||||
mesh = "homedecor_copper_pans.obj",
|
||||
tiles = { "homedecor_polished_copper.png" },
|
||||
inventory_image = "homedecor_copper_pans_inv.png",
|
||||
groups = { snappy=3 },
|
||||
selection_box = cp_cbox,
|
||||
walkable = false,
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
local kf_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -2/16, -8/16, 1/16, 2/16, -1/16, 8/16 }
|
||||
}
|
||||
|
||||
homedecor.register("kitchen_faucet", {
|
||||
mesh = "homedecor_kitchen_faucet.obj",
|
||||
tiles = { "homedecor_generic_metal_bright.png" },
|
||||
inventory_image = "homedecor_kitchen_faucet_inv.png",
|
||||
description = S("Kitchen Faucet"),
|
||||
groups = {snappy=3},
|
||||
selection_box = kf_cbox,
|
||||
walkable = false,
|
||||
on_rotate = screwdriver.disallow,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
if below and
|
||||
below.name == "homedecor:sink" or
|
||||
below.name == "homedecor:kitchen_cabinet_with_sink" or
|
||||
below.name == "homedecor:kitchen_cabinet_with_sink_locked" then
|
||||
local particledef = {
|
||||
outlet = { x = 0, y = -0.19, z = 0.13 },
|
||||
velocity_x = { min = -0.05, max = 0.05 },
|
||||
velocity_y = -0.3,
|
||||
velocity_z = { min = -0.1, max = 0 },
|
||||
spread = 0
|
||||
}
|
||||
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = homedecor.stop_particle_spawner
|
||||
})
|
||||
|
||||
homedecor.register("paper_towel", {
|
||||
mesh = "homedecor_paper_towel.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_quilted_paper.png",
|
||||
"default_wood.png"
|
||||
},
|
||||
inventory_image = "homedecor_paper_towel_inv.png",
|
||||
description = S("Paper towels"),
|
||||
groups = { snappy=3 },
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.4375, 0.125, 0.0625, 0.4375, 0.4375, 0.5 }
|
||||
},
|
||||
})
|
@ -1,61 +0,0 @@
|
||||
-- laundry devices
|
||||
|
||||
homedecor.register("washing_machine", {
|
||||
description = "Washing Machine",
|
||||
tiles = {
|
||||
"homedecor_washing_machine_top.png",
|
||||
"homedecor_washing_machine_bottom.png",
|
||||
"homedecor_washing_machine_sides.png",
|
||||
"homedecor_washing_machine_sides.png^[transformFX",
|
||||
"homedecor_washing_machine_back.png",
|
||||
"homedecor_washing_machine_front.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.375},
|
||||
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = { type = "regular" },
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
||||
homedecor.register("dryer", {
|
||||
description = "Tumble dryer",
|
||||
tiles = {
|
||||
"homedecor_dryer_top.png",
|
||||
"homedecor_dryer_bottom.png",
|
||||
"homedecor_dryer_sides.png",
|
||||
"homedecor_dryer_sides.png^[transformFX",
|
||||
"homedecor_dryer_back.png",
|
||||
"homedecor_dryer_front.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.375},
|
||||
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = { type = "regular" },
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
||||
local ib_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -6/16, -8/16, -4/16, 17/16, 4/16, 4/16 }
|
||||
}
|
||||
|
||||
homedecor.register("ironing_board", {
|
||||
description = "Ironing board",
|
||||
mesh = "homedecor_ironing_board.obj",
|
||||
tiles = {
|
||||
"wool_grey.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
},
|
||||
expand = {right = "placeholder"},
|
||||
groups = { snappy = 3 },
|
||||
selection_box = ib_cbox,
|
||||
collision_box = ib_cbox
|
||||
})
|
@ -1,101 +0,0 @@
|
||||
-- Various kinds of window shutters
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local shutters = {
|
||||
"mahogany",
|
||||
"red",
|
||||
"yellow",
|
||||
"forest_green",
|
||||
"light_blue",
|
||||
"violet",
|
||||
"black",
|
||||
"dark_grey",
|
||||
"grey",
|
||||
"white",
|
||||
}
|
||||
|
||||
local shutter_cbox = {
|
||||
type = "wallmounted",
|
||||
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 }
|
||||
}
|
||||
|
||||
local inv = "homedecor_window_shutter_inv.png^[colorize:#a87034:150"
|
||||
|
||||
homedecor.register("shutter", {
|
||||
mesh = "homedecor_window_shutter.obj",
|
||||
tiles = {
|
||||
{ name = "homedecor_window_shutter.png", color = 0xffa87034 }
|
||||
},
|
||||
description = S("Wooden Shutter"),
|
||||
inventory_image = inv,
|
||||
wield_image = inv,
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
airbrush_replacement_node = "homedecor:shutter_colored",
|
||||
groups = { snappy = 3, ud_param2_colorable = 1 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = shutter_cbox,
|
||||
node_box = shutter_cbox,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
})
|
||||
|
||||
homedecor.register("shutter_colored", {
|
||||
mesh = "homedecor_window_shutter.obj",
|
||||
tiles = { "homedecor_window_shutter.png" },
|
||||
description = S("Wooden Shutter"),
|
||||
inventory_image = "homedecor_window_shutter_inv.png",
|
||||
wield_image = "homedecor_window_shutter_inv.png",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
groups = { snappy = 3 , not_in_creative_inventory = 1, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = shutter_cbox,
|
||||
node_box = shutter_cbox,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
||||
minetest.register_alias("homedecor:shutter_oak", "homedecor:shutter")
|
||||
|
||||
-- convert to param2 coloring
|
||||
|
||||
homedecor.old_shutter_nodes = {}
|
||||
|
||||
for _, color in ipairs(shutters) do
|
||||
table.insert(homedecor.old_shutter_nodes, "homedecor:shutter_"..color)
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:convert_shutters",
|
||||
label = "Convert shutter static nodes to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_shutter_nodes,
|
||||
action = function(pos, node)
|
||||
local name = node.name
|
||||
local color = string.sub(name, string.find(name, "_") + 1)
|
||||
|
||||
if color == "mahogany" then
|
||||
color = "dark_red"
|
||||
elseif color == "forest_green" then
|
||||
color = "dark_green"
|
||||
elseif color == "light_blue" then
|
||||
color = "medium_cyan"
|
||||
elseif color == "red" then
|
||||
color = "medium_red"
|
||||
end
|
||||
|
||||
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "wallmounted")
|
||||
local param2 = paletteidx + node.param2
|
||||
|
||||
minetest.set_node(pos, { name = "homedecor:shutter_colored", param2 = param2 })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
})
|
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 233 B |
@ -1,145 +0,0 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local wd_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
||||
}
|
||||
|
||||
-- cache set_textures function (fallback to old version)
|
||||
-- default.player_set_textures is deprecated and will be removed in future
|
||||
local set_player_textures =
|
||||
minetest.get_modpath("player_api") and player_api.set_textures
|
||||
or default.player_set_textures
|
||||
|
||||
local armor_mod_path = minetest.get_modpath("3d_armor")
|
||||
|
||||
local skinslist = {"male1", "male2", "male3", "male4", "male5"}
|
||||
local default_skin = "character.png"
|
||||
|
||||
local skinsdb_mod_path = minetest.get_modpath("skinsdb")
|
||||
if skinsdb_mod_path then
|
||||
for _, shrt in ipairs(skinslist) do
|
||||
for _, prefix in ipairs({"", "fe"}) do
|
||||
local skin_name = prefix..shrt
|
||||
local skin_obj = skins.new("homedecor_clothes_"..skin_name..".png") -- Texture PNG file as key to be compatible in set_player_skin
|
||||
skin_obj:set_preview("homedecor_clothes_"..skin_name.."_preview.png")
|
||||
skin_obj:set_texture("homedecor_clothes_"..skin_name..".png")
|
||||
skin_obj:set_meta("name", "Wardrobe "..skin_name)
|
||||
skin_obj:set_meta("author", 'Calinou and Jordach')
|
||||
skin_obj:set_meta("license", 'CC-by-SA-4.0')
|
||||
local file = io.open(homedecor.modpath.."/textures/homedecor_clothes_"..skin_name..".png", "r")
|
||||
skin_obj:set_meta("format", skins.get_skin_format(file))
|
||||
file:close()
|
||||
skin_obj:set_meta("in_inventory_list", false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function homedecor.get_player_skin(player)
|
||||
local skin = player:get_attribute("homedecor:player_skin")
|
||||
if not skin or skin == "" then
|
||||
return default_skin, true
|
||||
end
|
||||
return skin, false
|
||||
end
|
||||
|
||||
function homedecor.set_player_skin(player, skin, save)
|
||||
skin = skin or default_skin
|
||||
if skinsdb_mod_path then
|
||||
skins.set_player_skin(player, skin)
|
||||
elseif armor_mod_path then -- if 3D_armor's installed, let it set the skin
|
||||
armor.textures[player:get_player_name()].skin = skin
|
||||
armor:update_player_visuals(player)
|
||||
else
|
||||
set_player_textures(player, { skin })
|
||||
end
|
||||
|
||||
if save then
|
||||
if skin == default_skin then
|
||||
skin = "default"
|
||||
player:set_attribute("homedecor:player_skin", "")
|
||||
else
|
||||
player:set_attribute("homedecor:player_skin", skin)
|
||||
end
|
||||
if save == "player" then -- if player action
|
||||
minetest.log("verbose",
|
||||
S("player @1 sets skin to @2", player:get_player_name(), skin) ..
|
||||
(armor_mod_path and ' [3d_armor]' or '')
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function homedecor.unset_player_skin(player)
|
||||
homedecor.set_player_skin(player, nil, true)
|
||||
end
|
||||
|
||||
homedecor.register("wardrobe", {
|
||||
mesh = "homedecor_bedroom_wardrobe.obj",
|
||||
tiles = {
|
||||
homedecor.plain_wood,
|
||||
"homedecor_wardrobe_drawers.png",
|
||||
"homedecor_wardrobe_doors.png"
|
||||
},
|
||||
inventory_image = "homedecor_wardrobe_inv.png",
|
||||
description = S("Wardrobe"),
|
||||
groups = {snappy=3},
|
||||
selection_box = wd_cbox,
|
||||
collision_box = wd_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
expand = { top="placeholder" },
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
infotext = S("Wardrobe"),
|
||||
inventory = {
|
||||
size = 10
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
-- textures made by the Minetest community (mostly Calinou and Jordach)
|
||||
local clothes_strings = ""
|
||||
for i = 1,5 do
|
||||
clothes_strings = clothes_strings..
|
||||
"image_button_exit["..(i-1)..".5,0;1.1,2;homedecor_clothes_"..skinslist[i].."_preview.png;"..skinslist[i]..";]"..
|
||||
"image_button_exit["..(i-1)..".5,2;1.1,2;homedecor_clothes_fe"..skinslist[i].."_preview.png;fe"..skinslist[i]..";]"
|
||||
end
|
||||
meta:set_string("formspec", "size[5.5,8.5]"..default.gui_bg..default.gui_bg_img..default.gui_slots..
|
||||
"vertlabel[0,0.5;"..minetest.formspec_escape(S("Clothes")).."]"..
|
||||
"button_exit[0,3.29;0.6,0.6;default;x]"..
|
||||
clothes_strings..
|
||||
"vertlabel[0,5.2;"..minetest.formspec_escape(S("Storage")).."]"..
|
||||
"list[current_name;main;0.5,4.5;5,2;]"..
|
||||
"list[current_player;main;0.5,6.8;5,2;]" ..
|
||||
"listring[]")
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
if fields.default then
|
||||
homedecor.set_player_skin(sender, nil, "player")
|
||||
return
|
||||
end
|
||||
|
||||
for i = 1,5 do
|
||||
if fields[skinslist[i]] then
|
||||
homedecor.set_player_skin(sender, "homedecor_clothes_"..skinslist[i]..".png", "player")
|
||||
break
|
||||
elseif fields["fe"..skinslist[i]] then
|
||||
homedecor.set_player_skin(sender, "homedecor_clothes_fe"..skinslist[i]..".png", "player")
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:wardrobe_bottom", "homedecor:wardrobe")
|
||||
minetest.register_alias("homedecor:wardrobe_top", "air")
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local skin = player:get_attribute("homedecor:player_skin")
|
||||
|
||||
if skin and skin ~= "" then
|
||||
-- setting player skin on connect has no effect, so delay skin change
|
||||
minetest.after(1, function(player, skin)
|
||||
homedecor.set_player_skin(player, skin)
|
||||
end, player, skin)
|
||||
end
|
||||
end)
|
@ -1,3 +1,4 @@
|
||||
homedecor_common
|
||||
default
|
||||
moreblocks?
|
||||
vessels?
|
||||
moreblocks?
|
||||
|
5
homedecor_bathroom/depends.txt
Normal file
@ -0,0 +1,5 @@
|
||||
homedecor_common
|
||||
default
|
||||
basic_materials
|
||||
unifieddyes
|
||||
building_blocks
|
@ -1,5 +1,119 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node(":homedecor:bathroom_tiles_dark", {
|
||||
description = S("Bathroom/kitchen tiles (dark)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xff606060 },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:bathroom_tiles_medium", {
|
||||
description = S("Bathroom/kitchen tiles (medium)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffc0c0c0 },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:bathroom_tiles_light", {
|
||||
description = S("Bathroom/kitchen tiles (light)"),
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_bg.png"
|
||||
},
|
||||
overlay_tiles = {
|
||||
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffffffff },
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
})
|
||||
|
||||
local tr_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.375, -0.3125, 0.25, 0.375, 0.375, 0.5 }
|
||||
}
|
||||
|
||||
homedecor.register("towel_rod", {
|
||||
description = S("Towel rod with towel"),
|
||||
mesh = "homedecor_towel_rod.obj",
|
||||
tiles = {
|
||||
"homedecor_generic_terrycloth.png",
|
||||
"default_wood.png",
|
||||
},
|
||||
inventory_image = "homedecor_towel_rod_inv.png",
|
||||
selection_box = tr_cbox,
|
||||
walkable = false,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
homedecor.register("medicine_cabinet", {
|
||||
description = S("Medicine cabinet"),
|
||||
mesh = "homedecor_medicine_cabinet.obj",
|
||||
tiles = {
|
||||
'default_wood.png',
|
||||
'homedecor_medicine_cabinet_mirror.png'
|
||||
},
|
||||
inventory_image = "homedecor_medicine_cabinet_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
node.name = "homedecor:medicine_cabinet_open"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
infotext=S("Medicine cabinet"),
|
||||
inventory = {
|
||||
size=6,
|
||||
},
|
||||
})
|
||||
|
||||
homedecor.register("medicine_cabinet_open", {
|
||||
mesh = "homedecor_medicine_cabinet_open.obj",
|
||||
tiles = {
|
||||
'default_wood.png',
|
||||
'homedecor_medicine_cabinet_mirror.png',
|
||||
'homedecor_medicine_cabinet_inside.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, -0.25, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
drop = "homedecor:medicine_cabinet",
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
node.name = "homedecor:medicine_cabinet"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
})
|
||||
|
||||
-- "Sanitation" related
|
||||
|
||||
local toilet_sbox = {
|
||||
type = "fixed",
|
||||
@ -18,9 +132,9 @@ homedecor.register("toilet", {
|
||||
description = S("Toilet"),
|
||||
mesh = "homedecor_toilet_closed.obj",
|
||||
tiles = {
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
|
||||
},
|
||||
selection_box = toilet_sbox,
|
||||
@ -36,9 +150,9 @@ homedecor.register("toilet", {
|
||||
homedecor.register("toilet_open", {
|
||||
mesh = "homedecor_toilet_open.obj",
|
||||
tiles = {
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"default_water.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
|
||||
},
|
||||
@ -81,33 +195,35 @@ homedecor.register("toilet_paper", {
|
||||
|
||||
--Sink
|
||||
|
||||
local sink_cbox = {
|
||||
local sink_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -5/16, -8/16, 1/16, 5/16, 8/16, 8/16 }
|
||||
}
|
||||
|
||||
local sink_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 },
|
||||
{ 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 },
|
||||
{ -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 },
|
||||
{ -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 },
|
||||
{ -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 }
|
||||
}
|
||||
}
|
||||
|
||||
homedecor.register("sink", {
|
||||
description = S("Bathroom Sink"),
|
||||
mesh = "homedecor_bathroom_sink.obj",
|
||||
tiles = {
|
||||
"homedecor_marble.png",
|
||||
"homedecor_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"default_water.png"
|
||||
},
|
||||
inventory_image="homedecor_bathroom_sink_inv.png",
|
||||
selection_box = sink_cbox,
|
||||
selection_box = sink_sbox,
|
||||
collision_box = sink_cbox,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 },
|
||||
{ 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 },
|
||||
{ -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 },
|
||||
{ -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 },
|
||||
{ -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 }
|
||||
}
|
||||
},
|
||||
on_destruct = function(pos)
|
||||
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
end
|
||||
@ -127,7 +243,8 @@ local function taps_on_rightclick(pos, node, clicker, itemstack, pointed_thing)
|
||||
velocity_x = { min = -0.1, max = 0.1 },
|
||||
velocity_y = -0.3,
|
||||
velocity_z = { min = -0.1, max = 0 },
|
||||
spread = 0
|
||||
spread = 0,
|
||||
die_on_collision = true,
|
||||
}
|
||||
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet")
|
||||
end
|
||||
@ -186,7 +303,7 @@ homedecor.register("shower_tray", {
|
||||
description = S("Shower Tray"),
|
||||
tiles = {
|
||||
"forniture_marble_base_ducha_top.png",
|
||||
"homedecor_marble.png"
|
||||
"building_blocks_marble.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -255,7 +372,7 @@ homedecor.register("bathtub_clawfoot_brass_taps", {
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_brass.png",
|
||||
"homedecor_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"homedecor_bathtub_clawfoot_bottom_inside.png",
|
||||
},
|
||||
description = S("Bathtub, clawfoot, with brass taps"),
|
||||
@ -275,7 +392,7 @@ homedecor.register("bathtub_clawfoot_chrome_taps", {
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_generic_metal_bright.png",
|
||||
"homedecor_marble.png",
|
||||
"building_blocks_marble.png",
|
||||
"homedecor_bathtub_clawfoot_bottom_inside.png",
|
||||
},
|
||||
description = S("Bathtub, clawfoot, with chrome taps"),
|
||||
@ -310,6 +427,8 @@ homedecor.register("bathroom_set", {
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
-- aliases
|
||||
|
||||
minetest.register_alias("3dforniture:toilet", "homedecor:toilet")
|
||||
minetest.register_alias("3dforniture:toilet_open", "homedecor:toilet_open")
|
||||
minetest.register_alias("3dforniture:sink", "homedecor:sink")
|
||||
@ -324,3 +443,153 @@ minetest.register_alias("taps", "homedecor:taps")
|
||||
minetest.register_alias("shower_tray", "homedecor:shower_tray")
|
||||
minetest.register_alias("shower_head", "homedecor:shower_head")
|
||||
minetest.register_alias("table_lamp", "homedecor:table_lamp_off")
|
||||
|
||||
-- convert old static nodes
|
||||
|
||||
homedecor.old_static_bathroom_tiles = {
|
||||
"homedecor:tiles_1",
|
||||
"homedecor:tiles_2",
|
||||
"homedecor:tiles_3",
|
||||
"homedecor:tiles_4",
|
||||
"homedecor:tiles_red",
|
||||
"homedecor:tiles_tan",
|
||||
"homedecor:tiles_yellow",
|
||||
"homedecor:tiles_green",
|
||||
"homedecor:tiles_blue"
|
||||
}
|
||||
|
||||
local old_to_color = {
|
||||
"light_grey",
|
||||
"grey",
|
||||
"black",
|
||||
"black"
|
||||
}
|
||||
|
||||
minetest.register_lbm({
|
||||
name = ":homedecor:convert_bathroom_tiles",
|
||||
label = "Convert bathroom tiles to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_static_bathroom_tiles,
|
||||
action = function(pos, node)
|
||||
local name = node.name
|
||||
local newname = "homedecor:bathroom_tiles_light"
|
||||
local a = string.find(name, "_")
|
||||
local color = string.sub(name, a + 1)
|
||||
|
||||
if color == "tan" then
|
||||
color = "yellow_s50"
|
||||
elseif color == "1" or color == "2" or color == "3" or color == "4" then
|
||||
if color == "4" then
|
||||
newname = "homedecor:bathroom_tiles_medium"
|
||||
end
|
||||
color = old_to_color[tonumber(color)]
|
||||
elseif color ~= "yellow" then
|
||||
color = color.."_s50"
|
||||
end
|
||||
|
||||
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
|
||||
|
||||
minetest.set_node(pos, { name = newname, param2 = paletteidx })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:towel_rod",
|
||||
recipe = {
|
||||
{ "group:wood", "group:stick", "group:wood" },
|
||||
{ "", "building_blocks:terrycloth_towel", "" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:toilet_paper",
|
||||
recipe = {
|
||||
{ "", "default:paper", "default:paper" },
|
||||
{ "group:wood", "group:stick", "default:paper" },
|
||||
{ "", "default:paper", "default:paper" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:medicine_cabinet",
|
||||
recipe = {
|
||||
{ "group:stick", "default:glass", "group:stick" },
|
||||
{ "group:stick", "default:glass", "group:stick" },
|
||||
{ "group:stick", "default:glass", "group:stick" }
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
-- bathroom/kitchen tiles
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bathroom_tiles_light 4",
|
||||
recipe = {
|
||||
{ "group:marble", "group:marble", "" },
|
||||
{ "group:marble", "group:marble", "dye:white" }
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bathroom_tiles_light",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bathroom_tiles_light",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bathroom_tiles_medium 4",
|
||||
recipe = {
|
||||
{ "group:marble", "group:marble", "" },
|
||||
{ "group:marble", "group:marble", "dye:grey" }
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bathroom_tiles_medium",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bathroom_tiles_medium",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bathroom_tiles_dark 4",
|
||||
recipe = {
|
||||
{ "group:marble", "group:marble", "" },
|
||||
{ "group:marble", "group:marble", "dye:dark_grey" }
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bathroom_tiles_dark",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bathroom_tiles_dark",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:bathroom_set",
|
||||
recipe = {
|
||||
{ "", "homedecor:glass_table_small_round", "" },
|
||||
{ "basic_materials:plastic_sheet", "homedecor:glass_table_small_round", "basic_materials:plastic_sheet" },
|
||||
{ "group:stick", "basic_materials:plastic_sheet", "group:stick" }
|
||||
},
|
||||
})
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 430 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
5
homedecor_bedroom/depends.txt
Normal file
@ -0,0 +1,5 @@
|
||||
homedecor_common
|
||||
default
|
||||
basic_materials
|
||||
unifieddyes
|
||||
creative
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
@ -220,7 +220,7 @@ for _, color in ipairs(bedcolors) do
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:convert_beds",
|
||||
name = ":homedecor:convert_beds",
|
||||
label = "Convert homedecor static bed nodes to use param2 color",
|
||||
run_at_every_load = false,
|
||||
nodenames = homedecor.old_bed_nodes,
|
||||
@ -265,3 +265,126 @@ minetest.register_lbm({
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:nightstand_oak_one_drawer",
|
||||
recipe = {
|
||||
{ "homedecor:drawer_small" },
|
||||
{ "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_oak_one_drawer",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:nightstand_oak_two_drawers",
|
||||
recipe = {
|
||||
{ "homedecor:drawer_small" },
|
||||
{ "homedecor:drawer_small" },
|
||||
{ "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:nightstand_oak_two_drawers",
|
||||
recipe = {
|
||||
{ "homedecor:nightstand_oak_one_drawer" },
|
||||
{ "homedecor:drawer_small" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_oak_two_drawers",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
--
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:nightstand_mahogany_one_drawer",
|
||||
recipe = {
|
||||
"homedecor:nightstand_oak_one_drawer",
|
||||
"dye:brown",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_mahogany_one_drawer",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "homedecor:nightstand_mahogany_two_drawers",
|
||||
recipe = {
|
||||
"homedecor:nightstand_oak_two_drawers",
|
||||
"dye:brown",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:nightstand_mahogany_two_drawers",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
{ "group:stick", "", "group:stick" },
|
||||
{ "wool:white", "wool:white", "wool:white" },
|
||||
{ "group:wood", "", "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_regular",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bed_kingsize",
|
||||
recipe = {
|
||||
{ "homedecor:bed_regular", "homedecor:bed_regular" }
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_kingsize",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_kingsize",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_kingsize",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 892 B After Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 709 B After Width: | Height: | Size: 709 B |
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 949 B After Width: | Height: | Size: 949 B |
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 742 B |
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 714 B |
5
homedecor_books/depends.txt
Normal file
@ -0,0 +1,5 @@
|
||||
homedecor_common
|
||||
default
|
||||
unifieddyes
|
||||
creative
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
@ -183,5 +183,30 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields)
|
||||
return true
|
||||
end)
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
local bookcolors = {
|
||||
"red",
|
||||
"green",
|
||||
"blue",
|
||||
"violet",
|
||||
"grey",
|
||||
"brown"
|
||||
}
|
||||
|
||||
for _, color in ipairs(bookcolors) do
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:book_"..color,
|
||||
recipe = {
|
||||
"dye:"..color,
|
||||
"default:book"
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- aliases
|
||||
|
||||
minetest.register_alias("homedecor:book", "homedecor:book_grey")
|
||||
minetest.register_alias("homedecor:book_open", "homedecor:book_open_grey")
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 780 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
4
homedecor_climate_control/depends.txt
Normal file
@ -0,0 +1,4 @@
|
||||
homedecor_common
|
||||
default
|
||||
basic_materials
|
||||
building_blocks?
|
@ -1,6 +1,6 @@
|
||||
-- Nodes that would affect the local temperature e.g. fans, heater, A/C
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
homedecor.register("air_conditioner", {
|
||||
description = S("Air Conditioner"),
|
||||
@ -16,7 +16,7 @@ homedecor.register("air_conditioner", {
|
||||
|
||||
-- fans
|
||||
|
||||
minetest.register_entity("homedecor:mesh_desk_fan", {
|
||||
minetest.register_entity(":homedecor:mesh_desk_fan", {
|
||||
collisionbox = homedecor.nodebox.null,
|
||||
visual = "mesh",
|
||||
mesh = "homedecor_desk_fan.b3d",
|
||||
@ -141,3 +141,69 @@ homedecor.register("radiator", {
|
||||
collision_box = r_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:air_conditioner",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor" },
|
||||
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:air_conditioner",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:ceiling_fan",
|
||||
recipe = {
|
||||
{ "basic_materials:motor" },
|
||||
{ "homedecor:fan_blades" },
|
||||
{ "homedecor:glowlight_small_cube" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:ceiling_fan",
|
||||
recipe = {
|
||||
{ "basic_materials:motor" },
|
||||
{ "homedecor:fan_blades" },
|
||||
{ "homedecor:glowlight_small_cube" }
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:desk_fan",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor"},
|
||||
{"", "default:steel_ingot", ""}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:space_heater",
|
||||
recipe = {
|
||||
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"},
|
||||
{"basic_materials:plastic_sheet", "homedecor:fan_blades", "basic_materials:motor"},
|
||||
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:radiator",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" },
|
||||
{ "basic_materials:ic", "basic_materials:heating_element", "" },
|
||||
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
|
||||
},
|
||||
})
|