Default: Make brick and plank nodes rotatable
authorAuke Kok <sofar@foo-projects.org>
Sun, 29 May 2016 20:45:18 +0000 (13:45 -0700)
committerparamat <mat.gregory@virginmedia.com>
Fri, 17 Jun 2016 22:41:42 +0000 (23:41 +0100)
Allow many crafted nodes to be rotated in any way possible.

These blocks all have slab and stair versions, which can create awkward
patterns if placed together. By allowing these to be rotated players
can create new patterns and appearances that were not before possible.

Since this wasn't possible before, there won't be any effect
to existing builds, as param2 should always be '0'. The current
screwdriver mod also refuses to rotate and alter param2, so this is
safe to enable from now on.

Personally, since these are all *crafted* nodes to begin with, it
should be apparent that they can be rotated to begin with, but I can
see people may disagree from a simplicity perspective. It also may
affect param2 usage that other mods rely on, although I'm not aware
of any mods that do this.

mods/default/nodes.lua

index 3b6e0b1d8bcbbfc9769b4fd42f1501a3614c80eb..dcd92eccc4ad179c569c91c03f8f4e9077f04e2d 100644 (file)
@@ -202,6 +202,8 @@ minetest.register_node("default:cobble", {
 
 minetest.register_node("default:stonebrick", {
        description = "Stone Brick",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_stone_brick.png"},
        is_ground_content = false,
        groups = {cracky = 2, stone = 1},
@@ -236,6 +238,8 @@ minetest.register_node("default:desert_cobble", {
 
 minetest.register_node("default:desert_stonebrick", {
        description = "Desert Stone Brick",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_desert_stone_brick.png"},
        is_ground_content = false,
        groups = {cracky = 2, stone = 1},
@@ -252,6 +256,8 @@ minetest.register_node("default:sandstone", {
 
 minetest.register_node("default:sandstonebrick", {
        description = "Sandstone Brick",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_sandstone_brick.png"},
        is_ground_content = false,
        groups = {cracky = 2},
@@ -268,6 +274,8 @@ minetest.register_node("default:obsidian", {
 
 minetest.register_node("default:obsidianbrick", {
        description = "Obsidian Brick",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_obsidian_brick.png"},
        is_ground_content = false,
        sounds = default.node_sound_stone_defaults(),
@@ -439,6 +447,8 @@ minetest.register_node("default:tree", {
 
 minetest.register_node("default:wood", {
        description = "Wooden Planks",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_wood.png"},
        is_ground_content = false,
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
@@ -539,6 +549,8 @@ minetest.register_node("default:jungletree", {
 
 minetest.register_node("default:junglewood", {
        description = "Junglewood Planks",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_junglewood.png"},
        is_ground_content = false,
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
@@ -605,6 +617,8 @@ minetest.register_node("default:pine_tree", {
 
 minetest.register_node("default:pine_wood", {
        description = "Pine Wood Planks",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_pine_wood.png"},
        is_ground_content = false,
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
@@ -670,6 +684,8 @@ minetest.register_node("default:acacia_tree", {
 
 minetest.register_node("default:acacia_wood", {
        description = "Acacia Wood Planks",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_acacia_wood.png"},
        is_ground_content = false,
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
@@ -734,6 +750,8 @@ minetest.register_node("default:aspen_tree", {
 
 minetest.register_node("default:aspen_wood", {
        description = "Aspen Wood Planks",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_aspen_wood.png"},
        is_ground_content = false,
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
@@ -1815,6 +1833,8 @@ minetest.register_node("default:rail", {
 
 minetest.register_node("default:brick", {
        description = "Brick Block",
+       paramtype2 = "facedir",
+       place_param2 = 0,
        tiles = {"default_brick.png"},
        is_ground_content = false,
        groups = {cracky = 3},