aggregate foyer themed nodes into dedicated file

This commit is contained in:
Tim 2015-08-16 17:55:48 +02:00
parent 1e7fb18b0b
commit 2ff235d5f1
3 changed files with 63 additions and 63 deletions

61
homedecor/foyer.lua Normal file
View File

@ -0,0 +1,61 @@
local S = homedecor.gettext
homedecor.register("coatrack_wallmount", {
tiles = { homedecor.plain_wood },
inventory_image = "homedecor_coatrack_wallmount_inv.png",
description = "Coatrack (wallmounted)",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.375, 0, 0.4375, 0.375, 0.14, 0.5}, -- NodeBox1
{-0.3025, 0.0475, 0.375, -0.26, 0.09, 0.4375}, -- NodeBox2
{0.26, 0.0475, 0.375, 0.3025, 0.09, 0.4375}, -- NodeBox3
{0.0725, 0.0475, 0.375, 0.115, 0.09, 0.4375}, -- NodeBox4
{-0.115, 0.0475, 0.375, -0.0725, 0.09, 0.4375}, -- NodeBox5
{0.24, 0.025, 0.352697, 0.3225, 0.115, 0.375}, -- NodeBox6
{-0.3225, 0.025, 0.352697, -0.24, 0.115, 0.375}, -- NodeBox7
{-0.135, 0.025, 0.352697, -0.0525, 0.115, 0.375}, -- NodeBox8
{0.0525, 0.025, 0.352697, 0.135, 0.115, 0.375}, -- NodeBox9
}
},
})
homedecor.register("coat_tree", {
mesh = "homedecor_coatrack.obj",
tiles = {
homedecor.plain_wood,
"homedecor_generic_wood_old.png"
},
inventory_image = "homedecor_coatrack_inv.png",
description = "Coat tree",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
expand = { top="air" },
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, 1.5, 0.4 }
},
on_rotate = screwdriver.rotate_simple
})
for _, color in pairs({ "green", "brown", "grey" }) do
homedecor.register("welcome_mat_"..color, {
description = "Welcome Mat ("..color..")",
tiles = {
"homedecor_welcome_mat_"..color..".png",
"homedecor_welcome_mat_bottom.png",
"homedecor_welcome_mat_"..color..".png",
},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.25},
}),
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.375, 0.5, -0.46875, 0.375 }
}
})
end

View File

@ -101,6 +101,8 @@ dofile(modpath.."/shutters.lua")
dofile(modpath.."/shingles.lua")
dofile(modpath.."/slopes.lua")
dofile(modpath.."/foyer.lua")
dofile(modpath.."/doors_and_gates.lua")
dofile(modpath.."/fences.lua")

View File

@ -158,27 +158,6 @@ homedecor.register("pole_wrought_iron", {
sounds = default.node_sound_wood_defaults(),
})
local welcome_mat_colors = { "green", "brown", "grey" }
for _, color in ipairs(welcome_mat_colors) do
homedecor.register("welcome_mat_"..color, {
description = "Welcome Mat ("..color..")",
tiles = {
"homedecor_welcome_mat_"..color..".png",
"homedecor_welcome_mat_bottom.png",
"homedecor_welcome_mat_"..color..".png",
},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.25},
}),
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.375, 0.5, -0.46875, 0.375 }
}
})
end
homedecor.register("chimney", {
description = "Chimney",
mesh = "homedecor_chimney.obj",
@ -313,48 +292,6 @@ homedecor.register("pool_table", {
minetest.register_alias("homedecor:pool_table_2", "air")
homedecor.register("coatrack_wallmount", {
tiles = { homedecor.plain_wood },
inventory_image = "homedecor_coatrack_wallmount_inv.png",
description = "Coatrack (wallmounted)",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.375, 0, 0.4375, 0.375, 0.14, 0.5}, -- NodeBox1
{-0.3025, 0.0475, 0.375, -0.26, 0.09, 0.4375}, -- NodeBox2
{0.26, 0.0475, 0.375, 0.3025, 0.09, 0.4375}, -- NodeBox3
{0.0725, 0.0475, 0.375, 0.115, 0.09, 0.4375}, -- NodeBox4
{-0.115, 0.0475, 0.375, -0.0725, 0.09, 0.4375}, -- NodeBox5
{0.24, 0.025, 0.352697, 0.3225, 0.115, 0.375}, -- NodeBox6
{-0.3225, 0.025, 0.352697, -0.24, 0.115, 0.375}, -- NodeBox7
{-0.135, 0.025, 0.352697, -0.0525, 0.115, 0.375}, -- NodeBox8
{0.0525, 0.025, 0.352697, 0.135, 0.115, 0.375}, -- NodeBox9
}
},
})
homedecor.register("coat_tree", {
mesh = "homedecor_coatrack.obj",
tiles = {
homedecor.plain_wood,
"homedecor_generic_wood_old.png"
},
inventory_image = "homedecor_coatrack_inv.png",
description = "Coat tree",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
expand = { top="air" },
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, 1.5, 0.4 }
},
on_rotate = screwdriver.rotate_simple
})
local piano_cbox = {
type = "fixed",
fixed = { -0.5, -0.5, -0.125, 1.5, 0.5, 0.5 }