mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 02:42:25 +01:00
Fix some sign serialization bugs
This commit is contained in:
parent
868a990551
commit
fd281dfe50
@ -114,9 +114,9 @@ local generate_texture = function(lines, signnodename)
|
|||||||
local texture = "[combine:"..SIGN_WIDTH.."x"..SIGN_WIDTH
|
local texture = "[combine:"..SIGN_WIDTH.."x"..SIGN_WIDTH
|
||||||
local ypos
|
local ypos
|
||||||
if signnodename == "mcl_signs:wall_sign" then
|
if signnodename == "mcl_signs:wall_sign" then
|
||||||
ypos = 27
|
ypos = 29
|
||||||
else
|
else
|
||||||
ypos = 0
|
ypos = -2
|
||||||
end
|
end
|
||||||
for i = 1, #lines do
|
for i = 1, #lines do
|
||||||
texture = texture..generate_line(lines[i], ypos)
|
texture = texture..generate_line(lines[i], ypos)
|
||||||
@ -419,8 +419,11 @@ minetest.register_entity("mcl_signs:text", {
|
|||||||
_signnodename = nil, -- node name of sign node to which the text belongs
|
_signnodename = nil, -- node name of sign node to which the text belongs
|
||||||
|
|
||||||
on_activate = function(self, staticdata)
|
on_activate = function(self, staticdata)
|
||||||
if staticdata then
|
if staticdata ~= nil and staticdata ~= "" then
|
||||||
self._signnodename = staticdata._signnodename
|
local des = minetest.deserialize(staticdata)
|
||||||
|
if des then
|
||||||
|
self._signnodename = des._signnodename
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local meta = minetest.get_meta(self.object:getpos())
|
local meta = minetest.get_meta(self.object:getpos())
|
||||||
local text = meta:get_string("text")
|
local text = meta:get_string("text")
|
||||||
|
Loading…
Reference in New Issue
Block a user