mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
Fixed errors on World:deserialize
This commit is contained in:
parent
a55efd042a
commit
41fcfac6af
1 changed files with 3 additions and 2 deletions
|
@ -8,6 +8,7 @@ local PATH = (...):gsub('%.[^%.]+$', '')
|
||||||
|
|
||||||
local Filter = require(PATH..".filter")
|
local Filter = require(PATH..".filter")
|
||||||
local Entity = require(PATH..".entity")
|
local Entity = require(PATH..".entity")
|
||||||
|
local Components = require(PATH..".components")
|
||||||
local Type = require(PATH..".type")
|
local Type = require(PATH..".type")
|
||||||
local List = require(PATH..".list")
|
local List = require(PATH..".list")
|
||||||
local Utils = require(PATH..".utils")
|
local Utils = require(PATH..".utils")
|
||||||
|
@ -396,7 +397,7 @@ function World:deserialize(data, startClean, ignoreGenerator)
|
||||||
local entity = Entity(self)
|
local entity = Entity(self)
|
||||||
|
|
||||||
if data[i].key then
|
if data[i].key then
|
||||||
local component = Components.key:__new()
|
local component = Components.key:__new(entity)
|
||||||
entity.key = component:deserialize(data[i].key)
|
entity.key = component:deserialize(data[i].key)
|
||||||
|
|
||||||
entity:__dirty()
|
entity:__dirty()
|
||||||
|
@ -406,7 +407,7 @@ function World:deserialize(data, startClean, ignoreGenerator)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, #data do
|
for i = 1, #data do
|
||||||
entity[i]:deserialize(data[i])
|
entities[i]:deserialize(data[i])
|
||||||
end
|
end
|
||||||
|
|
||||||
self:__flush()
|
self:__flush()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue