From bbd7a0859134e9de21642be5b74075446981820b Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 22 Dec 2022 13:19:24 +0000 Subject: [PATCH] clean aliased mob staticdata --- api.lua | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 7e66047..63fda51 100644 --- a/api.lua +++ b/api.lua @@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20221213", + version = "20221222", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -4830,7 +4830,23 @@ function mobs:alias_mob(old_name, new_name) end, get_staticdata = function(self) - return self + + local tmp, t = {} + + for _,stat in pairs(self) do + + t = type(stat) + + if t ~= "function" + and t ~= "nil" + and t ~= "userdata" + and _ ~= "object" + and _ ~= "_cmi_components" then + tmp[_] = self[_] + end + end + + return minetest.serialize(tmp) end }) end