<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[store.getCapacity() is null on empty stores]]></title><description><![CDATA[<p><strong>Which shard is affected?</strong> 2</p>
<p><strong>What happened?</strong></p>
<p>using .getCapacity() without a parameter on an empty store returns null instead of the capacity of the store. however it seems like using .getCapacity(RESOURCE_ENERGY) for example returns the correct and expected value.</p>
<p><strong>What should have happened?</strong></p>
<p>.getCapacity() should always return the stores capacity</p>
<p><strong>How can we reproduce this?</strong></p>
<p>example by <a class="plugin-mentions-user plugin-mentions-a" href="http://screeps.com/forum/uid/5437">@JINPEI</a> from slack:</p>
<p><code>Game.rooms['E2N26'].find(FIND_STRUCTURES,{filter:(st)=&gt;(st.store &amp;&amp; st.store[RESOURCE_ENERGY]==0)})[0].store.getCapacity(); // and it returns null</code></p>
<p><code>Game.rooms['E2N26'].find(FIND_STRUCTURES,{filter:(st)=&gt;(st.store &amp;&amp; st.store[RESOURCE_ENERGY]&gt;0)})[0].store.getCapacity(); // returns 2000 (suppose a container)</code></p>
]]></description><link>http://screeps.com/forum/topic/2820/store-getcapacity-is-null-on-empty-stores</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 12:07:10 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/2820.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Oct 2019 10:26:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to store.getCapacity() is null on empty stores on Invalid Date]]></title><description><![CDATA[<p><strong>Which shard is affected?</strong> 2</p>
<p><strong>What happened?</strong></p>
<p>using .getCapacity() without a parameter on an empty store returns null instead of the capacity of the store. however it seems like using .getCapacity(RESOURCE_ENERGY) for example returns the correct and expected value.</p>
<p><strong>What should have happened?</strong></p>
<p>.getCapacity() should always return the stores capacity</p>
<p><strong>How can we reproduce this?</strong></p>
<p>example by <a class="plugin-mentions-user plugin-mentions-a" href="http://screeps.com/forum/uid/5437">@JINPEI</a> from slack:</p>
<p><code>Game.rooms['E2N26'].find(FIND_STRUCTURES,{filter:(st)=&gt;(st.store &amp;&amp; st.store[RESOURCE_ENERGY]==0)})[0].store.getCapacity(); // and it returns null</code></p>
<p><code>Game.rooms['E2N26'].find(FIND_STRUCTURES,{filter:(st)=&gt;(st.store &amp;&amp; st.store[RESOURCE_ENERGY]&gt;0)})[0].store.getCapacity(); // returns 2000 (suppose a container)</code></p>
]]></description><link>http://screeps.com/forum/post/14232</link><guid isPermaLink="true">http://screeps.com/forum/post/14232</guid><dc:creator><![CDATA[qnz]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to store.getCapacity() is null on empty stores on Invalid Date]]></title><description><![CDATA[<p>Could you please provide the structure ID?</p>
]]></description><link>http://screeps.com/forum/post/14233</link><guid isPermaLink="true">http://screeps.com/forum/post/14233</guid><dc:creator><![CDATA[artch]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to store.getCapacity() is null on empty stores on Invalid Date]]></title><description><![CDATA[<p>the sample isnt mine so i cant sadly, however i noticed this behavior on all my spawns/extensions if that helps?</p>
]]></description><link>http://screeps.com/forum/post/14235</link><guid isPermaLink="true">http://screeps.com/forum/post/14235</guid><dc:creator><![CDATA[qnz]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to store.getCapacity() is null on empty stores on Invalid Date]]></title><description><![CDATA[<p>This is intended behavior for spawns and extensions. They are not general-purpose stores, so <code>getCapacity</code> without the param returns <code>null</code>.</p>
]]></description><link>http://screeps.com/forum/post/14244</link><guid isPermaLink="true">http://screeps.com/forum/post/14244</guid><dc:creator><![CDATA[artch]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>