Add debug field: active event counter

to verify it doesn't memleak
This commit is contained in:
cora 2022-11-17 20:06:00 +01:00
parent 94057aa7e5
commit e5515ed119
2 changed files with 8 additions and 1 deletions

View File

@ -131,6 +131,13 @@ end
minetest.register_globalstep(check_events) minetest.register_globalstep(check_events)
mcl_info.register_debug_field("Active Events",{
level = 4,
func = function(pl,pos)
return tostring(#active_events)
end
})
minetest.register_chatcommand("event_start",{ minetest.register_chatcommand("event_start",{
privs = {debug = true}, privs = {debug = true},
description = "Debug command to start events", description = "Debug command to start events",

View File

@ -1,3 +1,3 @@
name = mcl_events name = mcl_events
author = cora author = cora
depends = mcl_mobs,mcl_bossbars depends = mcl_mobs,mcl_bossbars, mcl_info