diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-09-09 04:32:51 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-09-09 04:32:51 -0400 |
commit | b85eabb58ddf79e466a0fd3fbe17e4c33941098e (patch) | |
tree | 2e11a8875a9f3ab5754b31b36fe484211735655f | |
parent | 5bbaa4f294dd31d1f14da9e2e3ee9ade7f346d41 (diff) | |
download | signs_lib-b85eabb58ddf79e466a0fd3fbe17e4c33941098e.tar.gz signs_lib-b85eabb58ddf79e466a0fd3fbe17e4c33941098e.tar.bz2 signs_lib-b85eabb58ddf79e466a0fd3fbe17e4c33941098e.zip |
added option to specify text position when making a custom sign node
-rw-r--r-- | init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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] |