mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Updated warps
This commit is contained in:
@@ -362,8 +362,12 @@ Store.set(player_scores,game.player,<span class="number">10</span>) <span class=
|
||||
<td class="summary">Used to update all values that are in a store, similar to Store.update but acts on all keys at once, will trigger watchers for every key present</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#trigger">trigger(store[, key][, value])</a></td>
|
||||
<td class="summary">Used to trigger any watchers that are on this store, the key and value are passed to the watcher functions</td>
|
||||
<td class="name"><a href="#trigger">trigger(store[, key])</a></td>
|
||||
<td class="summary">Used to trigger watcher functions, this may be used to trigger them if you did not use Store.update or Store.set</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#raw_trigger">raw_trigger(store[, key][, value])</a></td>
|
||||
<td class="summary">Used to trigger watcher functions, the value and key are passed directly to the watchers regardless if the value is correct</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1252,13 +1256,87 @@ Store.set(player_scores,game.player,<span class="number">10</span>) <span class=
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#trigger" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="trigger">trigger(store[, key][, value])</span>
|
||||
<span class="section-item-title" id="trigger">trigger(store[, key])</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Used to trigger any watchers that are on this store, the key and value are passed to the watcher functions</p>
|
||||
<p class="section-item-summary">Used to trigger watcher functions, this may be used to trigger them if you did not use Store.update or Store.set</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
<strong>Parameters:</strong>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>store</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.3.html">number</a></span>)
|
||||
|
||||
the uid of the store that you want to trigger
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="section-subitem-li">
|
||||
|
||||
<strong><em>key</em></strong>
|
||||
|
||||
<strong> : </strong>
|
||||
|
||||
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a> or <span class="type">any</span></span>)
|
||||
|
||||
the key that you want to trigger, must be a string unless you have a serializer
|
||||
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- parameters end -->
|
||||
|
||||
<!-- returns start -->
|
||||
<!-- returns end -->
|
||||
|
||||
|
||||
<!-- see also start -->
|
||||
<!-- see also end -->
|
||||
|
||||
<!-- usage start -->
|
||||
<strong>Usage:</strong>
|
||||
<pre class="code" data-lang="Lua"><code><span class="comment">-- Faking the update to a store
|
||||
</span><span class="comment">-- The type of store we use does not really matter for this as long as you pass it what you watchers are expecting
|
||||
</span><span class="keyword">local</span> scenario_diffculty = Store.register()
|
||||
|
||||
<span class="comment">-- Trigger the watchers with a fake change of diffculty
|
||||
</span>Store.trigger(scenario_diffculty)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<div class="divider divider-custom"></div>
|
||||
<div class="block section-item-header">
|
||||
<a href="#raw_trigger" class="fragment-hashtag">#</a>
|
||||
<span class="section-item-title" id="raw_trigger">raw_trigger(store[, key][, value])</span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="section-item-body">
|
||||
|
||||
<p class="section-item-summary">Used to trigger watcher functions, the value and key are passed directly to the watchers regardless if the value is correct</p>
|
||||
<p class="section-item-description"></p>
|
||||
|
||||
<!-- parameters start -->
|
||||
@@ -1336,7 +1414,7 @@ Store.set(player_scores,game.player,<span class="number">10</span>) <span class=
|
||||
|
||||
<span class="comment">-- Trigger the watchers with a fake change of diffculty
|
||||
</span><span class="comment">-- This is mostly used internally but it can be useful in other cases
|
||||
</span>Store.trigger(scenario_diffculty,<span class="keyword">nil</span>,<span class="string">'normal'</span>)</code></pre>
|
||||
</span>Store.raw_trigger(scenario_diffculty,<span class="keyword">nil</span>,<span class="string">'normal'</span>)</code></pre>
|
||||
<!-- usage end -->
|
||||
|
||||
</dd>
|
||||
@@ -1355,7 +1433,7 @@ Store.set(player_scores,game.player,<span class="number">10</span>) <span class=
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
||||
</div>
|
||||
<div class="content-footer column col-9 col-sm-12">
|
||||
<i>Last updated 2019-10-11 23:24:57 UTC</i>
|
||||
<i>Last updated 2019-10-13 00:25:15 UTC</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user