diff options
| author | Wuzzy <Wuzzy@disroot.org> | 2022-09-16 13:18:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-16 13:18:55 +0200 |
| commit | 1d04903c1973591e795d3275b900d76d7cb7877a (patch) | |
| tree | 06891c6fe3075c1868832bc0007308e525cef70f /games/devtest/mods/testnodes/nodeboxes.lua | |
| parent | b5e7280708221cdcca89df7d16f2aea19e4b3c4c (diff) | |
| download | minetest-1d04903c1973591e795d3275b900d76d7cb7877a.tar.xz | |
Add paramtype2s for 4 horizontal rotations and 64 colors (#11431)
4dir is like facedir, but only for 4 horizontal directions: NESW. It is identical in behavior to facedir otherwise. The reason why game makers would want to use this over facedir is 1) simplicity and 2) you get 6 free bits.
It can be used for things like chests and furnaces and you don't need or want them to "flip them on the side" (like you could with facedir).
color4dir is like colorfacedir, but you get 64 colors instead of only 8.
Diffstat (limited to 'games/devtest/mods/testnodes/nodeboxes.lua')
| -rw-r--r-- | games/devtest/mods/testnodes/nodeboxes.lua | 64 |
1 files changed, 57 insertions, 7 deletions
diff --git a/games/devtest/mods/testnodes/nodeboxes.lua b/games/devtest/mods/testnodes/nodeboxes.lua index 7e966fdce..e3c03b073 100644 --- a/games/devtest/mods/testnodes/nodeboxes.lua +++ b/games/devtest/mods/testnodes/nodeboxes.lua @@ -60,6 +60,25 @@ minetest.register_node("testnodes:nodebox_leveled", { groups = {dig_immediate=3}, }) + +local nodebox_wall = { + type = "connected", + fixed = {-0.125, -0.500, -0.125, 0.125, 0.500, 0.125}, + connect_front = {-0.125, -0.500, -0.500, 0.125, 0.400, -0.125}, + connect_back = {-0.125, -0.500, 0.125, 0.125, 0.400, 0.500}, + connect_left = {-0.500, -0.500, -0.125, -0.125, 0.400, 0.125}, + connect_right = {0.125, -0.500, -0.125, 0.500, 0.400, 0.125}, +} + +local nodebox_wall_thick = { + type = "connected", + fixed = {-0.25, -0.500, -0.25, 0.25, 0.500, 0.25}, + connect_front = {-0.25, -0.500, -0.500, 0.25, 0.400, -0.25}, + connect_back = {-0.25, -0.500, 0.25, 0.25, 0.400, 0.500}, + connect_left = {-0.500, -0.500, -0.25, -0.25, 0.400, 0.25}, + connect_right = {0.25, -0.500, -0.25, 0.500, 0.400, 0.25}, +} + -- Wall-like nodebox that connects to neighbors minetest.register_node("testnodes:nodebox_connected", { description = S("Connected Nodebox Test Node"), @@ -69,13 +88,44 @@ minetest.register_node("testnodes:nodebox_connected", { paramtype = "light", connects_to = {"group:connected_nodebox"}, connect_sides = {"front", "back", "left", "right"}, - node_box = { - type = "connected", - fixed = {-0.125, -0.500, -0.125, 0.125, 0.500, 0.125}, - connect_front = {-0.125, -0.500, -0.500, 0.125, 0.400, -0.125}, - connect_back = {-0.125, -0.500, 0.125, 0.125, 0.400, 0.500}, - connect_left = {-0.500, -0.500, -0.125, -0.125, 0.400, 0.125}, - connect_right = {0.125, -0.500, -0.125, 0.500, 0.400, 0.125}, + node_box = nodebox_wall, +}) + +minetest.register_node("testnodes:nodebox_connected_facedir", { + description = S("Facedir Connected Nodebox Test Node"), + tiles = { + "testnodes_1.png", + "testnodes_2.png", + "testnodes_3.png", + "testnodes_4.png", + "testnodes_5.png", + "testnodes_6.png", }, + groups = {connected_nodebox=1, dig_immediate=3}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + connects_to = {"group:connected_nodebox"}, + connect_sides = {"front", "back", "left", "right"}, + node_box = nodebox_wall_thick, +}) + +minetest.register_node("testnodes:nodebox_connected_4dir", { + description = S("4Dir Connected Nodebox Test Node"), + tiles = { + "testnodes_1.png^[colorize:#FFFF00:127", + "testnodes_2.png^[colorize:#FFFF00:127", + "testnodes_3.png^[colorize:#FFFF00:127", + "testnodes_4.png^[colorize:#FFFF00:127", + "testnodes_5.png^[colorize:#FFFF00:127", + "testnodes_6.png^[colorize:#FFFF00:127", + }, + groups = {connected_nodebox=1, dig_immediate=3}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "4dir", + connects_to = {"group:connected_nodebox"}, + connect_sides = {"front", "back", "left", "right"}, + node_box = nodebox_wall_thick, }) |
