aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/game/item.lua4
-rw-r--r--doc/lua_api.txt1
2 files changed, 4 insertions, 1 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua
index 36c2c1a68..26ff8225c 100644
--- a/builtin/game/item.lua
+++ b/builtin/game/item.lua
@@ -250,7 +250,9 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2)
local newnode = {name = def.name, param1 = 0, param2 = param2}
-- Calculate direction for wall mounted stuff like torches and signs
- if def.paramtype2 == 'wallmounted' and not param2 then
+ if def.place_param2 ~= nil then
+ newnode.param2 = def.place_param2
+ elseif def.paramtype2 == 'wallmounted' and not param2 then
local dir = {
x = under.x - above.x,
y = under.y - above.y,
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index d89b0bf7b..ed8f8504e 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3528,6 +3528,7 @@ Definition tables
^ paramtype = "light" allows light to propagate from or through the node with light value
^ falling by 1 per node. This line is essential for a light source node to spread its light. ]]
paramtype2 = "none", -- See "Nodes"
+ place_param2 = nil, -- Force value for param2 when player places node
is_ground_content = true, -- If false, the cave generator will not carve through this
sunlight_propagates = false, -- If true, sunlight will go infinitely through this
walkable = true, -- If true, objects collide with node