summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 5c18308..e5db733 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)
@@ -292,7 +291,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(" "))