From 41fcfac6afa7466188b2b4a3bf982e563d178e80 Mon Sep 17 00:00:00 2001 From: flamendless Date: Tue, 14 Feb 2023 18:14:25 -0300 Subject: [PATCH] Fixed errors on World:deserialize --- concord/world.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/concord/world.lua b/concord/world.lua index 85a19e8..9113ee2 100644 --- a/concord/world.lua +++ b/concord/world.lua @@ -8,6 +8,7 @@ local PATH = (...):gsub('%.[^%.]+$', '') local Filter = require(PATH..".filter") local Entity = require(PATH..".entity") +local Components = require(PATH..".components") local Type = require(PATH..".type") local List = require(PATH..".list") local Utils = require(PATH..".utils") @@ -396,7 +397,7 @@ function World:deserialize(data, startClean, ignoreGenerator) local entity = Entity(self) if data[i].key then - local component = Components.key:__new() + local component = Components.key:__new(entity) entity.key = component:deserialize(data[i].key) entity:__dirty() @@ -406,7 +407,7 @@ function World:deserialize(data, startClean, ignoreGenerator) end for i = 1, #data do - entity[i]:deserialize(data[i]) + entities[i]:deserialize(data[i]) end self:__flush()