cleanup paintedcanvas on_place
parent
1cc3d63b2e
commit
5022d30da0
6
init.lua
6
init.lua
|
@ -128,7 +128,7 @@ paintedcanvas = {
|
|||
local dir = sub(pos, placerpos)
|
||||
local fd = minetest.dir_to_facedir(dir)
|
||||
|
||||
local pic = minetest.env:add_node(pos, { name = "painting:pic",
|
||||
minetest.env:add_node(pos, { name = "painting:pic",
|
||||
param2 = fd,
|
||||
paramtype2 = "none" })
|
||||
|
||||
|
@ -141,14 +141,14 @@ paintedcanvas = {
|
|||
dir = dirs[fd]
|
||||
local off = 0.5 - thickness - 0.01
|
||||
|
||||
local np = { x = pos.x + dir.x*off,
|
||||
pos = { x = pos.x + dir.x * off,
|
||||
y = pos.y,
|
||||
z = pos.z + dir.z * off}
|
||||
|
||||
data = minetest.deserialize(data)
|
||||
data = to_imagestring(data)
|
||||
|
||||
local p = minetest.env:add_entity(np, "painting:picent"):get_luaentity()
|
||||
local p = minetest.env:add_entity(pos, "painting:picent"):get_luaentity()
|
||||
p.object:set_properties({ textures = { data }})
|
||||
p.object:setyaw(math.pi * fd / -2)
|
||||
|
||||
|
|
Loading…
Reference in New Issue