mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
Fixed bug with serialization/deserialization
This commit is contained in:
parent
61720312cb
commit
16c77c6a66
2 changed files with 5 additions and 4 deletions
|
@ -19,7 +19,7 @@ local Key = Component("key", function (self, key)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function Key:deserialize (data)
|
function Key:deserialize (data)
|
||||||
self.value = getKey(self, data.value)
|
self.value = getKey(self, data)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Key:removed (replaced)
|
function Key:removed (replaced)
|
||||||
|
|
|
@ -398,7 +398,8 @@ function World:deserialize(data, startClean, ignoreGenerator)
|
||||||
|
|
||||||
if data[i].key then
|
if data[i].key then
|
||||||
local component = Components.key:__new(entity)
|
local component = Components.key:__new(entity)
|
||||||
entity.key = component:deserialize(data[i].key)
|
component:deserialize(data[i].key)
|
||||||
|
entity.key = component
|
||||||
|
|
||||||
entity:__dirty()
|
entity:__dirty()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue