From a5a035d9bbadc0956a4512421924e1f3ba568390 Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Fri, 12 May 2023 17:07:25 -0600 Subject: [PATCH] Make sure dying sign text respects protection --- mods/ITEMS/mcl_signs/mod.conf | 2 +- mods/ITEMS/mcl_signs/signs_api.lua | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_signs/mod.conf b/mods/ITEMS/mcl_signs/mod.conf index ada0ae58a..e2fe9d40a 100644 --- a/mods/ITEMS/mcl_signs/mod.conf +++ b/mods/ITEMS/mcl_signs/mod.conf @@ -1,4 +1,4 @@ name = mcl_signs description = New and Improved signs - can be colored and made to glow. -depends = mcl_core, mcl_sounds, mcl_dye, mcl_colors +depends = mcl_core, mcl_sounds, mcl_dye, mcl_colors, mcl_util optional_depends = doc diff --git a/mods/ITEMS/mcl_signs/signs_api.lua b/mods/ITEMS/mcl_signs/signs_api.lua index 3d8bd3e49..7ada6a646 100644 --- a/mods/ITEMS/mcl_signs/signs_api.lua +++ b/mods/ITEMS/mcl_signs/signs_api.lua @@ -307,7 +307,9 @@ mcl_signs.wall_standard = { local item = clicker:get_wielded_item() local iname = item:get_name() - if node then + local protected = mcl_util.check_position_protection(pos, clicker) + + if node and not protected then if DEBUG then minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event on valid node.") end @@ -414,7 +416,9 @@ mcl_signs.standing_standard = { local item = clicker:get_wielded_item() local iname = item:get_name() - if node then + local protected = mcl_util.check_position_protection(pos, clicker) + + if node and not protected then -- handle glow from glow_ink_sac *first* if DEBUG then minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event on valid node.")