forked from VoxeLibre/VoxeLibre
Add test command to dump autogroups data to console.
For testing only, do not merge this to master!
This commit is contained in:
parent
e852d0a1c4
commit
4a0974b62a
|
@ -367,4 +367,26 @@ local function overwrite()
|
|||
end
|
||||
end
|
||||
|
||||
minetest.register_on_mods_loaded(overwrite)
|
||||
minetest.register_on_mods_loaded(overwrite)
|
||||
|
||||
-- Test code to demonstrate that on_mods_loaded branch works as expected.
|
||||
-- Do not merge this code to master!
|
||||
|
||||
minetest.register_chatcommand("dump_autogroup", {
|
||||
params = "",
|
||||
description = "Dump data generated by mcl_autogroup to console",
|
||||
privs = { privs = false },
|
||||
func = function()
|
||||
minetest.log("Registered nodes:")
|
||||
for node_name, node_def in pairs(minetest.registered_nodes) do
|
||||
minetest.log(node_name..": "..dump(node_def))
|
||||
end
|
||||
|
||||
minetest.log("Registered tools:")
|
||||
for tool_name, tool_def in pairs(minetest.registered_tools) do
|
||||
minetest.log(tool_name..": "..dump(tool_def))
|
||||
end
|
||||
|
||||
minetest.log("End dump")
|
||||
end
|
||||
})
|
Loading…
Reference in New Issue