Compare commits

...

76 Commits

Author SHA1 Message Date
FossFanatic 70eb019a58 Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_top_open_mirrored.obj' 2023-03-05 19:07:18 +00:00
FossFanatic 10df1b2b00 Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_top_open.obj' 2023-03-05 19:07:04 +00:00
FossFanatic 6e68ebfbaa Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_top_closed_mirrored.obj' 2023-03-05 19:06:50 +00:00
FossFanatic 0b61c89141 Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_top_closed.obj' 2023-03-05 19:06:36 +00:00
FossFanatic 91496ca207 Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_bottom_open_mirrored.obj' 2023-03-05 19:06:18 +00:00
FossFanatic de7e1f7bbb Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_bottom_open.obj' 2023-03-05 19:06:01 +00:00
FossFanatic 184d2b64da Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_bottom_closed_mirrored.obj' 2023-03-05 19:05:48 +00:00
FossFanatic 25530a707e Delete 'mods/ITEMS/mcl_doors/models/mcl_doors_door_bottom_closed.obj' 2023-03-05 19:05:42 +00:00
FossFanatic d6f5e7bf94 revert 94eb43845c
revert revert b1ba6a91ec

revert Make doors use nodeboxes again
2023-03-05 18:29:07 +00:00
FossFanatic 94eb43845c revert b1ba6a91ec
revert Make doors use nodeboxes again
2023-03-05 18:28:15 +00:00
FossFanatic 5348d13a31 Extra texture batch 10 2023-03-05 18:02:16 +00:00
FossFanatic 9077156300 Extra texture batch 9 2023-03-05 18:01:39 +00:00
FossFanatic 1ec4babe5f Extra texture batch 8 2023-03-05 18:01:21 +00:00
FossFanatic 1862930b85 Extra texture batch 7 2023-03-05 18:00:50 +00:00
FossFanatic 068eeb8394 Extra texture batch 6 2023-03-05 18:00:32 +00:00
FossFanatic c0b61f96e2 Extra texture batch 5 2023-03-05 18:00:11 +00:00
FossFanatic 96fab209aa Extra texture batch 4 2023-03-05 17:59:50 +00:00
FossFanatic 24c9409fe1 Extra texture batch 3 2023-03-05 17:59:31 +00:00
FossFanatic 322d87a29d Extra texture batch 2 2023-03-05 17:59:04 +00:00
FossFanatic f03e52ce45 Extra texture batch 1 2023-03-05 17:58:47 +00:00
FossFanatic b1ba6a91ec Make doors use nodeboxes again 2023-03-05 17:57:06 +00:00
FossFanatic 232cdfc9da Adjust the mirrored door code
Now these doors use their own model instead, which looks much better than the older method of mirroring textures.
2023-03-01 17:40:58 +00:00
FossFanatic e46c299230 Add separate models for mirrored doors
Mirrored doors don't look that great with just a `^[transformFX`, so separate models are needed for these to make them look even better.
2023-03-01 17:40:02 +00:00
FossFanatic 63c82d0e3d Fix _b_3_ eating through the ground
This commit adds an extra thing which I forgot to add, which basically prevents doors from eating the ground if you right click on them weirdly.
2023-03-01 17:05:48 +00:00
FossFanatic a039cffde9 Fix mirrored doors
This commit finally fixes mirrored doors. They should now work properly with redstone.
2023-03-01 16:34:52 +00:00
FossFanatic 57b12e5ae6 Clean up the model code 2023-02-28 11:09:58 +00:00
FossFanatic 8381c944f5 Backface cull the new doors
I have figured out how to finally backface cull the doors, and I can't believe that it was this easy the whole time.
2023-02-28 11:04:47 +00:00
FossFanatic caac4a5e8d Add models for doors 2023-02-28 07:32:47 +00:00
FossFanatic d6abf215a7 Upload files to 'mods/ITEMS/mcl_doors' 2023-02-28 07:28:24 +00:00
FossFanatic 647b9a68f3 Revert bamboo door textures again
I'm going to open a separate pull request in the future to discuss the door.
2023-02-27 16:47:53 +00:00
FossFanatic 3015c15d7f Remove risky cutout
This commit removes the previous cutout which some may have found too risky for use, and replaces it with the old one again.
2023-02-27 16:21:14 +00:00
FossFanatic 6ffff7d57d Improve bamboo door textures
The previous textures didn't fit the MineClone 2 style at all, so I have now changed this.
2023-02-27 13:49:14 +00:00
FossFanatic 476118984b Brighten warped door textures, desaturate warped trapdoor 2023-02-25 08:37:42 +00:00
FossFanatic 8ad366a568 Add original warped door textures as alts 2023-02-24 09:33:13 +00:00
FossFanatic 0d903c3ff1 Change warped door colours 2023-02-24 09:29:54 +00:00
FossFanatic c44fcccc4a Change acacia door colours 2023-02-24 09:29:37 +00:00
FossFanatic 272525edc1 Make iron doors a lighter colour 2023-02-24 09:28:54 +00:00
FossFanatic 962351bdef Replace "derivative" oak door 2023-02-24 09:28:32 +00:00
FossFanatic 17b987199f Replace "derivative" bamboo door 2023-02-24 09:28:13 +00:00
FossFanatic 221a0481db Delete excessive texture 2023-02-23 08:42:33 +00:00
FossFanatic 66f6569082 Batch 7 of new door textures 2023-02-23 08:41:26 +00:00
FossFanatic 8478ee83d2 Batch 6 of new door textures 2023-02-23 08:41:01 +00:00
FossFanatic 9636b23d9a Batch 5 of new door textures 2023-02-23 08:39:59 +00:00
FossFanatic 3e20b9f140 Batch 4 of new door textures 2023-02-23 08:39:42 +00:00
FossFanatic 8193edace7 Batch 3 of new door textures 2023-02-23 08:39:15 +00:00
FossFanatic 74101e648e Batch 2 of new door textures 2023-02-23 08:38:47 +00:00
FossFanatic 8539e0f041 Batch 1 of new door textures 2023-02-23 08:38:26 +00:00
FossFanatic ed4f7a2e2d Delete 'textures/mcl_bamboo_door_top_alt.png' 2023-02-23 08:19:58 +00:00
FossFanatic c4082a3921 Delete 'textures/mcl_bamboo_door_bottom_alt.png' 2023-02-23 08:19:53 +00:00
FossFanatic 4308f0d10c Delete 'textures/mcl_doors_door_wood_side_lower.png' 2023-02-23 08:03:42 +00:00
FossFanatic fb34d0dbd0 Delete 'textures/mcl_doors_door_warped_side_lower_alt.png' 2023-02-23 08:03:33 +00:00
FossFanatic 6bdb4e4142 Delete 'textures/mcl_doors_door_warped_side_lower.png' 2023-02-23 08:03:25 +00:00
FossFanatic b8373bd0fe Delete 'textures/mcl_doors_door_spruce_side_lower.png' 2023-02-23 08:03:16 +00:00
FossFanatic 57b99f7161 Delete 'textures/mcl_doors_door_mangrove_side_lower.png' 2023-02-23 08:03:08 +00:00
FossFanatic 3d7800840a Delete 'textures/mcl_doors_door_jungle_side_lower.png' 2023-02-23 08:02:59 +00:00
FossFanatic 3ce52e03b7 Delete 'textures/mcl_doors_door_iron_side_lower.png' 2023-02-23 08:02:52 +00:00
FossFanatic ea500b2cdf Delete 'textures/mcl_doors_door_dark_oak_side_lower.png' 2023-02-23 08:02:46 +00:00
FossFanatic cf393f966d Delete 'textures/mcl_doors_door_crimson_side_lower.png' 2023-02-23 08:02:38 +00:00
FossFanatic 6482a612fd Delete 'textures/mcl_doors_door_birch_side_lower.png' 2023-02-23 08:02:32 +00:00
FossFanatic 880b1816c8 Delete 'textures/mcl_doors_door_acacia_side_lower.png' 2023-02-23 08:02:25 +00:00
FossFanatic 9e19388732 Delete 'textures/mcl_doors_door_wood_side_upper.png' 2023-02-23 08:01:42 +00:00
FossFanatic d75a616467 Delete 'textures/mcl_doors_door_warped_side_upper_alt.png' 2023-02-23 08:01:33 +00:00
FossFanatic e0170fb16a Delete 'textures/mcl_doors_door_warped_side_upper.png' 2023-02-23 08:01:25 +00:00
FossFanatic f83f68177d Delete 'textures/mcl_doors_door_spruce_side_upper.png' 2023-02-23 08:01:06 +00:00
FossFanatic 8e015af041 Delete 'textures/mcl_doors_door_mangrove_side_upper.png' 2023-02-23 08:00:57 +00:00
FossFanatic 24f4d9e2ad Delete 'textures/mcl_doors_door_jungle_side_upper.png' 2023-02-23 08:00:47 +00:00
FossFanatic c996d324b5 Delete 'textures/mcl_doors_door_iron_side_upper.png' 2023-02-23 08:00:39 +00:00
FossFanatic 4cc370da8b Delete 'textures/mcl_doors_door_dark_oak_side_upper.png' 2023-02-23 08:00:31 +00:00
FossFanatic 7505040d55 Delete 'textures/mcl_doors_door_crimson_side_upper.png' 2023-02-23 08:00:23 +00:00
FossFanatic 53cda320cc Delete 'textures/mcl_doors_door_birch_side_upper.png' 2023-02-23 08:00:13 +00:00
FossFanatic 997f520f33 Delete 'textures/mcl_doors_door_acacia_side_upper.png' 2023-02-23 08:00:02 +00:00
FossFanatic 14b42f58aa Texturing method improvements 2023-02-22 19:42:00 +00:00
FossFanatic 6cd2d80a58 Change bamboo door registration method 2023-02-22 18:05:25 +00:00
FossFanatic cf58bf4d2d Change crimson & warped door registration method 2023-02-22 18:03:43 +00:00
FossFanatic 971ef10467 Change mangrove door registration method 2023-02-22 18:03:12 +00:00
FossFanatic 8378461d92 Change registration method of doors 2023-02-22 18:02:19 +00:00
111 changed files with 359 additions and 61 deletions

View File

@ -4,10 +4,6 @@
--- DateTime: 12/29/22 12:38 PM -- Restructure Date
--- Copyright (C) 2022 - 2023, Michieal. See License.txt
-- CONSTS
-- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false.
local BROKEN_DOORS = true
-- FUTURE USE VARIABLE. MUST REMAIN FALSE UNTIL IT HAS BEEN FULLY IMPLEMENTED. DO NOT ENABLE.
local SIDE_SCAFFOLDING = false
local SIDE_SCAFFOLD_NAME = "mcl_bamboo:scaffolding_horizontal"
@ -49,17 +45,6 @@ end
if minetest.get_modpath("mcl_doors") then
if mcl_doors then
local top_door_tiles = {}
local bot_door_tiles = {}
if BROKEN_DOORS then
top_door_tiles = { "mcl_bamboo_door_top_alt.png", "mcl_bamboo_door_top.png" }
bot_door_tiles = { "mcl_bamboo_door_bottom_alt.png", "mcl_bamboo_door_bottom.png" }
else
top_door_tiles = { "mcl_bamboo_door_top.png", "mcl_bamboo_door_top.png" }
bot_door_tiles = { "mcl_bamboo_door_bottom.png", "mcl_bamboo_door_bottom.png" }
end
local name = "mcl_bamboo:bamboo_door"
local def = {
description = S("Bamboo Door."),
@ -68,8 +53,8 @@ if minetest.get_modpath("mcl_doors") then
groups = { handy = 1, axey = 1, material_wood = 1, flammable = -1 },
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = bot_door_tiles,
tiles_top = top_door_tiles,
tiles_bottom = "mcl_bamboo_door_bottom.png",
tiles_top = "mcl_bamboo_door_top.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
}

View File

@ -666,8 +666,8 @@ mcl_doors:register_door("mcl_crimson:crimson_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_crimson_crimson_door_bottom.png", "mcl_doors_door_crimson_side_lower.png"},
tiles_top = {"mcl_crimson_crimson_door_top.png", "mcl_doors_door_crimson_side_upper.png"},
tiles_bottom = "mcl_crimson_crimson_door_bottom.png",
tiles_top = "mcl_crimson_crimson_door_top.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -704,8 +704,8 @@ mcl_doors:register_door("mcl_crimson:warped_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_crimson_warped_door_bottom.png", "mcl_doors_door_warped_side_lower.png"},
tiles_top = {"mcl_crimson_warped_door_top.png", "mcl_doors_door_warped_side_upper.png"},
tiles_bottom = "mcl_crimson_warped_door_bottom.png",
tiles_top = "mcl_crimson_warped_door_top.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})

View File

@ -159,7 +159,7 @@ function mcl_doors:register_door(name, def)
local door_dir = 1
if left_node.name:sub(1, #name) == name then
mirrored = true
door_dir = 2
door_dir = 3
p2 = left_node.param2
end
@ -202,8 +202,22 @@ function mcl_doors:register_door(name, def)
end,
})
local tt = def.tiles_top
local tb = def.tiles_bottom
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 function on_open_close(pos, dir, check_name, replace, replace_dir)
local meta1 = minetest_get_meta(pos)
@ -242,16 +256,29 @@ function mcl_doors:register_door(name, def)
end
local function on_mesecons_signal_open(pos, node)
local meta2 = minetest_get_meta(pos)
if meta2:get_int("is_mirrored") ~= 1 then
on_open_close(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2")
else
on_open_close(pos, 1, name.."_t_3", name.."_b_4", name.."_t_4")
end
end
local function on_mesecons_signal_close(pos, node)
if not mesecon.is_powered({x=pos.x,y=pos.y+1,z=pos.z}) then
local meta2 = minetest_get_meta(pos)
if meta2:get_int("is_mirrored") ~= 1 then
on_open_close(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1")
else
on_open_close(pos, 1, name.."_t_4", name.."_b_3", name.."_t_3")
end
end
end
local function on_mesecons_signal_open_top(pos, node)
on_mesecons_signal_open({x=pos.x, y=pos.y-1, z=pos.z}, node)
end
local function on_mesecons_signal_close_top(pos, node)
if not mesecon.is_powered({x=pos.x,y=pos.y-1,z=pos.z}) then
on_mesecons_signal_close({x=pos.x, y=pos.y-1, z=pos.z}, node)
@ -278,7 +305,7 @@ function mcl_doors:register_door(name, def)
end
minetest.register_node(name.."_b_1", {
tiles = {"blank.png", tt[2].."^[transformFXR90", tb[2], tb[2].."^[transformFX", tb[1], tb[1].."^[transformFX"},
tiles = {"blank.png", tbb .. "^[transformFY", tbs, tbsm, tbm, tb},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
paramtype = "light",
paramtype2 = "facedir",
@ -350,7 +377,7 @@ function mcl_doors:register_door(name, def)
end
minetest.register_node(name.."_t_1", {
tiles = {tt[2].."^[transformR90", "blank.png", tt[2], tt[2].."^[transformFX", tt[1], tt[1].."^[transformFX"},
tiles = {ttt .. "^[transformFY", "blank.png", tts, ttsm, ttm, tt},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
paramtype = "light",
paramtype2 = "facedir",
@ -422,7 +449,7 @@ function mcl_doors:register_door(name, def)
end
minetest.register_node(name.."_b_2", {
tiles = {"blank.png", tt[2].."^[transformFXR90", tb[2].."^[transformI", tb[2].."^[transformFX", tb[1].."^[transformFX", tb[1]},
tiles = {"blank.png", tbbm, tbs, tbs, tb, tbm},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
paramtype = "light",
paramtype2 = "facedir",
@ -430,6 +457,10 @@ function mcl_doors:register_door(name, def)
is_ground_content = false,
drop = "",
drawtype = "nodebox",
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
node_box = {
type = "fixed",
fixed = def.node_box_bottom
@ -438,11 +469,6 @@ function mcl_doors:register_door(name, def)
type = "fixed",
fixed = def.selection_box_bottom
},
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
after_destruct = function(bottom, oldnode)
local meta_bottom = minetest_get_meta(bottom)
if meta_bottom:get_int("rotation") == 1 then
@ -494,7 +520,7 @@ function mcl_doors:register_door(name, def)
end
minetest.register_node(name.."_t_2", {
tiles = {tt[2].."^[transformR90", "blank.png", tt[2].."^[transformI", tt[2].."^[transformFX", tt[1].."^[transformFX", tt[1]},
tiles = {tttm, "blank.png", tts, tts, tt, ttm},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
paramtype = "light",
paramtype2 = "facedir",
@ -502,6 +528,10 @@ function mcl_doors:register_door(name, def)
is_ground_content = false,
drop = "",
drawtype = "nodebox",
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
node_box = {
type = "fixed",
fixed = def.node_box_top
@ -510,11 +540,6 @@ function mcl_doors:register_door(name, def)
type = "fixed",
fixed = def.selection_box_top
},
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
after_destruct = function(top, oldnode)
local meta_top = minetest_get_meta(top)
if meta_top:get_int("rotation") == 1 then
@ -555,12 +580,300 @@ function mcl_doors:register_door(name, def)
can_dig = check_player_priv,
})
if not def.only_redstone_can_open then
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_open_close(pos, 1, name.."_t_3", name.."_b_4", name.."_t_4")
end
end
end
minetest.register_node(name.."_b_3", {
tiles = {"blank.png", tbm .. "^[transformFY", tbs, tbsm, tb, tbm},
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",
node_box = {
type = "fixed",
fixed = def.node_box_bottom
},
selection_box = {
type = "fixed",
fixed = def.selection_box_bottom
},
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
after_destruct = function(bottom, oldnode)
local meta_bottom = minetest_get_meta(bottom)
if meta_bottom:get_int("rotation") == 1 then
meta_bottom:set_int("rotation", 0)
else
minetest.add_item(bottom, name)
local top = { x = bottom.x, y = bottom.y + 1, z = bottom.z }
if minetest.get_node(bottom).name ~= name.."_b_4" and minetest.get_node(top).name == name.."_t_3" then
minetest.remove_node(top)
end
end
end,
on_rightclick = on_rightclick,
mesecons = { effector = {
action_on = on_mesecons_signal_open,
}},
on_rotate = function(bottom, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
local meta_bottom = minetest_get_meta(bottom)
meta_bottom:set_int("rotation", 1)
node.param2 = screwdriver.rotate.facedir(bottom, node, mode)
minetest.swap_node(bottom, node)
local top = {x=bottom.x,y=bottom.y+1,z=bottom.z}
local meta_top = minetest_get_meta(top)
meta_top:set_int("rotation", 1)
node.name = name .."_t_3"
minetest.swap_node(top, node)
return true
end
return false
end,
can_dig = check_player_priv,
})
if def.only_redstone_can_open then
on_rightclick = nil
else
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_open_close(pos, -1, name.."_b_3", name.."_t_4", name.."_b_4")
end
end
end
minetest.register_node(name.."_t_3", {
tiles = {ttm .. "^[transformFY", "blank.png", tts, ttsm, tt, ttm},
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",
node_box = {
type = "fixed",
fixed = def.node_box_top
},
selection_box = {
type = "fixed",
fixed = def.selection_box_top
},
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
after_destruct = function(top, oldnode)
local meta_top = minetest_get_meta(top)
if meta_top:get_int("rotation") == 1 then
meta_top:set_int("rotation", 0)
else
local bottom = { x = top.x, y = top.y - 1, z = top.z }
if minetest.get_node(top).name ~= name.."_t_4" and minetest.get_node(bottom).name == name.."_b_3" and oldnode.name == name.."_t_3" then
minetest.dig_node(bottom)
end
end
end,
on_rightclick = on_rightclick,
mesecons = { effector = {
action_on = on_mesecons_signal_open_top,
rules = mesecon.rules.flat,
}},
on_rotate = function(top, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
local meta_top = minetest_get_meta(top)
meta_top:set_int("rotation", 1)
node.param2 = screwdriver.rotate.facedir(top, node, mode)
minetest.swap_node(top, node)
local bottom = {x=top.x,y=top.y-1,z=top.z}
local meta_bottom = minetest_get_meta(bottom)
meta_bottom:set_int("rotation", 1)
node.name = name .."_b_3"
minetest.swap_node(bottom, node)
return true
end
return false
end,
can_dig = check_player_priv,
})
if def.only_redstone_can_open then
on_rightclick = nil
else
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_open_close(pos, 1, name.."_t_4", name.."_b_3", name.."_t_3")
end
end
end
minetest.register_node(name.."_b_4", {
tiles = {"blank.png", tbb, tbsm, tbsm, tbm, tb},
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",
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
node_box = {
type = "fixed",
fixed = def.node_box_bottom
},
selection_box = {
type = "fixed",
fixed = def.selection_box_bottom
},
after_destruct = function(bottom, oldnode)
local meta_bottom = minetest_get_meta(bottom)
if meta_bottom:get_int("rotation") == 1 then
meta_bottom:set_int("rotation", 0)
else
local top = { x = bottom.x, y = bottom.y + 1, z = bottom.z }
minetest.add_item(bottom, name)
if minetest.get_node(bottom).name ~= name.."_b_3" and minetest.get_node(top).name == name.."_t_4" then
minetest.remove_node(top)
end
end
end,
on_rightclick = on_rightclick,
mesecons = { effector = {
action_off = on_mesecons_signal_close,
}},
on_rotate = function(bottom, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
local meta_bottom = minetest_get_meta(bottom)
meta_bottom:set_int("rotation", 1)
node.param2 = screwdriver.rotate.facedir(bottom, node, mode)
minetest.swap_node(bottom, node)
local top = {x=bottom.x,y=bottom.y+1,z=bottom.z}
local meta_top = minetest_get_meta(top)
meta_top:set_int("rotation", 1)
node.name = name .."_t_4"
minetest.swap_node(top, node)
return true
end
return false
end,
can_dig = check_player_priv,
})
if def.only_redstone_can_open then
on_rightclick = nil
else
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_open_close(pos, -1, name.."_b_4", name.."_t_3", name.."_b_3")
end
end
end
minetest.register_node(name.."_t_4", {
tiles = {ttt, "blank.png", ttsm, ttsm, ttm, tt},
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",
groups = def.groups,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
node_box = {
type = "fixed",
fixed = def.node_box_top
},
selection_box = {
type = "fixed",
fixed = def.selection_box_top
},
after_destruct = function(top, oldnode)
local meta_top = minetest_get_meta(top)
if meta_top:get_int("rotation") == 1 then
meta_top:set_int("rotation", 0)
else
local bottom = { x = top.x, y = top.y - 1, z = top.z }
if minetest.get_node(top).name ~= name.."_t_3" and minetest.get_node(bottom).name == name.."_b_4" and oldnode.name == name.."_t_4" then
minetest.dig_node(bottom)
end
end
end,
on_rightclick = on_rightclick,
mesecons = { effector = {
action_off = on_mesecons_signal_close_top,
rules = mesecon.rules.flat,
}},
on_rotate = function(top, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
local meta_top = minetest_get_meta(top)
meta_top:set_int("rotation", 1)
node.param2 = screwdriver.rotate.facedir(top, node, mode)
minetest.swap_node(top, node)
local bottom = {x=top.x,y=top.y-1,z=top.z}
local meta_bottom = minetest_get_meta(bottom)
meta_bottom:set_int("rotation", 1)
node.name = name .."_b_4"
minetest.swap_node(bottom, node)
return true
end
return false
end,
can_dig = check_player_priv,
})
-- Add entry aliases for the Help
if minetest.get_modpath("doc") then
doc.add_entry_alias("craftitems", name, "nodes", name.."_b_1")
doc.add_entry_alias("craftitems", name, "nodes", name.."_b_2")
doc.add_entry_alias("craftitems", name, "nodes", name.."_b_3")
doc.add_entry_alias("craftitems", name, "nodes", name.."_b_4")
doc.add_entry_alias("craftitems", name, "nodes", name.."_t_1")
doc.add_entry_alias("craftitems", name, "nodes", name.."_t_2")
doc.add_entry_alias("craftitems", name, "nodes", name.."_t_3")
doc.add_entry_alias("craftitems", name, "nodes", name.."_t_4")
end
end

View File

@ -14,8 +14,8 @@ mcl_doors:register_door("mcl_doors:wooden_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_wood_lower.png", "mcl_doors_door_wood_side_lower.png"},
tiles_top = {"mcl_doors_door_wood_upper.png", "mcl_doors_door_wood_side_upper.png"},
tiles_bottom = "mcl_doors_door_wood_lower.png",
tiles_top = "mcl_doors_door_wood_upper.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -37,8 +37,8 @@ mcl_doors:register_door("mcl_doors:acacia_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_acacia_lower.png", "mcl_doors_door_acacia_side_lower.png"},
tiles_top = {"mcl_doors_door_acacia_upper.png", "mcl_doors_door_acacia_side_upper.png"},
tiles_bottom = "mcl_doors_door_acacia_lower.png",
tiles_top = "mcl_doors_door_acacia_upper.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -60,8 +60,8 @@ mcl_doors:register_door("mcl_doors:birch_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_birch_lower.png", "mcl_doors_door_birch_side_lower.png"},
tiles_top = {"mcl_doors_door_birch_upper.png", "mcl_doors_door_birch_side_upper.png"},
tiles_bottom = "mcl_doors_door_birch_lower.png",
tiles_top = "mcl_doors_door_birch_upper.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -83,8 +83,8 @@ mcl_doors:register_door("mcl_doors:dark_oak_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_dark_oak_lower.png", "mcl_doors_door_dark_oak_side_lower.png"},
tiles_top = {"mcl_doors_door_dark_oak_upper.png", "mcl_doors_door_dark_oak_side_upper.png"},
tiles_bottom = "mcl_doors_door_dark_oak_lower.png",
tiles_top = "mcl_doors_door_dark_oak_upper.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -106,8 +106,8 @@ mcl_doors:register_door("mcl_doors:jungle_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_jungle_lower.png", "mcl_doors_door_jungle_side_lower.png"},
tiles_top = {"mcl_doors_door_jungle_upper.png", "mcl_doors_door_jungle_side_upper.png"},
tiles_bottom = "mcl_doors_door_jungle_lower.png",
tiles_top = "mcl_doors_door_jungle_upper.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -129,8 +129,8 @@ mcl_doors:register_door("mcl_doors:spruce_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_spruce_lower.png", "mcl_doors_door_spruce_side_lower.png"},
tiles_top = {"mcl_doors_door_spruce_upper.png", "mcl_doors_door_spruce_side_upper.png"},
tiles_bottom = "mcl_doors_door_spruce_lower.png",
tiles_top = "mcl_doors_door_spruce_upper.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -183,8 +183,8 @@ mcl_doors:register_door("mcl_doors:iron_door", {
groups = {pickaxey=1, mesecon_effector_on=1},
_mcl_hardness = 5,
_mcl_blast_resistance = 5,
tiles_bottom = {"mcl_doors_door_iron_lower.png^[transformFX", "mcl_doors_door_iron_side_lower.png"},
tiles_top = {"mcl_doors_door_iron_upper.png^[transformFX", "mcl_doors_door_iron_side_upper.png"},
tiles_bottom = "mcl_doors_door_iron_lower.png",
tiles_top = "mcl_doors_door_iron_upper.png",
sounds = mcl_sounds.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",

View File

@ -397,8 +397,8 @@ mcl_doors:register_door("mcl_mangrove:mangrove_door", {
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_mangrove_door_bottom.png", "mcl_doors_door_mangrove_side_lower.png"},
tiles_top = {"mcl_mangrove_door_top.png", "mcl_doors_door_mangrove_side_upper.png"},
tiles_bottom = "mcl_mangrove_door_bottom.png",
tiles_top = "mcl_mangrove_door_top.png",
sounds = mcl_sounds.node_sound_wood_defaults(),
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Some files were not shown because too many files have changed in this diff Show More