From fcd25e47987a8fd35a1712201dcc035707fd462c Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 17 Feb 2022 07:55:00 -0500 Subject: fix code climate and remove deprecated files --- docs/FelECS.html | 4 ++-- docs/FelECS/ComponentManager.html | 2 +- docs/FelECS/Components.html | 2 +- docs/FelECS/Entities.html | 8 +++++-- docs/FelECS/Order.html | 2 +- docs/FelECS/Scenes.html | 2 +- docs/FelECS/Stage.html | 2 +- docs/FelECS/Systems.html | 44 +++++++++++++++++++-------------------- docs/_index.html | 2 +- docs/file.README.html | 35 +++++++++++++++++++++++++++---- docs/index.html | 35 +++++++++++++++++++++++++++---- docs/top-level-namespace.html | 2 +- 12 files changed, 99 insertions(+), 41 deletions(-) (limited to 'docs') diff --git a/docs/FelECS.html b/docs/FelECS.html index 62efd37..de85749 100644 --- a/docs/FelECS.html +++ b/docs/FelECS.html @@ -227,7 +227,7 @@ -
'5.0.0'
+
'5.0.1'
@@ -325,7 +325,7 @@ diff --git a/docs/FelECS/ComponentManager.html b/docs/FelECS/ComponentManager.html index fb78748..4519111 100644 --- a/docs/FelECS/ComponentManager.html +++ b/docs/FelECS/ComponentManager.html @@ -1229,7 +1229,7 @@ diff --git a/docs/FelECS/Components.html b/docs/FelECS/Components.html index e58decc..368a994 100644 --- a/docs/FelECS/Components.html +++ b/docs/FelECS/Components.html @@ -327,7 +327,7 @@ diff --git a/docs/FelECS/Entities.html b/docs/FelECS/Entities.html index 6a5045c..e937df1 100644 --- a/docs/FelECS/Entities.html +++ b/docs/FelECS/Entities.html @@ -450,13 +450,16 @@ 131 132 133 -134 +134 +135 +136
# File 'lib/felecs/entity_manager.rb', line 107
 
 def group(*component_managers, &block)
   return nil if component_managers.empty?
+
   if component_managers.length == 1
     component_managers.first.each do |cmp|
       block.call(cmp, cmp.entity)
@@ -467,6 +470,7 @@
       keep = true
       component_managers.drop(1).each do |mgr|
         next unless ent.components[mgr].nil?
+
         keep = false
         break
       end
@@ -925,7 +929,7 @@
 
 
       
diff --git a/docs/FelECS/Order.html b/docs/FelECS/Order.html
index 6dd5c97..aa0db42 100644
--- a/docs/FelECS/Order.html
+++ b/docs/FelECS/Order.html
@@ -241,7 +241,7 @@
 
 
       
diff --git a/docs/FelECS/Scenes.html b/docs/FelECS/Scenes.html
index d11b129..9e66030 100644
--- a/docs/FelECS/Scenes.html
+++ b/docs/FelECS/Scenes.html
@@ -755,7 +755,7 @@
 
 
       
diff --git a/docs/FelECS/Stage.html b/docs/FelECS/Stage.html
index 02b1f70..0ae8a35 100644
--- a/docs/FelECS/Stage.html
+++ b/docs/FelECS/Stage.html
@@ -562,7 +562,7 @@
 
 
       
diff --git a/docs/FelECS/Systems.html b/docs/FelECS/Systems.html
index f4ef7ac..18e1442 100644
--- a/docs/FelECS/Systems.html
+++ b/docs/FelECS/Systems.html
@@ -1118,28 +1118,28 @@
 
   if trigger_types.include? :attr_triggers
     if (trigger_types - %i[addition_triggers
-        removal_triggers
-        attr_triggers]).empty?
-
-        if component_or_manager.nil?
-          # remove all attrs
-          attr_triggers.each do |cmp_or_mgr, attrs|
-            attrs.each do |attr|
-              next if cmp_or_mgr.attr_triggers[attr].nil?
-
-              cmp_or_mgr.attr_triggers[attr].delete self
-            end
-            self.attr_triggers = {}
+                           removal_triggers
+                           attr_triggers]).empty?
+
+      if component_or_manager.nil?
+        # remove all attrs
+        attr_triggers.each do |cmp_or_mgr, attrs|
+          attrs.each do |attr|
+            next if cmp_or_mgr.attr_triggers[attr].nil?
+
+            cmp_or_mgr.attr_triggers[attr].delete self
           end
-        else
-          # remove attrs relevant to comp_or_man
-          unless attr_triggers[component_or_manager].nil?
-            attr_triggers[component_or_manager].each do |attr|
-              component_or_manager.attr_triggers[attr].delete self
-            end
-            attr_triggers[component_or_manager] = []
+          self.attr_triggers = {}
+        end
+      else
+        # remove attrs relevant to comp_or_man
+        unless attr_triggers[component_or_manager].nil?
+          attr_triggers[component_or_manager].each do |attr|
+            component_or_manager.attr_triggers[attr].delete self
           end
+          attr_triggers[component_or_manager] = []
         end
+      end
 
     elsif component_or_manager.nil?
 
@@ -1150,8 +1150,8 @@
         end
       end
       attr_triggers.delete(trigger_types - %i[addition_triggers
-                           removal_triggers
-                           attr_triggers])
+                                              removal_triggers
+                                              attr_triggers])
     else
       # remove attr from component_or_manager
       (trigger_types - %i[addition_triggers removal_triggers attr_triggers]).each do |attr|
@@ -1495,7 +1495,7 @@
 
 
       
diff --git a/docs/_index.html b/docs/_index.html
index 8e128ed..8b6dad0 100644
--- a/docs/_index.html
+++ b/docs/_index.html
@@ -178,7 +178,7 @@
 
 
       
diff --git a/docs/file.README.html b/docs/file.README.html
index 6da1a7c..4218261 100644
--- a/docs/file.README.html
+++ b/docs/file.README.html
@@ -63,11 +63,11 @@
 
 

Maintainability Test Coverage -Inline docs MIT License -Ko-Fi

+Ko-Fi +<!--Inline docs--> <!-- this is busted -->

-

Check out the comprehensive documentation here!

+

Check out the comprehensive documentation here!


@@ -92,6 +92,7 @@
  • Accessing
  • Adding and Removing Components
  • Accessing Entities' Attached Components
  • +
  • Iterating Over Grouped Entities
  • Deletion
  • Components @@ -246,6 +247,32 @@ If you need to you can access Entities using the Entities module:@entity.components[@component_manager] # => [@component1, @component2, @component3]
  • +

    Iterating Over Grouped Entities

    + +

    You can execute a block for each entity that has all matching component types attached to it like so:

    + +
    FelECS::Entities.group(@component_manager_one, @component_manager_two).do |cmp1, cmp2, ent|
    +    # do stuff with the components and entity
    +end
    +
    +# or
    +
    +FelECS::Entities.group(@mgr1, @mgr2, @mgr3, @mgr4).do |cmp1, cmp2, cmp3, cmp4, ent|
    +    # do stuff with the components and entity
    +end
    +
    +# or
    +
    +FelECS::Entities.group(@component_manager_one).do |cmp1, ent|
    +    # do stuff with the component and entity
    +end
    +
    +# etc
    +
    + +

    You can use any number of component managers and it will only iterate over all entities that have at least all these components from these managers attached to them. The arguments in the block(the arguments surrounded by |pipes|) always correspond to each component manager passed as parameters into the group method and then followed by the entity object.
    +This means there will be a number of these arguments equal to the number of component managers passed into the group method plus one for the entity.

    +

    Deletion

    To have all Components from an Entity removed and the Entity deleted we do the following:

    @@ -550,7 +577,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera.

    diff --git a/docs/index.html b/docs/index.html index 2aeb172..f53468d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -63,11 +63,11 @@

    Maintainability Test Coverage -Inline docs MIT License -Ko-Fi

    +Ko-Fi +<!--Inline docs--> <!-- this is busted -->

    -

    Check out the comprehensive documentation here!

    +

    Check out the comprehensive documentation here!


    @@ -92,6 +92,7 @@
  • Accessing
  • Adding and Removing Components
  • Accessing Entities' Attached Components
  • +
  • Iterating Over Grouped Entities
  • Deletion
  • Components @@ -246,6 +247,32 @@ If you need to you can access Entities using the Entities module:@entity.components[@component_manager] # => [@component1, @component2, @component3] +

    Iterating Over Grouped Entities

    + +

    You can execute a block for each entity that has all matching component types attached to it like so:

    + +
    FelECS::Entities.group(@component_manager_one, @component_manager_two).do |cmp1, cmp2, ent|
    +    # do stuff with the components and entity
    +end
    +
    +# or
    +
    +FelECS::Entities.group(@mgr1, @mgr2, @mgr3, @mgr4).do |cmp1, cmp2, cmp3, cmp4, ent|
    +    # do stuff with the components and entity
    +end
    +
    +# or
    +
    +FelECS::Entities.group(@component_manager_one).do |cmp1, ent|
    +    # do stuff with the component and entity
    +end
    +
    +# etc
    +
    + +

    You can use any number of component managers and it will only iterate over all entities that have at least all these components from these managers attached to them. The arguments in the block(the arguments surrounded by |pipes|) always correspond to each component manager passed as parameters into the group method and then followed by the entity object.
    +This means there will be a number of these arguments equal to the number of component managers passed into the group method plus one for the entity.

    +

    Deletion

    To have all Components from an Entity removed and the Entity deleted we do the following:

    @@ -550,7 +577,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera.

    diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html index b359611..3515d3c 100644 --- a/docs/top-level-namespace.html +++ b/docs/top-level-namespace.html @@ -127,7 +127,7 @@ -- cgit v1.2.3