From 2a34adcf0fa8aac65e3a0b10889b4e69b1d47975 Mon Sep 17 00:00:00 2001 From: pablomayobre Date: Wed, 15 Feb 2023 01:21:05 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Keyslam-?= =?UTF-8?q?Group/Concord@a80077276d861aa74d946a54eba9d5369d75397b=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/Component.html | 4 +- classes/Entity.html | 14 ++- classes/Filter.html | 255 ++++++++++++++++++++++++++++++++++++++++ classes/List.html | 85 +++++++++++++- classes/Pool.html | 2 +- classes/System.html | 52 +------- classes/World.html | 142 ++++++++++++++-------- index.html | 14 +-- modules/Components.html | 38 +++++- modules/Concord.html | 4 +- modules/type.html | 34 +++++- modules/utils.html | 4 +- 12 files changed, 523 insertions(+), 125 deletions(-) create mode 100644 classes/Filter.html diff --git a/classes/Component.html b/classes/Component.html index 88dbbc5..c84204a 100644 --- a/classes/Component.html +++ b/classes/Component.html @@ -40,8 +40,8 @@ @@ -159,7 +159,7 @@
generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
diff --git a/classes/Entity.html b/classes/Entity.html index 30cf263..7f5d963 100644 --- a/classes/Entity.html +++ b/classes/Entity.html @@ -40,8 +40,8 @@ @@ -98,7 +98,7 @@ Gets a Component from the Entity. - Entity:getComponents () + Entity:getComponents (output) Returns a table of all Components the Entity has. @@ -341,7 +341,7 @@
- Entity:getComponents () + Entity:getComponents (output)
Returns a table of all Components the Entity has. @@ -349,6 +349,12 @@ Use Entity:give/ensure/remove instead +

Parameters:

+

Returns:

    @@ -408,7 +414,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
    diff --git a/classes/Filter.html b/classes/Filter.html new file mode 100644 index 0000000..234fe8d --- /dev/null +++ b/classes/Filter.html @@ -0,0 +1,255 @@ + + + + + Reference + + + + +
    + +
    + +
    +
    +
    + + +
    + + + + + + +
    + +

    Class Filter

    +

    Used to filter Entities with specific Components + A Filter has an associated Pool that can contain any amount of Entities.

    +

    + + +

    Methods

    + + + + + + + + + + + + + + + + + + + + + +
    Filter:validate (name, definition, Optional)Validates a Filter Definition to make sure every component is valid.
    Filter:parse (name, definition)Parses the Filter Defintion into two tables + required: An array of all the required component names.
    Filter:new (name, definition)Creates a new Filter
    Filter:eligible (e)Checks if an Entity fulfills the Filter requirements.
    Filter:getName ()Gets the name of the Filter
    + +
    +
    + + +

    Methods

    + +
    +
    + + Filter:validate (name, definition, Optional) +
    +
    + Validates a Filter Definition to make sure every component is valid. + + +

    Parameters:

    +
      +
    • name + string + Name for the Filter. +
    • +
    • definition + table + Table containing the Filter Definition +
    • +
    • Optional + onComponent + function, called when a component is valid. +
    • +
    + + + + + +
    +
    + + Filter:parse (name, definition) +
    +
    + Parses the Filter Defintion into two tables + required: An array of all the required component names. + rejected: An array of all the components that will be rejected. + + +

    Parameters:

    +
      +
    • name + string + Name for the Filter. +
    • +
    • definition + table + Table containing the Filter Definition +
    • +
    + +

    Returns:

    +
      +
    1. + table + required
    2. +
    3. + table + rejected
    4. +
    + + + + +
    +
    + + Filter:new (name, definition) +
    +
    + Creates a new Filter + + +

    Parameters:

    +
      +
    • name + string + Name for the Filter. +
    • +
    • definition + table + Table containing the Filter Definition +
    • +
    + +

    Returns:

    +
      +
    1. + Filter + The new Filter
    2. +
    3. + Pool + The associated Pool
    4. +
    + + + + +
    +
    + + Filter:eligible (e) +
    +
    + Checks if an Entity fulfills the Filter requirements. + + +

    Parameters:

    +
      +
    • e + Entity + Entity to check +
    • +
    + +

    Returns:

    +
      + + boolean + +
    + + + + +
    +
    + + Filter:getName () +
    +
    + Gets the name of the Filter + + + +

    Returns:

    +
      + + string + +
    + + + + +
    +
    + + +
    +
    +
    +generated by LDoc 1.4.6 +Last updated 2023-02-15 01:21:04 +
    +
    + + diff --git a/classes/List.html b/classes/List.html index 010c54b..4fcf139 100644 --- a/classes/List.html +++ b/classes/List.html @@ -40,8 +40,8 @@ @@ -92,6 +92,18 @@ List:indexOf (obj) Returns the index of an object in the List. + + List:sort (order) + Sorts the List in place, using the order function. + + + List:onAdded (obj) + Callback for when an item is added to the List. + + + List:onRemoved (obj) + Callback for when an item is removed to the List. +
    @@ -128,7 +140,7 @@
    Adds an object to the List. Object must be of reference type - Object may not be the string 'size' + Object may not be the string 'size', 'onAdded' or 'onRemoved'

    Parameters:

    @@ -272,6 +284,73 @@ +
    +
    + + List:sort (order) +
    +
    + Sorts the List in place, using the order function. + The order function is passed to table.sort internally so documentation on table.sort can be used as reference. + + +

    Parameters:

    +
      +
    • order + Function that takes two Entities (a and b) and returns true if a should go before than b. +
    • +
    + +

    Returns:

    +
      + + List + self +
    + + + + +
    +
    + + List:onAdded (obj) +
    +
    + Callback for when an item is added to the List. + + +

    Parameters:

    +
      +
    • obj + Object that was added +
    • +
    + + + + + +
    +
    + + List:onRemoved (obj) +
    +
    + Callback for when an item is removed to the List. + + +

    Parameters:

    +
      +
    • obj + Object that was removed +
    • +
    + + + + +
    @@ -280,7 +359,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
    diff --git a/classes/Pool.html b/classes/Pool.html index 54ad58a..77be777 100644 --- a/classes/Pool.html +++ b/classes/Pool.html @@ -250,7 +250,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2020-08-18 15:20:32
    diff --git a/classes/System.html b/classes/System.html index 97f0723..f4777f2 100644 --- a/classes/System.html +++ b/classes/System.html @@ -41,8 +41,8 @@ @@ -83,14 +83,6 @@ System:getWorld () Returns the World the System is in. - - System:hasName () - Returns true if the System has a name. - - - System:getName () - Returns the name of the System. -

    Callbacks

    @@ -207,46 +199,6 @@ - -
    - - System:hasName () -
    -
    - Returns true if the System has a name. - - - -

    Returns:

    -
      - - boolean - -
    - - - - -
    -
    - - System:getName () -
    -
    - Returns the name of the System. - - - -

    Returns:

    -
      - - string - -
    - - - -

    Callbacks

    @@ -308,7 +260,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
    diff --git a/classes/World.html b/classes/World.html index f625df9..2f693be 100644 --- a/classes/World.html +++ b/classes/World.html @@ -40,8 +40,8 @@ @@ -76,6 +76,10 @@ + + + + @@ -104,14 +108,6 @@ - - - - - - - - @@ -119,6 +115,14 @@ + + + + + + + +
    Adds an Entity to the World.
    World:newEntity ()Creates a new Entity and adds it to the World.
    World:removeEntity (e) Removes an Entity from the World.
    Removes all entities from the World
    World:hasName ()Returns true if the World has a name.
    World:getName ()Returns the name of the World.
    World:onEntityAdded (e) Callback for when an Entity is added to the World.
    World:onEntityRemoved (e) Callback for when an Entity is removed from the World.
    World:setResource (name, resource)Sets a named resource in the world
    World:getResource (name)Gets a named resource from the world

    @@ -174,6 +178,26 @@ +
+
+ + World:newEntity () +
+
+ Creates a new Entity and adds it to the World. + + + +

Returns:

+
    + + Entity + e the new Entity +
+ + + +
@@ -371,46 +395,6 @@ - -
- - World:hasName () -
-
- Returns true if the World has a name. - - - -

Returns:

-
    - - boolean - -
- - - - -
-
- - World:getName () -
-
- Returns the name of the World. - - - -

Returns:

-
    - - string - -
- - - -
@@ -453,6 +437,64 @@ + +
+ + World:setResource (name, resource) +
+
+ Sets a named resource in the world + + +

Parameters:

+ + +

Returns:

+
    + + World + self +
+ + + + +
+
+ + World:getResource (name) +
+
+ Gets a named resource from the world + + +

Parameters:

+ + +

Returns:

+
    + + Any + resource +
+ + + +
@@ -461,7 +503,7 @@
generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
diff --git a/index.html b/index.html index cacf65b..798d994 100644 --- a/index.html +++ b/index.html @@ -40,8 +40,8 @@ @@ -85,13 +85,13 @@ An object that exists in a world. - List - Data structure that allows for fast removal at the cost of containing order. + Filter + Used to filter Entities with specific Components + A Filter has an associated Pool that can contain any amount of Entities. - Pool - Used to iterate over Entities with a specific Components - A Pool contain a any amount of Entities. + List + Data structure that allows for fast removal at the cost of containing order. System @@ -107,7 +107,7 @@
generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
diff --git a/modules/Components.html b/modules/Components.html index d58393f..950d094 100644 --- a/modules/Components.html +++ b/modules/Components.html @@ -47,8 +47,8 @@ @@ -69,6 +69,10 @@ Returns true if the containter has the ComponentClass with the specified name + reject (name) + Prefix a component's name with the currently set Reject Prefix + + try (name) Returns true and the ComponentClass if one was registered with the specified name or false and an error otherwise @@ -112,6 +116,33 @@ + +
+ + reject (name) +
+
+ Prefix a component's name with the currently set Reject Prefix + + +

Parameters:

+ + +

Returns:

+
    + + string + +
+ + + +
@@ -138,6 +169,9 @@
  • Component or error string
  • +
  • + true + if acceptRejected was true and the name had the Reject Prefix, false otherwise.
  • @@ -178,7 +212,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
    diff --git a/modules/Concord.html b/modules/Concord.html index f72db8c..89ade77 100644 --- a/modules/Concord.html +++ b/modules/Concord.html @@ -43,8 +43,8 @@ @@ -69,7 +69,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
    diff --git a/modules/type.html b/modules/type.html index 6129f5a..3f072be 100644 --- a/modules/type.html +++ b/modules/type.html @@ -47,8 +47,8 @@ @@ -89,6 +89,10 @@ Type.isWorld (t) Returns if object is a World. + + Type.isFilter (t) + Returns if object is a Filter. +
    @@ -253,6 +257,32 @@ + +
    + + Type.isFilter (t) +
    +
    + Returns if object is a Filter. + + +

    Parameters:

    + + +

    Returns:

    +
      + + boolean + +
    + + + +
    @@ -261,7 +291,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04
    diff --git a/modules/utils.html b/modules/utils.html index f966a5c..7269df8 100644 --- a/modules/utils.html +++ b/modules/utils.html @@ -47,8 +47,8 @@ @@ -143,7 +143,7 @@
    generated by LDoc 1.4.6 -Last updated 2022-10-17 19:53:58 +Last updated 2023-02-15 01:21:04