forked from 0ad/0ad
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:
parent
f7a262fa4a
commit
460f17e6f7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user