Skip to content

Instantly share code, notes, and snippets.

@rubenwardy rubenwardy/init.lua
Last active Jul 12, 2018

Embed
What would you like to do?
function wrapRegisterCall(name, func)
for key, v in pairs(minetest["registered_" .. name .. "s"]) do
func(key, v)
end
local old = minetest["register_" .. name]
minetest["register_" .. name] = function(name, def)
func(name, def)
old(name, def)
end
end
-----------------------------------
wrapCall("item", function(name, def)
def.foo = "bar"
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.