1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073)

This commit is contained in:
Wuzzy 2024-01-17 17:47:06 +01:00 committed by GitHub
parent e7dd9737bd
commit 08ee6d8d4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 375 additions and 33 deletions

View file

@ -80,7 +80,7 @@ minetest.register_node("testnodes:4dir_nodebox", {
minetest.register_node("testnodes:wallmounted", {
description = S("Wallmounted Test Node").."\n"..
S("param2 = wallmounted rotation (0..5)"),
S("param2 = wallmounted rotation (0..7)"),
paramtype2 = "wallmounted",
tiles = {
"testnodes_1w.png",
@ -94,9 +94,25 @@ minetest.register_node("testnodes:wallmounted", {
groups = { dig_immediate = 3 },
})
minetest.register_node("testnodes:wallmounted_rot", {
description = S("Wallmounted Rotatable Test Node"),
paramtype2 = "wallmounted",
wallmounted_rotate_vertical = true,
tiles = {
"testnodes_1w.png^[colorize:#FFFF00:40",
"testnodes_2w.png^[colorize:#FFFF00:40",
"testnodes_3w.png^[colorize:#FFFF00:40",
"testnodes_4w.png^[colorize:#FFFF00:40",
"testnodes_5w.png^[colorize:#FFFF00:40",
"testnodes_6w.png^[colorize:#FFFF00:40",
},
groups = { dig_immediate = 3 },
})
minetest.register_node("testnodes:wallmounted_nodebox", {
description = S("Wallmounted Nodebox Test Node").."\n"..
S("param2 = wallmounted rotation (0..5)"),
S("param2 = wallmounted rotation (0..7)"),
paramtype2 = "wallmounted",
paramtype = "light",
tiles = {
@ -118,6 +134,30 @@ minetest.register_node("testnodes:wallmounted_nodebox", {
groups = { dig_immediate = 3 },
})
minetest.register_node("testnodes:wallmounted_nodebox_rot", {
description = S("Wallmounted Rotatable Nodebox Test Node"),
paramtype2 = "wallmounted",
wallmounted_rotate_vertical = true,
paramtype = "light",
tiles = {
"testnodes_1w.png^[colorize:#FFFF00:40",
"testnodes_2w.png^[colorize:#FFFF00:40",
"testnodes_3w.png^[colorize:#FFFF00:40",
"testnodes_4w.png^[colorize:#FFFF00:40",
"testnodes_5w.png^[colorize:#FFFF00:40",
"testnodes_6w.png^[colorize:#FFFF00:40",
},
drawtype = "nodebox",
node_box = {
type = "wallmounted",
wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 },
wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 },
},
groups = { dig_immediate = 3 },
})
minetest.register_node("testnodes:color", {
description = S("Color Test Node").."\n"..
S("param2 = color (0..255)"),
@ -212,7 +252,7 @@ minetest.register_node("testnodes:color4dir_nodebox", {
minetest.register_node("testnodes:colorwallmounted", {
description = S("Color Wallmounted Test Node").."\n"..
S("param2 = color + wallmounted rotation (0..5, 8..13, ...)"),
S("param2 = color + wallmounted rotation (0..7, 8..15, ...)"),
paramtype2 = "colorwallmounted",
paramtype = "light",
palette = "testnodes_palette_wallmounted.png",
@ -230,7 +270,7 @@ minetest.register_node("testnodes:colorwallmounted", {
minetest.register_node("testnodes:colorwallmounted_nodebox", {
description = S("Color Wallmounted Nodebox Test Node").."\n"..
S("param2 = color + wallmounted rotation (0..5, 8..13, ...)"),
S("param2 = color + wallmounted rotation (0..7, 8..15, ...)"),
paramtype2 = "colorwallmounted",
paramtype = "light",
palette = "testnodes_palette_wallmounted.png",