Usability improvements

- Now entity.key() is the same as entity.key.value
- Entity:serialize only serializes component given correctly
- Any other value inside the Entity is ignored
- Disable some diagnostics used in Lua language server by sumneko
This commit is contained in:
Pablo Mayobre 2023-02-14 18:18:43 -03:00 committed by Pablo Ariel Mayobre
parent cf05cfc972
commit 9bccd05019
5 changed files with 9 additions and 1 deletions

View file

@ -22,6 +22,10 @@ function Key:deserialize (data)
self.value = getKey(self, data)
end
function Key.__mt:__call()
return self.value
end
function Key:removed (replaced)
if not replaced then
local entity = self.__entity