diff options
author | orwell96 <orwell@bleipb.de> | 2018-01-11 22:22:20 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-01-11 22:22:20 +0100 |
commit | 360cbf4b976b63b6fad82858c8bb4446adf0e661 (patch) | |
tree | 26593237257b228728968d8afae54a02df19b018 | |
parent | a06627f23b052207d3fc23d786c525f2cd26096c (diff) |
Make replace_macros global to use it in display_lib
-rw-r--r-- | init.lua | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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(" ")) |