From 9af1c29fbda86c440159892d3c1d30b8d5d8c015 Mon Sep 17 00:00:00 2001 From: Aaron Suen Date: Fri, 10 Dec 2021 07:27:47 -0500 Subject: [PATCH] Fix ziprunes breaking tips for non-ziprune glyphs --- init.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 4637738..e065f68 100644 --- a/init.lua +++ b/init.lua @@ -258,12 +258,14 @@ do local oldthru = glyphdef.on_node_touchthru if oldthru then rawset(glyphdef, "on_node_touchthru", function(pos, node, under, player, ...) - local raw = nodecore.touchtip_node(under, nil, player) - if raw and vector.equals(vector.subtract(under, pos), - nodecore.facedirs[node.param2].b) then - return ziprunedesc .. raw + if isziprune(pos, node) then + local raw = nodecore.touchtip_node(under, nil, player) + if raw and vector.equals(vector.subtract(under, pos), + nodecore.facedirs[node.param2].b) then + return ziprunedesc .. raw + end end - return oldthru(pos, node, ...) + return oldthru(pos, node, under, player, ...) end) end end