forked from mtcontrib/homedecor_modpack
combine chimney, roof shingles and roof slopes into roofing.lua
This commit is contained in:
parent
518d1432f6
commit
7d07e81a8c
@ -98,8 +98,8 @@ dofile(modpath.."/misc-nodes.lua") -- the catch-all for all misc nodes
|
|||||||
dofile(modpath.."/tables.lua")
|
dofile(modpath.."/tables.lua")
|
||||||
dofile(modpath.."/electronics.lua")
|
dofile(modpath.."/electronics.lua")
|
||||||
dofile(modpath.."/shutters.lua")
|
dofile(modpath.."/shutters.lua")
|
||||||
dofile(modpath.."/shingles.lua")
|
|
||||||
dofile(modpath.."/slopes.lua")
|
dofile(modpath.."/roofing.lua")
|
||||||
|
|
||||||
dofile(modpath.."/foyer.lua")
|
dofile(modpath.."/foyer.lua")
|
||||||
|
|
||||||
|
@ -158,18 +158,6 @@ homedecor.register("pole_wrought_iron", {
|
|||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("chimney", {
|
|
||||||
description = "Chimney",
|
|
||||||
mesh = "homedecor_chimney.obj",
|
|
||||||
tiles = {
|
|
||||||
"homedecor_chimney_tb.png",
|
|
||||||
"default_brick.png"
|
|
||||||
},
|
|
||||||
selection_box = homedecor.nodebox.bar_y(0.25),
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_stone_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
local ft_cbox = {
|
local ft_cbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -0.5, -0.5, -0.375, 0.5, 0.3125, 0.375 }
|
fixed = { -0.5, -0.5, -0.375, 0.5, 0.3125, 0.375 }
|
||||||
|
@ -1,5 +1,45 @@
|
|||||||
local S = homedecor.gettext
|
local S = homedecor.gettext
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:skylight", {
|
||||||
|
description = S("Glass Skylight"),
|
||||||
|
drawtype = "raillike",
|
||||||
|
tiles = { "default_glass.png" },
|
||||||
|
wield_image = "default_glass.png",
|
||||||
|
inventory_image = "homedecor_skylight_inv.png",
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
paramtype = "light",
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:skylight_frosted", {
|
||||||
|
description = S("Glass Skylight Frosted"),
|
||||||
|
drawtype = "raillike",
|
||||||
|
tiles = { "homedecor_skylight_frosted.png" },
|
||||||
|
wield_image = "homedecor_skylight_frosted.png",
|
||||||
|
inventory_image = "homedecor_skylight_frosted_inv.png",
|
||||||
|
use_texture_alpha = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
paramtype = "light",
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||||
|
})
|
||||||
|
|
||||||
|
for _, s in pairs({"asphalt", "terracotta", "wood"}) do
|
||||||
|
minetest.register_node("homedecor:shingles_"..s, {
|
||||||
|
description = S("Shingles ("..s..")"),
|
||||||
|
drawtype = "raillike",
|
||||||
|
tiles = { "homedecor_shingles_"..s..".png" },
|
||||||
|
wield_image = "homedecor_shingles_"..s..".png",
|
||||||
|
inventory_image = "homedecor_shingles_"..s.."_inv.png",
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
local slope_cbox = {
|
local slope_cbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -34,7 +74,6 @@ local icorner_cbox = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
homedecor.register_outer_corner = function(modname, subname, groups, slope_image, description)
|
homedecor.register_outer_corner = function(modname, subname, groups, slope_image, description)
|
||||||
|
|
||||||
local tiles = slope_image
|
local tiles = slope_image
|
||||||
|
|
||||||
if type(slope_image) ~= "table" then
|
if type(slope_image) ~= "table" then
|
||||||
@ -57,7 +96,6 @@ homedecor.register_outer_corner = function(modname, subname, groups, slope_image
|
|||||||
end
|
end
|
||||||
|
|
||||||
homedecor.register_inner_corner = function(modname, subname, groups, slope_image, description)
|
homedecor.register_inner_corner = function(modname, subname, groups, slope_image, description)
|
||||||
|
|
||||||
local tiles = slope_image
|
local tiles = slope_image
|
||||||
|
|
||||||
if type(slope_image) ~= "table" then
|
if type(slope_image) ~= "table" then
|
||||||
@ -79,7 +117,6 @@ homedecor.register_inner_corner = function(modname, subname, groups, slope_image
|
|||||||
end
|
end
|
||||||
|
|
||||||
homedecor.register_slope = function(modname, subname, recipeitem, groups, slope_image, description)
|
homedecor.register_slope = function(modname, subname, recipeitem, groups, slope_image, description)
|
||||||
|
|
||||||
local tiles = slope_image
|
local tiles = slope_image
|
||||||
|
|
||||||
if type(slope_image) ~= "table" then
|
if type(slope_image) ~= "table" then
|
||||||
@ -219,25 +256,19 @@ end
|
|||||||
|
|
||||||
-- corners
|
-- corners
|
||||||
|
|
||||||
homedecor.register_roof(
|
homedecor.register_roof("homedecor", "wood",
|
||||||
"homedecor",
|
|
||||||
"wood",
|
|
||||||
{ snappy = 3 },
|
{ snappy = 3 },
|
||||||
{ "homedecor_shingles_wood.png" },
|
{ "homedecor_shingles_wood.png" },
|
||||||
"Wood Shingles"
|
"Wood Shingles"
|
||||||
)
|
)
|
||||||
|
|
||||||
homedecor.register_roof(
|
homedecor.register_roof("homedecor", "asphalt",
|
||||||
"homedecor",
|
|
||||||
"asphalt",
|
|
||||||
{ snappy = 3 },
|
{ snappy = 3 },
|
||||||
{ "homedecor_shingles_asphalt.png" },
|
{ "homedecor_shingles_asphalt.png" },
|
||||||
"Asphalt Shingles"
|
"Asphalt Shingles"
|
||||||
)
|
)
|
||||||
|
|
||||||
homedecor.register_roof(
|
homedecor.register_roof("homedecor", "terracotta",
|
||||||
"homedecor",
|
|
||||||
"terracotta",
|
|
||||||
{ snappy = 3 },
|
{ snappy = 3 },
|
||||||
{ "homedecor_shingles_terracotta.png" },
|
{ "homedecor_shingles_terracotta.png" },
|
||||||
"Terracotta Shingles"
|
"Terracotta Shingles"
|
||||||
@ -245,39 +276,43 @@ homedecor.register_roof(
|
|||||||
|
|
||||||
-- register just the slopes
|
-- register just the slopes
|
||||||
|
|
||||||
homedecor.register_slope(
|
homedecor.register_slope("homedecor", "wood",
|
||||||
"homedecor",
|
|
||||||
"wood",
|
|
||||||
"homedecor:shingles_wood",
|
"homedecor:shingles_wood",
|
||||||
{ snappy = 3 },
|
{ snappy = 3 },
|
||||||
{ "homedecor_shingles_wood.png" },
|
{ "homedecor_shingles_wood.png" },
|
||||||
"Wood Shingles"
|
"Wood Shingles"
|
||||||
)
|
)
|
||||||
|
|
||||||
homedecor.register_slope(
|
homedecor.register_slope("homedecor", "asphalt",
|
||||||
"homedecor",
|
|
||||||
"asphalt",
|
|
||||||
"homedecor:shingles_asphalt",
|
"homedecor:shingles_asphalt",
|
||||||
{ snappy = 3 },
|
{ snappy = 3 },
|
||||||
{ "homedecor_shingles_asphalt.png" },
|
{ "homedecor_shingles_asphalt.png" },
|
||||||
"Asphalt Shingles"
|
"Asphalt Shingles"
|
||||||
)
|
)
|
||||||
|
|
||||||
homedecor.register_slope(
|
homedecor.register_slope("homedecor", "terracotta",
|
||||||
"homedecor",
|
|
||||||
"terracotta",
|
|
||||||
"homedecor:shingles_terracotta",
|
"homedecor:shingles_terracotta",
|
||||||
{ snappy = 3 },
|
{ snappy = 3 },
|
||||||
{ "homedecor_shingles_terracotta.png" },
|
{ "homedecor_shingles_terracotta.png" },
|
||||||
"Terracotta Shingles"
|
"Terracotta Shingles"
|
||||||
)
|
)
|
||||||
|
|
||||||
homedecor.register_slope(
|
homedecor.register_slope("homedecor", "glass",
|
||||||
"homedecor",
|
|
||||||
"glass",
|
|
||||||
"homedecor:shingles_glass",
|
"homedecor:shingles_glass",
|
||||||
{ snappy = 3 },
|
{ snappy = 3 },
|
||||||
{ "homedecor_shingles_glass.png", "homedecor_shingles_wood.png" },
|
{ "homedecor_shingles_glass.png", "homedecor_shingles_wood.png" },
|
||||||
"Glass Shingles"
|
"Glass Shingles"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
homedecor.register("chimney", {
|
||||||
|
description = "Chimney",
|
||||||
|
mesh = "homedecor_chimney.obj",
|
||||||
|
tiles = {
|
||||||
|
"homedecor_chimney_tb.png",
|
||||||
|
"default_brick.png"
|
||||||
|
},
|
||||||
|
selection_box = homedecor.nodebox.bar_y(0.25),
|
||||||
|
groups = {cracky=3},
|
||||||
|
sounds = default.node_sound_stone_defaults()
|
||||||
|
})
|
@ -1,43 +0,0 @@
|
|||||||
local S = homedecor.gettext
|
|
||||||
|
|
||||||
minetest.register_node("homedecor:skylight", {
|
|
||||||
description = S("Glass Skylight"),
|
|
||||||
drawtype = "raillike",
|
|
||||||
tiles = { "default_glass.png" },
|
|
||||||
wield_image = "default_glass.png",
|
|
||||||
inventory_image = "homedecor_skylight_inv.png",
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
paramtype = "light",
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("homedecor:skylight_frosted", {
|
|
||||||
description = S("Glass Skylight Frosted"),
|
|
||||||
drawtype = "raillike",
|
|
||||||
tiles = { "homedecor_skylight_frosted.png" },
|
|
||||||
wield_image = "homedecor_skylight_frosted.png",
|
|
||||||
inventory_image = "homedecor_skylight_frosted_inv.png",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
paramtype = "light",
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
|
||||||
})
|
|
||||||
|
|
||||||
local materials = {"asphalt", "terracotta", "wood"}
|
|
||||||
|
|
||||||
for _, s in ipairs(materials) do
|
|
||||||
minetest.register_node("homedecor:shingles_"..s, {
|
|
||||||
description = S("Shingles ("..s..")"),
|
|
||||||
drawtype = "raillike",
|
|
||||||
tiles = { "homedecor_shingles_"..s..".png" },
|
|
||||||
wield_image = "homedecor_shingles_"..s..".png",
|
|
||||||
inventory_image = "homedecor_shingles_"..s.."_inv.png",
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
|
||||||
})
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user