1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Try to preserve metatable information in serialzed data

This commit is contained in:
y5nw 2024-02-09 17:17:16 +01:00
parent 75dcd94b90
commit 24f0eb6bc1
5 changed files with 140 additions and 12 deletions

View file

@ -12,6 +12,10 @@ vector = {}
local metatable = {}
vector.metatable = metatable
if core and core.register_serializable then
core.register_serializable("__builtin:vector", metatable)
end
local xyz = {"x", "y", "z"}
-- only called when rawget(v, key) returns nil