mirror of
https://github.com/minetest/minetest.git
synced 2025-07-01 15:40:23 +02:00
Add support for attached facedir/4dir nodes (#11432)
This commit is contained in:
@ -57,7 +57,6 @@ minetest.register_node("testnodes:attached", {
|
||||
},
|
||||
groups = { attached_node = 1, dig_immediate = 3 },
|
||||
})
|
||||
|
||||
-- This node attaches to the side of a node and drops as item
|
||||
-- when the node it attaches to is gone.
|
||||
minetest.register_node("testnodes:attached_wallmounted", {
|
||||
@ -73,6 +72,61 @@ minetest.register_node("testnodes:attached_wallmounted", {
|
||||
groups = { attached_node = 1, dig_immediate = 3 },
|
||||
})
|
||||
|
||||
-- Wallmounted node that always attaches to the floor
|
||||
minetest.register_node("testnodes:attached_wallmounted_floor", {
|
||||
description = S("Floor-Attached Wallmounted Node"),
|
||||
paramtype2 = "wallmounted",
|
||||
tiles = {
|
||||
"testnodes_attached_top.png",
|
||||
"testnodes_attached_bottom.png",
|
||||
"testnodes_attached_side.png",
|
||||
},
|
||||
groups = { attached_node = 3, dig_immediate = 3 },
|
||||
color = "#FF8080",
|
||||
})
|
||||
|
||||
-- This node attaches to the ceiling and drops as item
|
||||
-- when the ceiling is gone.
|
||||
minetest.register_node("testnodes:attached_top", {
|
||||
description = S("Ceiling-Attached Node"),
|
||||
tiles = {
|
||||
"testnodes_attached_bottom.png",
|
||||
"testnodes_attached_top.png",
|
||||
"testnodes_attached_side.png^[transformR180",
|
||||
},
|
||||
groups = { attached_node = 4, dig_immediate = 3 },
|
||||
})
|
||||
|
||||
-- Same as wallmounted attached, but for facedir
|
||||
minetest.register_node("testnodes:attached_facedir", {
|
||||
description = S("Facedir Attached Node"),
|
||||
paramtype2 = "facedir",
|
||||
tiles = {
|
||||
"testnodes_attachedf_side.png^[transformR180",
|
||||
"testnodes_attachedf_side.png",
|
||||
"testnodes_attachedf_side.png^[transformR90",
|
||||
"testnodes_attachedf_side.png^[transformR270",
|
||||
"testnodes_attachedf_bottom.png",
|
||||
"testnodes_attachedf_top.png",
|
||||
},
|
||||
groups = { attached_node = 2, dig_immediate = 3 },
|
||||
})
|
||||
|
||||
-- Same as facedir attached, but for 4dir
|
||||
minetest.register_node("testnodes:attached_4dir", {
|
||||
description = S("4dir Attached Node"),
|
||||
paramtype2 = "4dir",
|
||||
tiles = {
|
||||
"testnodes_attached4_side.png^[transformR180",
|
||||
"testnodes_attached4_side.png",
|
||||
"testnodes_attached4_side.png^[transformR90",
|
||||
"testnodes_attached4_side.png^[transformR270",
|
||||
"testnodes_attached4_bottom.png",
|
||||
"testnodes_attached4_top.png",
|
||||
},
|
||||
groups = { attached_node = 2, dig_immediate = 3 },
|
||||
})
|
||||
|
||||
-- Jump disabled
|
||||
minetest.register_node("testnodes:nojump", {
|
||||
description = S("Non-jumping Node").."\n"..
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 123 B |
Binary file not shown.
After Width: | Height: | Size: 111 B |
Binary file not shown.
After Width: | Height: | Size: 100 B |
Binary file not shown.
After Width: | Height: | Size: 274 B |
Binary file not shown.
After Width: | Height: | Size: 188 B |
Binary file not shown.
After Width: | Height: | Size: 170 B |
Reference in New Issue
Block a user