Fix ziprunes breaking tips for non-ziprune glyphs

This commit is contained in:
Aaron Suen 2021-12-10 07:27:47 -05:00
parent cb7f34f95c
commit 9af1c29fbd

View File

@ -258,12 +258,14 @@ do
local oldthru = glyphdef.on_node_touchthru
if oldthru then
rawset(glyphdef, "on_node_touchthru", function(pos, node, under, player, ...)
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
return oldthru(pos, node, ...)
end
return oldthru(pos, node, under, player, ...)
end)
end
end