forked from nalc/homedecor_modpack
Compare commits
1 Commits
master
...
stair_comp
Author | SHA1 | Date | |
---|---|---|---|
2e3a826ced |
@ -8,9 +8,16 @@ if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_alias_force("moreblocks:tar", "building_blocks:Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "tar", "building_blocks", "Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "marble", "building_blocks", "Marble")
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
stairsplus:register_alias_all("moreblocks", "tar", "building_blocks", "Tar")
|
||||
|
||||
if minetest.get_modpath("gloopblocks") then
|
||||
|
@ -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.")
|
||||
|
||||
|
@ -194,7 +194,7 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields)
|
||||
meta:set_string("infotext", fields.title)
|
||||
end
|
||||
minetest.log("action", S("@1 has written in a book (title: \"@2\"): \"@3\" at location @4",
|
||||
player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:get_pos())))
|
||||
player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:getpos())))
|
||||
|
||||
player_current_book[player_name] = nil
|
||||
return true
|
||||
|
@ -47,13 +47,13 @@ local add_mesh_desk_fan_entity = function(pos)
|
||||
local param2 = minetest.get_node(pos).param2
|
||||
local entity = minetest.add_entity(pos, "homedecor:mesh_desk_fan")
|
||||
if param2 == 0 then
|
||||
entity:set_yaw(3.142) -- 180 degrees
|
||||
entity:setyaw(3.142) -- 180 degrees
|
||||
elseif minetest.get_node(pos).param2 == 1 then
|
||||
entity:set_yaw(3.142/2) -- 90 degrees
|
||||
entity:setyaw(3.142/2) -- 90 degrees
|
||||
elseif minetest.get_node(pos).param2 == 3 then
|
||||
entity:set_yaw((-3.142/2)) -- 270 degrees
|
||||
entity:setyaw((-3.142/2)) -- 270 degrees
|
||||
else
|
||||
entity:set_yaw(0)
|
||||
entity:setyaw(0)
|
||||
end
|
||||
return entity
|
||||
end
|
||||
|
@ -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")
|
@ -121,7 +121,7 @@ function lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, seats)
|
||||
|
||||
--seat the player
|
||||
sit_pos.y = sit_pos.y-0.5
|
||||
clicker:set_pos(sit_pos)
|
||||
clicker:setpos(sit_pos)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
@ -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