1
0
Fork 0

Fix mirrored trapdoor top/bottom texture when open

This commit is contained in:
Wuzzy 2017-12-08 13:07:24 +01:00
parent faafaadc54
commit 681c2950fd
2 changed files with 28 additions and 4 deletions

View File

@ -74,6 +74,18 @@ function mcl_doors:register_trapdoor(name, def)
-- Closed trapdoor
local tile_front = def.tile_front
local tile_side = def.tile_side
if not tile_side then
tile_side = tile_front
end
local tiles_closed = {
tile_front,
tile_front .. "^[transformFY",
tile_side .. "^[transform6", tile_side .. "^[transform6",
tile_side .. "^[transform6", tile_side .. "^[transform6",
}
local groups_closed = groups
groups_closed.trapdoor = 1
minetest.register_node(name, {
@ -81,7 +93,7 @@ function mcl_doors:register_trapdoor(name, def)
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usagehelp,
drawtype = "nodebox",
tiles = def.tiles,
tiles = tiles_closed,
inventory_image = def.inventory_image,
wield_image = def.wield_image,
is_ground_content = false,
@ -134,10 +146,20 @@ function mcl_doors:register_trapdoor(name, def)
-- Open trapdoor
local groups_open = table.copy(groups)
local tiles_open = {
tile_side,
tile_side .. "^[transformR180",
tile_side .. "^[transformR270",
tile_side .. "^[transformR90",
tile_front .. "^[transform46",
tile_front .. "^[transformFY",
}
groups_open.trapdoor = 2
minetest.register_node(name.."_open", {
drawtype = "nodebox",
tiles = def.tiles,
tiles = tiles_open,
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",

View File

@ -217,7 +217,8 @@ for w=1, #woods do
description = woods[w][2],
_doc_items_longdesc = "Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.",
_doc_items_usagehelp = "To open or close the trapdoor, rightclick it or send a redstone signal to it.",
tiles = {woods[w][3]},
tile_front = woods[w][3],
tile_side = woods[w][3],
wield_image = woods[w][3],
groups = {handy=1,axey=1, mesecon_effector_on=1, material_wood=1},
_mcl_hardness = 3,
@ -243,7 +244,8 @@ end
mcl_doors:register_trapdoor("mcl_doors:iron_trapdoor", {
description = "Iron Trapdoor",
_doc_items_longdesc = "Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.",
tiles = {"doors_trapdoor_steel.png"},
tile_front = "doors_trapdoor_steel.png",
tile_side = "doors_trapdoor_steel.png",
wield_image = "doors_trapdoor_steel.png",
groups = {pickaxey=1, mesecon_effector_on=1},
_mcl_hardness = 5,