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 local oldthru = glyphdef.on_node_touchthru
if oldthru then if oldthru then
rawset(glyphdef, "on_node_touchthru", function(pos, node, under, player, ...) rawset(glyphdef, "on_node_touchthru", function(pos, node, under, player, ...)
local raw = nodecore.touchtip_node(under, nil, player) if isziprune(pos, node) then
if raw and vector.equals(vector.subtract(under, pos), local raw = nodecore.touchtip_node(under, nil, player)
nodecore.facedirs[node.param2].b) then if raw and vector.equals(vector.subtract(under, pos),
return ziprunedesc .. raw nodecore.facedirs[node.param2].b) then
return ziprunedesc .. raw
end
end end
return oldthru(pos, node, ...) return oldthru(pos, node, under, player, ...)
end) end)
end end
end end