forked from VoxeLibre/VoxeLibre
parent
5348d13a31
commit
94eb43845c
|
@ -202,22 +202,10 @@ function mcl_doors:register_door(name, def)
|
|||
end,
|
||||
})
|
||||
|
||||
local doortextop = def.tiles_top:match("(.+)%..+$")
|
||||
local doortexbottom = def.tiles_bottom:match("(.+)%..+$")
|
||||
|
||||
local tt = doortextop .. ".png"
|
||||
local tb = doortexbottom .. ".png"
|
||||
local ttt = doortextop .. "_toppart.png" -- Special texture to make the top of opened doors not look weird.
|
||||
local tbb = doortexbottom .. "_bottompart.png" -- Special texture to make the bottom of opened doors not look weird.
|
||||
local tts = doortextop .. "_side.png" -- Special texture to make the side of opened doors not look weird.
|
||||
local tbs = doortexbottom .. "_side.png" -- Special texture to make the side of opened doors not look weird.
|
||||
|
||||
local ttm = tt .. "^[transformFX"
|
||||
local tbm = tb .. "^[transformFX"
|
||||
local tttm = ttt .. "^[transformFX"
|
||||
local tbbm = tbb .. "^[transformFX"
|
||||
local ttsm = tts .. "^[transformFX"
|
||||
local tbsm = tbs .. "^[transformFX"
|
||||
local tt = def.tiles_top
|
||||
local tb = def.tiles_bottom
|
||||
local ttm = def.tiles_top .. "^[transformFX"
|
||||
local tbm = def.tiles_bottom .. "^[transformFX"
|
||||
|
||||
local function on_open_close(pos, dir, check_name, replace, replace_dir)
|
||||
local meta1 = minetest_get_meta(pos)
|
||||
|
@ -305,14 +293,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_b_1", {
|
||||
tiles = {"blank.png", tbb .. "^[transformFY", tbs, tbsm, tbm, tb},
|
||||
mesh = "mcl_doors_door_bottom_closed.obj",
|
||||
tiles = {{name = tb, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_bottom
|
||||
|
@ -377,14 +366,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_t_1", {
|
||||
tiles = {ttt .. "^[transformFY", "blank.png", tts, ttsm, ttm, tt},
|
||||
mesh = "mcl_doors_door_top_closed.obj",
|
||||
tiles = {{name = tt, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_top
|
||||
|
@ -449,14 +439,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_b_2", {
|
||||
tiles = {"blank.png", tbbm, tbs, tbs, tb, tbm},
|
||||
mesh = "mcl_doors_door_bottom_open.obj",
|
||||
tiles = {{name = tb, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
|
@ -520,14 +511,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_t_2", {
|
||||
tiles = {tttm, "blank.png", tts, tts, tt, ttm},
|
||||
mesh = "mcl_doors_door_top_open.obj",
|
||||
tiles = {{name = tt, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
|
@ -589,14 +581,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_b_3", {
|
||||
tiles = {"blank.png", tbm .. "^[transformFY", tbs, tbsm, tb, tbm},
|
||||
mesh = "mcl_doors_door_bottom_closed_mirrored.obj",
|
||||
tiles = {{name = tb, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_bottom
|
||||
|
@ -661,14 +654,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_t_3", {
|
||||
tiles = {ttm .. "^[transformFY", "blank.png", tts, ttsm, tt, ttm},
|
||||
mesh = "mcl_doors_door_top_closed_mirrored.obj",
|
||||
tiles = {{name = tt, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_top
|
||||
|
@ -733,14 +727,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_b_4", {
|
||||
tiles = {"blank.png", tbb, tbsm, tbsm, tbm, tb},
|
||||
mesh = "mcl_doors_door_bottom_open_mirrored.obj",
|
||||
tiles = {{name = tb, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
|
@ -804,14 +799,15 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
|
||||
minetest.register_node(name.."_t_4", {
|
||||
tiles = {ttt, "blank.png", ttsm, ttsm, ttm, tt},
|
||||
mesh = "mcl_doors_door_top_open_mirrored.obj",
|
||||
tiles = {{name = tt, backface_culling = true}},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
|
|
Loading…
Reference in New Issue