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:
parent
75dcd94b90
commit
24f0eb6bc1
5 changed files with 140 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue