Commit graph

20 commits

Author SHA1 Message Date
Jesse Viikari
91382e004c Add resources to world
- setResource(name, resource) to set a resource
- getResource(name) to retrieve it
2021-11-26 16:16:53 +02:00
Pablo Mayobre
2621d7a9ea
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
2021-11-25 17:12:05 -03:00
flamendless
345b8cafe0 Fixed bug with serialization/deserialization 2021-11-03 10:44:13 +08:00
Pablo Ariel Mayobre
6379092642
Fix require indentation 2021-07-03 18:11:17 -03:00
flamendless
63add66633 Fixed errors on World:deserialize 2021-07-03 15:12:58 +08:00
Pablo Ariel Mayobre
2e5e965ae9 Entity's Keys
You can now give the 'key' component to Entities.

A key will be generated automatically and stored in Entity.key.value.

You can then use this key to fetch the Entity from the World with World:getEntityByKey(key)

The keys are generated with a generator function that can be overriden.
2021-07-03 01:09:09 -03:00
Pablo Ariel Mayobre
3911e212a4
Add World:query
This method allows you to query the World in order to find a set of Entities that matches a specific Filter.
2021-05-05 12:49:12 -03:00
Pablo Ariel Mayobre
f78811337a
World:newEntity
A shortcut for Concord.entity(World)
2021-05-05 12:49:12 -03:00
Pablo Ariel Mayobre
f9f475ce48
Serializable component
You can remove the component to tell Concord an Entity shouldn't be serialized.

It's given automatically on Entity creation, but this can be disabled by changing Entity.SERIALIZE_BY_DEFAULT to false.
2021-05-05 12:47:39 -03:00
Pablo Ariel Mayobre
0b1e26624a
Error handling overhaul 2021-05-05 12:46:12 -03:00
Pablo Ariel Mayobre
b6e4cd6fe9
Removed deprecated functionality
Removed hasName/getName on Systems and Worlds.

Removed Entity.__components since it had a duplicate version of the components stored in the Entity itself.
2021-01-09 19:26:21 -03:00
Pablo Ariel Mayobre
78dc7ee937
Fixed some error messages 2020-03-15 00:20:06 -03:00
Pablo Ariel Mayobre
c640641b09
CONCORD IS DEAD
Long live Concord!!
2020-03-14 07:45:25 -03:00
Tjakka5
5dffe04b72 Fix flushing failing 2020-01-18 19:44:09 +01:00
Tjakka5
275d54726d Allow emits within emits 2020-01-18 19:26:38 +01:00
Andrew Minnich
a65f88dd5e make the docs a little nicer
main changes:
- add parameter and return types where applicable
- use @module and @classmod tags at the top of files
- remove some redundant descriptions of return values, especially for functions that return a boolean

recommended next steps:
- more consistent grammar
- add links to classes and functions in descriptions where appropriate
- be consistent about naming Systems vs. SystemClasses and Components vs. ComponentClasses
2020-01-04 10:31:05 -05:00
Tjakka5
55ae5fd987 Add helper functions to container. Allow name to be gotten 2020-01-04 13:40:18 +01:00
Tjakka5
6cd66e6737 Add serialization and deserialization functions to component, entity, world 2020-01-04 13:26:26 +01:00
Tjakka5
cf51bccb81 Fix naming of system:clear, system:setEnable 2020-01-04 11:10:29 +01:00
Tjakka5
f502f1b9f6 rename folder src to concord 2020-01-04 10:50:13 +01:00
Renamed from src/world.lua (Browse further)