Fix mauryan pillar of ashoka GUI panel bug. Refs #3639.

It can only be built while ashoka is alive.
Previously the structure was selectable from the panel but not placable
while he was absent.

This was SVN commit r17577.
This commit is contained in:
elexis 2015-12-31 12:19:45 +00:00
parent f7a262fa4a
commit 460f17e6f7

View File

@ -1337,9 +1337,9 @@ function getEntityLimitAndCount(playerState, entType)
entCategory = template.trainingRestrictions.category;
else if (template.buildRestrictions)
entCategory = template.buildRestrictions.category;
if (entCategory && playerState.entityLimits[entCategory] != null)
if (entCategory && playerState.entityLimits[entCategory] !== undefined)
{
r.entLimit = playerState.entityLimits[entCategory] || Infinity;
r.entLimit = playerState.entityLimits[entCategory] || 0;
r.entCount = playerState.entityCounts[entCategory] || 0;
r.entLimitChangers = playerState.entityLimitChangers[entCategory];
r.canBeAddedCount = Math.max(r.entLimit - r.entCount, 0);