forked from mtcontrib/homedecor_modpack
Compare commits
1 Commits
d667e39851
...
stair_comp
Author | SHA1 | Date | |
---|---|---|---|
2e3a826ced |
@ -4,6 +4,3 @@ dofile(modpath.."/alias.lua")
|
||||
dofile(modpath.."/node_stairs.lua")
|
||||
dofile(modpath.."/others.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
|
||||
minetest.log("action", "[building_blocks] loaded.")
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
local S = minetest.get_translator("building_blocks")
|
||||
local stairs_compat
|
||||
|
||||
if minetest.get_modpath("stairs") and not minetest.get_modpath("moreblocks") then
|
||||
stairs_compat = dofile(minetest.get_modpath("building_blocks") .. "/stairs_compat.lua")
|
||||
end
|
||||
|
||||
local function building_blocks_stairs(nodename, def)
|
||||
minetest.register_node(nodename, def)
|
||||
@ -11,6 +16,9 @@ local function building_blocks_stairs(nodename, def)
|
||||
minetest.register_alias("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
|
||||
minetest.register_alias("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
|
||||
end
|
||||
if stairs_compat then
|
||||
stairs_compat(nodename, def)
|
||||
end
|
||||
end
|
||||
|
||||
building_blocks_stairs("building_blocks:grate", {
|
||||
|
54
building_blocks/stairs_compat.lua
Normal file
54
building_blocks/stairs_compat.lua
Normal file
@ -0,0 +1,54 @@
|
||||
local stairtable = {
|
||||
{
|
||||
"slab",
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
{
|
||||
"stair",
|
||||
{
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
|
||||
{-0.5, 0.0, 0.0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stair_inner",
|
||||
{
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
|
||||
{-0.5, 0.0, 0.0, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0.0, -0.5, 0.0, 0.5, 0.0},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stair_outer",
|
||||
{
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
|
||||
{-0.5, 0.0, 0.0, 0.0, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local function register(name, def)
|
||||
for _, sdef in pairs(stairtable) do
|
||||
local split = name:split(":")
|
||||
local ndef = table.copy(def)
|
||||
local item_name = ":" .. sdef[1] .. "_" .. split[2]
|
||||
|
||||
ndef.description = def.description .. " " .. string.gsub(sdef[1], "_", " ")
|
||||
ndef.paramtype, ndef.paramtype2 = "light", "facedir"
|
||||
ndef.drawtype = "nodebox"
|
||||
ndef.node_box = {
|
||||
type = "fixed",
|
||||
fixed = sdef[2],
|
||||
}
|
||||
|
||||
minetest.register_node(split[1] .. item_name, ndef)
|
||||
minetest.register_alias("stairs" .. item_name, split[1] .. item_name)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.log(
|
||||
"action",
|
||||
"[building_blocks]: depreciated legacy support for stairs loaded, please use moreblocks for stair support"
|
||||
)
|
||||
|
||||
return register
|
@ -333,5 +333,3 @@ minetest.register_lbm({
|
||||
fire_particles_on(pos)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.log("action", "[fake_fire] loaded.")
|
||||
|
@ -123,6 +123,3 @@ if minetest.get_modpath("doors") then
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
minetest.log("action", "[homedecor_3d_extra] loaded.")
|
||||
|
||||
|
@ -65,6 +65,6 @@ dofile(modpath.."/water_particles.lua")
|
||||
dofile(modpath.."/sit.lua")
|
||||
dofile(modpath.."/crafts.lua")
|
||||
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
if minetest.settings:get_bool("log_mod") then
|
||||
minetest.log("action", "[HomeDecor API] Loaded!")
|
||||
end
|
||||
|
@ -38,7 +38,7 @@ homedecor.materials = {
|
||||
wool_white = "wool:white",
|
||||
slab_stone = "stairs:slab_stone",
|
||||
slab_wood = "stairs:slab_wood",
|
||||
glass_block = "default:glass",
|
||||
glass_block = "default_glass",
|
||||
glass_bottle = "vessels:glass_bottle",
|
||||
coal_lump = "default:coal_lump",
|
||||
stone = "default:stone",
|
||||
|
@ -121,7 +121,7 @@ function homedecor.register(name, original_def)
|
||||
end
|
||||
|
||||
if cdef.type ~= "toolrepair" and not cdef.output then
|
||||
cdef.output = "homedecor:" .. name
|
||||
cdef.output = ":homedecor:" .. name
|
||||
end
|
||||
|
||||
minetest.register_craft(cdef)
|
||||
|
@ -128,5 +128,3 @@ function inbox.get_inbox_insert_formspec(pos)
|
||||
"listring[]"
|
||||
return formspec
|
||||
end
|
||||
|
||||
minetest.log("action", "[inbox] loaded.")
|
||||
|
@ -241,7 +241,7 @@ for brightness_level = 0, 14 do
|
||||
}
|
||||
overlay = {
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
"",
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
@ -309,7 +309,7 @@ for brightness_level = 0, 14 do
|
||||
}
|
||||
overlay = {
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
"",
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
@ -378,7 +378,7 @@ for brightness_level = 0, 14 do
|
||||
}
|
||||
overlay = {
|
||||
{ name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
|
||||
{ name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
|
||||
"",
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
@ -1905,4 +1905,3 @@ if minetest.get_modpath("darkage") then
|
||||
end
|
||||
end
|
||||
|
||||
minetest.log("action", "[homedecor_lightning] loaded.")
|
||||
|
@ -183,6 +183,4 @@ minetest.register_alias("plasmascreen:screen6", "air")
|
||||
minetest.register_alias("plasmascreen:screen5", "homedecor:tv")
|
||||
minetest.register_alias("plasmascreen:stand", "homedecor:tv_stand")
|
||||
minetest.register_alias("plasmascreen:tv", "homedecor:tv")
|
||||
minetest.register_alias("plasmascreen:tv_off", "homedecor:tv_off")
|
||||
|
||||
minetest.log("action", "[plasmascreen] loaded.")
|
||||
minetest.register_alias("plasmascreen:tv_off", "homedecor:tv_off")
|
@ -129,5 +129,3 @@ dofile(modpath.."/longsofas.lua")
|
||||
dofile(modpath.."/sofas.lua")
|
||||
dofile(modpath.."/armchairs.lua")
|
||||
dofile(modpath.."/misc.lua")
|
||||
|
||||
minetest.log("action", "[homedecor_seating] loaded.")
|
||||
|
@ -332,4 +332,3 @@ if minetest.get_modpath("mesecons_mvps") then
|
||||
mesecon.register_mvps_stopper("itemframes:pedestal")
|
||||
end
|
||||
|
||||
minetest.log("action", "[itemframes] loaded.")
|
||||
|
Reference in New Issue
Block a user