summaryrefslogtreecommitdiffhomepage
path: root/docs/FelFlame/Entities.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/FelFlame/Entities.html')
-rw-r--r--docs/FelFlame/Entities.html266
1 files changed, 42 insertions, 224 deletions
diff --git a/docs/FelFlame/Entities.html b/docs/FelFlame/Entities.html
index 0d7b483..f789cb3 100644
--- a/docs/FelFlame/Entities.html
+++ b/docs/FelFlame/Entities.html
@@ -109,9 +109,7 @@
<h2>Overview</h2><div class="docstring">
<div class="discussion">
-<p>Creates and manages Entities. Allows accessing Entities using their <span class='object_link'><a href="#id-instance_method" title="FelFlame::Entities#id (method)">ID</a></span></p>
-
-<p>TODO: Improve Entity overview</p>
+<p>Creates and manages Entities. Allows accessing Entities using their <span class='object_link'><a href="#id-instance_method" title="FelFlame::Entities#id (method)">ID</a></span>. Entities are just collections of Components.</p>
</div>
@@ -216,30 +214,6 @@
</li>
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#from_json-class_method" title="from_json (class method)">.<strong>from_json</strong>(json_string, **opts) &#x21d2; Object </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>Creates a new entity using the data from a JSON string TODO: This function is not yet complete.</p>
-</div></span>
-
-</li>
-
-
</ul>
<h2>
@@ -276,7 +250,7 @@
<li class="public ">
<span class="summary_signature">
- <a href="#components-instance_method" title="#components (instance method)">#<strong>components</strong> &#x21d2; Hash </a>
+ <a href="#components-instance_method" title="#components (instance method)">#<strong>components</strong> &#x21d2; Hash&lt;Component_Manager, Array&lt;Integer&gt;&gt; </a>
@@ -291,7 +265,7 @@
<span class="summary_desc"><div class='inline'>
-<p>A hash that uses component manager constant names as keys, and where the values of those keys are arrays that contain the <span class='object_link'><a href="Helper/ComponentManager.html#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">IDs</a></span> of the components attached to this entity.</p>
+<p>A hash that uses component manager constant names as keys, and where the values of those keys are arrays that contain the <span class='object_link'><a href="ComponentManager.html#id-instance_method" title="FelFlame::ComponentManager#id (method)">IDs</a></span> of the components attached to this entity.</p>
</div></span>
</li>
@@ -395,30 +369,6 @@
</li>
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#to_json-instance_method" title="#to_json (instance method)">#<strong>to_json</strong> &#x21d2; String </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>Export all data into a JSON String which can then be saved into a file TODO: This function is not yet complete.</p>
-</div></span>
-
-</li>
-
-
</ul>
@@ -482,10 +432,7 @@
23
24
25
-26
-27
-28
-29</pre>
+26</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'entity_manager.rb', line 16</span>
@@ -497,9 +444,6 @@
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='id identifier rubyid_new_id'>new_id</span>
<span class='comment'># Add each component
-</span> <span class='comment'>#components.uniq.each do |component|
-</span> <span class='comment'># add component
-</span> <span class='comment'>#end
</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span>
@@ -645,12 +589,12 @@
<pre class="lines">
-119
-120
-121</pre>
+117
+118
+119</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 119</span>
+ <pre class="code"><span class="info file"># File 'entity_manager.rb', line 117</span>
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_entity_id'>entity_id</span><span class='rparen'>)</span>
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_entity_id'>entity_id</span><span class='rbracket'>]</span>
@@ -699,12 +643,12 @@
<pre class="lines">
-126
-127
-128</pre>
+124
+125
+126</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 126</span>
+ <pre class="code"><span class="info file"># File 'entity_manager.rb', line 124</span>
<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
@@ -714,79 +658,6 @@
</table>
</div>
- <div class="method_details ">
- <h3 class="signature " id="from_json-class_method">
-
- .<strong>from_json</strong>(json_string, **opts) &#x21d2; <tt>Object</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>Creates a new entity using the data from a JSON string TODO: This function is not yet complete</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>json_string</span>
-
-
- <span class='type'>(<tt>String</tt>)</span>
-
-
-
- &mdash;
- <div class='inline'>
-<p>A string that was exported originally using the <span class='object_link'><a href="#to_json-instance_method" title="FelFlame::Entities#to_json (method)">to_json</a></span> function</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>opts</span>
-
-
- <span class='type'>(<tt>Keywords</tt>)</span>
-
-
-
- &mdash;
- <div class='inline'>
-<p>What values(its <span class='object_link'><a href="#id-instance_method" title="FelFlame::Entities#id (method)">ID</a></span> or the <span class='object_link'><a href="Helper/ComponentManager.html#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">component IDs</a></span>) should be overwritten TODO: this might change</p>
-</div>
-
- </li>
-
-</ul>
-
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-134</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 134</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_from_json'>from_json</span><span class='lparen'>(</span><span class='id identifier rubyid_json_string'>json_string</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
</div>
<div id="instance_method_details" class="method_details_list">
@@ -844,7 +715,7 @@
&mdash;
<div class='inline'>
-<p>true if component is added, false if it already is attached or no components given</p>
+<p><code>true</code></p>
</div>
</li>
@@ -857,6 +728,9 @@
<pre class="lines">
+58
+59
+60
61
62
63
@@ -867,12 +741,10 @@
68
69
70
-71
-72
-73</pre>
+71</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 61</span>
+ <pre class="code"><span class="info file"># File 'entity_manager.rb', line 58</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components_to_add'>components_to_add</span><span class='rparen'>)</span>
<span class='id identifier rubyid_components_to_add'>components_to_add</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
@@ -886,6 +758,7 @@
<span class='id identifier rubyid_check_systems'>check_systems</span> <span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='symbol'>:addition_triggers</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
+ <span class='kw'>true</span>
<span class='kw'>end</span></pre>
</td>
</tr>
@@ -895,7 +768,7 @@
<div class="method_details ">
<h3 class="signature " id="components-instance_method">
- #<strong>components</strong> &#x21d2; <tt>Hash</tt>
+ #<strong>components</strong> &#x21d2; <tt>Hash&lt;Component_Manager, Array&lt;Integer&gt;&gt;</tt>
@@ -904,7 +777,7 @@
</h3><div class="docstring">
<div class="discussion">
-<p>A hash that uses component manager constant names as keys, and where the values of those keys are arrays that contain the <span class='object_link'><a href="Helper/ComponentManager.html#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">IDs</a></span> of the components attached to this entity.</p>
+<p>A hash that uses component manager constant names as keys, and where the values of those keys are arrays that contain the <span class='object_link'><a href="ComponentManager.html#id-instance_method" title="FelFlame::ComponentManager#id (method)">IDs</a></span> of the components attached to this entity.</p>
</div>
@@ -917,7 +790,7 @@
<li>
- <span class='type'>(<tt>Hash</tt>)</span>
+ <span class='type'>(<tt>Hash&lt;Component_Manager, Array&lt;Integer&gt;&gt;</tt>)</span>
@@ -931,12 +804,12 @@
<pre class="lines">
-33
-34
-35</pre>
+30
+31
+32</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 33</span>
+ <pre class="code"><span class="info file"># File 'entity_manager.rb', line 30</span>
<span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span>
<span class='ivar'>@components</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
@@ -977,7 +850,7 @@
&mdash;
<div class='inline'>
-<p>true.</p>
+<p><code>true</code></p>
</div>
</li>
@@ -990,6 +863,9 @@
<pre class="lines">
+42
+43
+44
45
46
47
@@ -998,13 +874,10 @@
50
51
52
-53
-54
-55
-56</pre>
+53</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 45</span>
+ <pre class="code"><span class="info file"># File 'entity_manager.rb', line 42</span>
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span>
<span class='id identifier rubyid_components'>components</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component_manager'>component_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_component_array'>component_array</span><span class='op'>|</span>
@@ -1074,7 +947,7 @@
&mdash;
<div class='inline'>
-<p>true if at least one component is removed, false if none of them were attached to the component</p>
+<p><code>true</code></p>
</div>
</li>
@@ -1087,17 +960,17 @@
<pre class="lines">
+88
+89
90
91
92
93
94
-95
-96
-97</pre>
+95</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 90</span>
+ <pre class="code"><span class="info file"># File 'entity_manager.rb', line 88</span>
<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components_to_remove'>components_to_remove</span><span class='rparen'>)</span>
<span class='id identifier rubyid_components_to_remove'>components_to_remove</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
@@ -1151,12 +1024,12 @@
<pre class="lines">
-39
-40
-41</pre>
+36
+37
+38</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 39</span>
+ <pre class="code"><span class="info file"># File 'entity_manager.rb', line 36</span>
<span class='kw'>def</span> <span class='id identifier rubyid_to_i'>to_i</span>
<span class='id identifier rubyid_id'>id</span>
@@ -1166,67 +1039,12 @@
</table>
</div>
- <div class="method_details ">
- <h3 class="signature " id="to_json-instance_method">
-
- #<strong>to_json</strong> &#x21d2; <tt>String</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>Export all data into a JSON String which can then be saved into a file TODO: This function is not yet complete</p>
-
-
- </div>
-</div>
-<div class="tags">
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>String</tt>)</span>
-
-
-
- &mdash;
- <div class='inline'>
-<p>A JSON formatted String</p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-102</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'entity_manager.rb', line 102</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
</div>
</div>
<div id="footer">
- Generated on Wed Jul 7 01:04:28 2021 by
+ Generated on Wed Jul 7 17:45:24 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-2.7.3).
</div>