From 03d9234c16714e0c0963d9f52b819ff1948d9c45 Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 29 Dec 2021 06:10:49 -0500 Subject: replaced sort_by! with sort_by --- docs/FelFlame.html | 2 +- docs/FelFlame/ComponentManager.html | 2 +- docs/FelFlame/Components.html | 2 +- docs/FelFlame/Entities.html | 2 +- docs/FelFlame/Scenes.html | 6 +++--- docs/FelFlame/Stage.html | 4 ++-- docs/FelFlame/Systems.html | 2 +- docs/Felflame_.html | 2 +- docs/_index.html | 2 +- docs/file.README.html | 12 +++++++----- docs/index.html | 12 +++++++----- docs/top-level-namespace.html | 2 +- lib/felflame/scene_manager.rb | 4 ++-- lib/felflame/stage_manager.rb | 4 ++-- lib/felflame/system_manager.rb | 2 +- 15 files changed, 32 insertions(+), 28 deletions(-) diff --git a/docs/FelFlame.html b/docs/FelFlame.html index 16bb6f9..ba3cf89 100644 --- a/docs/FelFlame.html +++ b/docs/FelFlame.html @@ -307,7 +307,7 @@ diff --git a/docs/FelFlame/ComponentManager.html b/docs/FelFlame/ComponentManager.html index 1da6816..95c9fe4 100644 --- a/docs/FelFlame/ComponentManager.html +++ b/docs/FelFlame/ComponentManager.html @@ -1619,7 +1619,7 @@ diff --git a/docs/FelFlame/Components.html b/docs/FelFlame/Components.html index a44ec31..4ebd2dc 100644 --- a/docs/FelFlame/Components.html +++ b/docs/FelFlame/Components.html @@ -421,7 +421,7 @@ diff --git a/docs/FelFlame/Entities.html b/docs/FelFlame/Entities.html index 9d10529..306b98e 100644 --- a/docs/FelFlame/Entities.html +++ b/docs/FelFlame/Entities.html @@ -1042,7 +1042,7 @@ diff --git a/docs/FelFlame/Scenes.html b/docs/FelFlame/Scenes.html index 41e369e..a78044b 100644 --- a/docs/FelFlame/Scenes.html +++ b/docs/FelFlame/Scenes.html @@ -550,7 +550,7 @@ def add(*systems_to_add) self.systems |= systems_to_add - systems.sort_by!(&:priority) + self.systems = systems.sort_by(&:priority) FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self true end @@ -739,7 +739,7 @@ def remove(*systems_to_remove) self.systems -= systems_to_remove - systems.sort_by!(&:priority) + self.systems = systems.sort_by(&:priority) FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self true end @@ -753,7 +753,7 @@ diff --git a/docs/FelFlame/Stage.html b/docs/FelFlame/Stage.html index 65fe2f4..50e9dcb 100644 --- a/docs/FelFlame/Stage.html +++ b/docs/FelFlame/Stage.html @@ -388,7 +388,7 @@ scenes_to_add.each do |scene| self.systems |= scene.systems end - systems.sort_by!(&:priority) + self.systems = systems.sort_by(&:priority) true end @@ -588,7 +588,7 @@ diff --git a/docs/FelFlame/Systems.html b/docs/FelFlame/Systems.html index f0f8d56..56e8aca 100644 --- a/docs/FelFlame/Systems.html +++ b/docs/FelFlame/Systems.html @@ -1531,7 +1531,7 @@ diff --git a/docs/Felflame_.html b/docs/Felflame_.html index 498cc3e..94ef230 100644 --- a/docs/Felflame_.html +++ b/docs/Felflame_.html @@ -133,7 +133,7 @@ diff --git a/docs/_index.html b/docs/_index.html index 70180bc..61b0c08 100644 --- a/docs/_index.html +++ b/docs/_index.html @@ -168,7 +168,7 @@ diff --git a/docs/file.README.html b/docs/file.README.html index b856937..132fb00 100644 --- a/docs/file.README.html +++ b/docs/file.README.html @@ -57,7 +57,9 @@
-

FelFlame

+

FelFlame

+ +

Maintainability Test Coverage @@ -143,7 +145,7 @@

  1. Engine Agnostic: FelFlame has been designed to be rendering engine agnostic as long as the target rendering engine is written in Ruby. This means that this framework can be dropped into existing rendering engines such as Ruby2D or DRGTK with little modifications.
  2. Easily Extensible: FelFlame has been designed such that extensions to its capabilities can be easily added. Extensions such as rendering engine wrappers, premade systems, premade components, etcetera can be easily coded and then distributed as gems.
  3. -
  4. Priciple of (My) Least Astonishment: I want to develop games using a language and framework I love and makes sense to me, inspired by the Philosophy of the creator of Ruby.
  5. +
  6. Principle of (My) Least Astonishment: I want to develop games using a language and framework I love and makes sense to me, inspired by the Philosophy of the creator of Ruby.

What is ECS?

@@ -325,7 +327,7 @@ Here are the ways to edit attrubutes, followed by the ways to read them.

We can create Systems like so:

-
FelFlame::Systems.new(name: 'Render', priority: 2) do
+
FelFlame::Systems.new('Render', priority: 2) do
   # Code and Logic
 end
 
@@ -341,7 +343,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera.

Often we will want to execute some logic on each Component in a given Component Manager so our code might look like this:

-
FelFlame::Systems.new(name: 'Render', priority: 2) do
+
FelFlame::Systems.new('Render', priority: 2) do
   FelFlame::Components::Sprites.each do |component|
     # do something with these components
   end
@@ -512,7 +514,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 14d70c2..5038a53 100644 --- a/docs/index.html +++ b/docs/index.html @@ -57,7 +57,9 @@
-

FelFlame

+

FelFlame

+ +

Maintainability Test Coverage @@ -143,7 +145,7 @@

  1. Engine Agnostic: FelFlame has been designed to be rendering engine agnostic as long as the target rendering engine is written in Ruby. This means that this framework can be dropped into existing rendering engines such as Ruby2D or DRGTK with little modifications.
  2. Easily Extensible: FelFlame has been designed such that extensions to its capabilities can be easily added. Extensions such as rendering engine wrappers, premade systems, premade components, etcetera can be easily coded and then distributed as gems.
  3. -
  4. Priciple of (My) Least Astonishment: I want to develop games using a language and framework I love and makes sense to me, inspired by the Philosophy of the creator of Ruby.
  5. +
  6. Principle of (My) Least Astonishment: I want to develop games using a language and framework I love and makes sense to me, inspired by the Philosophy of the creator of Ruby.

What is ECS?

@@ -325,7 +327,7 @@ Here are the ways to edit attrubutes, followed by the ways to read them.

We can create Systems like so:

-
FelFlame::Systems.new(name: 'Render', priority: 2) do
+
FelFlame::Systems.new('Render', priority: 2) do
   # Code and Logic
 end
 
@@ -341,7 +343,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera.

Often we will want to execute some logic on each Component in a given Component Manager so our code might look like this:

-
FelFlame::Systems.new(name: 'Render', priority: 2) do
+
FelFlame::Systems.new('Render', priority: 2) do
   FelFlame::Components::Sprites.each do |component|
     # do something with these components
   end
@@ -512,7 +514,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 38ed71e..7e418d2 100644 --- a/docs/top-level-namespace.html +++ b/docs/top-level-namespace.html @@ -129,7 +129,7 @@
diff --git a/lib/felflame/scene_manager.rb b/lib/felflame/scene_manager.rb index 315dd55..36ecedb 100644 --- a/lib/felflame/scene_manager.rb +++ b/lib/felflame/scene_manager.rb @@ -33,7 +33,7 @@ class FelFlame # @return [Boolean] +true+ def add(*systems_to_add) self.systems |= systems_to_add - systems.sort_by!(&:priority) + self.systems = systems.sort_by(&:priority) FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self true end @@ -42,7 +42,7 @@ class FelFlame # @return [Boolean] +true+ def remove(*systems_to_remove) self.systems -= systems_to_remove - systems.sort_by!(&:priority) + self.systems = systems.sort_by(&:priority) FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self true end diff --git a/lib/felflame/stage_manager.rb b/lib/felflame/stage_manager.rb index 87ee955..2939bd0 100644 --- a/lib/felflame/stage_manager.rb +++ b/lib/felflame/stage_manager.rb @@ -13,7 +13,7 @@ class FelFlame scenes_to_add.each do |scene| self.systems |= scene.systems end - systems.sort_by!(&:priority) + self.systems = systems.sort_by(&:priority) true end @@ -34,7 +34,7 @@ class FelFlame scenes.each do |scene| self.systems |= scene.systems end - systems.sort_by!(&:priority) + self.systems = systems.sort_by(&:priority) true end diff --git a/lib/felflame/system_manager.rb b/lib/felflame/system_manager.rb index cab2c4d..ac5b9c3 100644 --- a/lib/felflame/system_manager.rb +++ b/lib/felflame/system_manager.rb @@ -14,7 +14,7 @@ class FelFlame def priority=(priority) @priority = priority - FelFlame::Stage.systems.sort_by!(&:priority) + FelFlame::Stage.systems = FelFlame::Stage.systems.sort_by(&:priority) end # Stores references to components or their managers that trigger # this component when a component or component from that manager -- cgit v1.2.3