Commit graph

21 commits

Author SHA1 Message Date
Justin van der Leij
a11cb94aaa Fixed an issue where :setSystem would not acknowledge which system to work on 2018-04-04 12:45:44 +02:00
Justin van der Leij
2b377bea24 Fixed a little typo and systems not behaving correctly when added to a Instance multiple times. 2018-03-24 00:15:42 +01:00
Justin van der Leij
acd77fafa5 Removed the need for manual flushing. Systems now know about their instance 2018-03-23 23:40:35 +01:00
Josh Perry
de35fdc450 Fixed removed list not being cleared
After an entity has a component removed from it, the apply function wasn't removing it from the removed list.
This had weird side-effects like the inability to readd components after they were removed.

For example:

    entity:give(Foo):apply()
    entity:remove(Foo):apply()
    entity:give(Foo):apply() -- This line would fail to add the Foo component again.
2018-03-13 17:44:05 +00:00
Josh Perry
54af717df8 Fix for Entity:has not returning false if the component doesn't exist
The documentation states that Entity:has will return false if the component doesn't exist and true if it does.
However, the previous behaviour was to return nil if the component doesn't exist.
2018-03-13 14:30:25 +00:00
Justin van der Leij
a50e3caf8b Components get removed properly now 2018-03-13 13:00:46 +01:00
Justin van der Leij
d72bc18b0c proper capitalization is important 2018-03-09 15:40:43 +01:00
Justin van der Leij
e1b860222e Cleaned up lists 2018-03-09 15:39:02 +01:00
Justin van der Leij
eeadfc8817 Fixed removal 2018-03-09 15:34:56 +01:00
Justin van der Leij
7053d91c80 Documented :destroy 2018-03-07 11:53:26 +01:00
Justin van der Leij
4b8b6a6f88 Reverted a small whoopsie with Entity removal 2018-03-07 11:08:00 +01:00
Justin van der Leij
63d8c39b31 Holy shit I just wrote documentation 2018-03-07 11:05:30 +01:00
Justin van der Leij
8810005217 Did work on events 2018-03-06 13:59:25 +01:00
Justin van der Leij
fa22f6f6f6 Some more work on system-instance interaction 2018-02-21 13:38:27 +01:00
Justin van der Leij
0d5f05fa64 Fixed some things regarding deregistering 2018-02-20 23:46:11 +01:00
Justin van der Leij
fae3c4a427 Allowed for systems to atach multiple times under different callbacks 2018-02-20 23:43:48 +01:00
Justin van der Leij
100d6320c7 Allowed for entities to be in multiple systems. Fixed the removal issue. 2018-02-20 23:38:04 +01:00
Justin van der Leij
c750ea119f Made systems classes instead of singletons 2018-02-16 15:03:07 +01:00
Justin van der Leij
d4297af78e A bit more polish 2018-01-30 12:59:56 +01:00
Justin van der Leij
2d21fe97a5 Polishing 2018-01-30 12:45:35 +01:00
Justin van der Leij
58549d6b0a Initial commit 2018-01-25 15:19:31 +01:00