aboutsummaryrefslogtreecommitdiff
path: root/signs
diff options
context:
space:
mode:
Diffstat (limited to 'signs')
-rw-r--r--signs/nodes.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/signs/nodes.lua b/signs/nodes.lua
index 8e65e27..428da2e 100644
--- a/signs/nodes.lua
+++ b/signs/nodes.lua
@@ -26,6 +26,16 @@ local function display_poster(pos, node, player)
local meta = minetest.get_meta(pos)
local def = minetest.registered_nodes[node.name].display_entities["signs:display_text"]
+
+ local p_text = meta:get_string("text")
+ local d_text = meta:get_string("display_text")
+ -- If orwell96's modified signs_lib version is available and sign macros are active,
+ -- replace them in display_lib's text too.
+ if signs_lib and signs_lib.replace_macros then
+ p_text = signs_lib.replace_macros(p_text)
+ d_text = signs_lib.replace_macros(d_text)
+ end
+
local font = font_api.get_font(meta:get_string("font") or def.font_name)
local fs
@@ -34,7 +44,7 @@ local function display_poster(pos, node, player)
-- Title texture
local titletexture = font:make_text_texture(
- meta:get_string("display_text"), font:get_height()*8.4,
+ d_text, font:get_height()*8.4,
font:get_height(), 1, "center")
fs = string.format([=[
@@ -44,7 +54,7 @@ local function display_poster(pos, node, player)
textarea[0.3,1.5;7,8;;%s;]]=],
titletexture,
minetest.colorize("#111",
- minetest.formspec_escape(meta:get_string("text"))))
+ minetest.formspec_escape(p_text)))
if minetest.is_protected(pos, player:get_player_name()) then
fs = string.format("%sbutton_exit[2.5,8;2,1;ok;%s]", fs, F("Close"))