From 460f17e6f75844c11b799573fda8c390b1e561d2 Mon Sep 17 00:00:00 2001 From: elexis Date: Thu, 31 Dec 2015 12:19:45 +0000 Subject: [PATCH] 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. --- binaries/data/mods/public/gui/session/input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binaries/data/mods/public/gui/session/input.js b/binaries/data/mods/public/gui/session/input.js index 9a381cc277..090144333f 100644 --- a/binaries/data/mods/public/gui/session/input.js +++ b/binaries/data/mods/public/gui/session/input.js @@ -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);