minetest-mods / 3d_armor

Visible player armor & wielded items for minetest
Other
17 stars 39 forks source link

add nil check in `armor.damage` #109

Closed BuckarooBanzay closed 1 year ago

BuckarooBanzay commented 1 year ago

might fix a bug, see discussion in #49

mckaygerhard commented 1 year ago

(Edited) this helps, but in the loop of https://github.com/minetest-mods/3d_armor/blob/dfa19cce980d3be00bc548471fec8bcbcac1d96f/3d_armor/init.lua#L504 there's a "reason", i got an error when "reason" is not present, thanks in advance @BuckarooBanzay (sorry for noise and for delay in response)

that loop tries to detect the reason to check if torch is the cause, but this relies so much in the engine object.. i gues the old way ist more generic and backguard compatible, just need more tune up