summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@linuxworks.belug.de>2018-01-11 22:03:10 +0100
committerroot <root@linuxworks.belug.de>2018-01-11 22:03:10 +0100
commit7ec1ff1908f79904b001acfae9e35b45e15a6bf0 (patch)
tree251ec63fd01d937f23fe6f4ed12ff6da8a4bfc07
parent43b7ce7fec111a8d9424c5def4ebe965a36eab31 (diff)
parent360cbf4b976b63b6fad82858c8bb4446adf0e661 (diff)
Merge https://github.com/orwell96/signs_libHEADmaster
-rw-r--r--init.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 5ca2a46..8a1d5b5 100644
--- a/init.lua
+++ b/init.lua
@@ -15,9 +15,8 @@ local enable_colored_metal_signs = true
-- CWz's keyword interact mod uses this setting.
local current_keyword = minetest.settings:get("interact_keyword") or "iaccept"
-local replace_macros = dofile(minetest.get_modpath(minetest.get_current_modname())..DIR_DELIM.."macro.lua")
-
signs_lib = {}
+signs_lib.replace_macros = dofile(minetest.get_modpath(minetest.get_current_modname())..DIR_DELIM.."macro.lua")
screwdriver = screwdriver or {}
signs_lib.wallmounted_rotate = function(pos, node, user, mode, new_param2)
@@ -305,7 +304,7 @@ end
local function split_lines_and_words(text)
if not text then return end
text = string.gsub(text, "@KEYWORD", current_keyword)
- text = replace_macros(text)
+ text = signs_lib.replace_macros(text)
local lines = { }
for _, line in ipairs(text:split("\n")) do
table.insert(lines, line:split(" "))