Added straight and spiral stairs with and without ledges

This commit is contained in:
Andrey2470T 2023-10-21 22:13:49 +03:00
parent bacb21b74f
commit bae58f81eb
15 changed files with 97 additions and 1 deletions

View File

@ -10,5 +10,6 @@ dofile(modpath .. "/lamps.lua")
dofile(modpath .. "/living_room.lua")
dofile(modpath .. "/paintings.lua")
dofile(modpath .. "/shelves.lua")
dofile(modpath .. "/stairs.lua")
dofile(modpath .. "/tables.lua")
dofile(modpath .. "/wardrobes.lua")

View File

@ -1,5 +1,5 @@
name = modern
description = Modern-style furniture
depends = beds, decor_api, flowers
depends = beds, decor_api, flowers, stairs
optional_depends = moreores, technic_worldgen
author = Andrey01

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

95
modern/stairs.lua Normal file
View File

@ -0,0 +1,95 @@
local stairs_data = {
{name="stone", tex="multidecor_stone_material.png"},
{name="marble", tex="multidecor_marble_material.png"},
{name="granite", tex="multidecor_granite_material.png"}
}
local stair_bboxes = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0.25, -0.25, 0.5, 0.5},
{-0.25, 0, 0, 0, 0.5, 0.5},
{0, 0, -0.25, 0.25, 0.5, 0.5},
{0.25, 0, -0.5, 0.5, 0.5, 0.5}
}
for _, stair in ipairs(stairs_data) do
local upper_name = multidecor.helpers.upper_first_letters(stair.name)
stairs.register_stair_and_slab(
stair.name,
"multidecor:" .. stair.name .. "_block",
{cracky=3},
{stair.tex .. "^[sheet:2x2:0,0"},
upper_name .. " Stair",
upper_name .. " Slab",
default.node_sound_stone_defaults(),
true
)
multidecor.register.register_furniture_unit(stair.name .. "_ledged_stair_segment", {
type = "decoration",
style = "modern",
material = "stone",
visual_scale = 0.5,
description = upper_name .. " Ledged Stair Segment",
mesh = "multidecor_ledged_stair_segment.b3d",
tiles = {stair.tex},
bounding_boxes = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5}
}
})
multidecor.register.register_furniture_unit("spiral_" .. stair.name .. "_stair_base", {
type = "decoration",
style = "modern",
material = "stone",
visual_scale = 0.5,
description = "Spiral " .. upper_name .. " Stair Base",
mesh = "multidecor_spiral_stair_base.b3d",
tiles = {stair.tex},
bounding_boxes = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}}
})
multidecor.register.register_furniture_unit("spiral_" .. stair.name .. "_stair_segment", {
type = "decoration",
style = "modern",
material = "stone",
visual_scale = 0.5,
description = "Spiral " .. upper_name .. " Stair Segment",
mesh = "multidecor_spiral_stair_segment.b3d",
tiles = {stair.tex},
bounding_boxes = stair_bboxes
})
multidecor.register.register_furniture_unit("spiral_" .. stair.name .. "_ledged_stair_segment", {
type = "decoration",
style = "modern",
material = "stone",
visual_scale = 0.5,
description = "Spiral " .. upper_name .. " Ledged Stair Segment",
mesh = "multidecor_spiral_ledged_stair_segment.b3d",
tiles = {stair.tex},
bounding_boxes = stair_bboxes
})
end
minetest.register_node(":multidecor:marble_block", {
description = "Marble Block",
paramtype = "light",
paramtype2 = "none",
sunlight_propagates = true,
tiles = {"multidecor_marble_material.png^[sheet:2x2:0,0"},
groups = {cracky=2.5},
sounds = default.node_sound_stone_defaults()
})
minetest.register_node(":multidecor:granite_block", {
description = "Granite Block",
paramtype = "light",
paramtype2 = "none",
sunlight_propagates = true,
tiles = {"multidecor_granite_material.png^[sheet:2x2:0,0"},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults()
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B