forked from mtcontrib/signs_lib
added option to specify text position when making a custom sign node
This commit is contained in:
parent
5bbaa4f294
commit
b85eabb58d
6
init.lua
6
init.lua
@ -510,7 +510,11 @@ signs_lib.update_sign = function(pos, fields, owner)
|
|||||||
-- if there is no entity
|
-- if there is no entity
|
||||||
local sign_info
|
local sign_info
|
||||||
local signnode = minetest.get_node(pos)
|
local signnode = minetest.get_node(pos)
|
||||||
if signnode.name == "signs:sign_yard" then
|
local signname = signnode.name
|
||||||
|
local textpos = minetest.registered_nodes[signname].textpos
|
||||||
|
if textpos then
|
||||||
|
sign_info = textpos[minetest.get_node(pos).param2 + 1]
|
||||||
|
elseif signnode.name == "signs:sign_yard" then
|
||||||
sign_info = signs_lib.yard_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
sign_info = signs_lib.yard_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
||||||
elseif signnode.name == "signs:sign_hanging" then
|
elseif signnode.name == "signs:sign_hanging" then
|
||||||
sign_info = signs_lib.hanging_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
sign_info = signs_lib.hanging_sign_model.textpos[minetest.get_node(pos).param2 + 1]
|
||||||
|
Loading…
Reference in New Issue
Block a user