Closed dennisjenkins75 closed 1 year ago
Seems to be a weird bug with the way minetest.dig_node
works, it passes a value that isn't nil, but also isn't usable:
// Dig it out with a NULL digger (appears in Lua as a
// non-functional ObjectRef)
bool success = scriptIfaceNode->node_on_dig(pos, n, NULL);
The pandorabox_custom
code checks for a nil digger, but that value isn't nil.
https://github.com/pandorabox-io/pandorabox_custom/blob/38a43d81b6ff0565b719ef41756d41159f8c5ee4/hacks.lua#L26
Another weird thing, there is only a 1/6 chance of minetest.dig_node
being called by the draconis
code:
if random(6) < 2 then
minetest.dig_node(n_pos)
else
minetest.remove_node(n_pos)
end
Note: digger (or player in other callbacks) can be non functional and this is documented for Minetest API. It is intended, allows way less Lua side overhead (better performance). That's also a reason why one should be very careful if storing player objects Lua side (also documented).
I updated all of the server mods recently and this started showing up. I have not attempted to rollback
pandorabox_custom
, but I can as an experiment.