added option to specify text position when making a custom sign node

This commit is contained in:
Vanessa Ezekowitz 2016-09-09 04:32:51 -04:00
parent 5bbaa4f294
commit b85eabb58d

View File

@ -510,7 +510,11 @@ signs_lib.update_sign = function(pos, fields, owner)
-- if there is no entity
local sign_info
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]
elseif signnode.name == "signs:sign_hanging" then
sign_info = signs_lib.hanging_sign_model.textpos[minetest.get_node(pos).param2 + 1]