summaryrefslogtreecommitdiff
path: root/views/village.twig
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-12-02 14:14:34 +0100
committerDaniel Weipert <code@drogueronin.de>2023-12-02 14:14:34 +0100
commite5a243a52b910e35b10b26c06aa8978356b86769 (patch)
tree74ddb82add2f3ea200e9fd11cfedb6c0cace09be /views/village.twig
parentfa9096c0ab521aae45cab6c48a54290d14a221b9 (diff)
login and events
Diffstat (limited to 'views/village.twig')
-rw-r--r--views/village.twig16
1 files changed, 11 insertions, 5 deletions
diff --git a/views/village.twig b/views/village.twig
index d2b8a4e..97d65f7 100644
--- a/views/village.twig
+++ b/views/village.twig
@@ -84,7 +84,8 @@
</tr>
</thead>
<tbody>
- {% for event in events['UpgradeBuilding'] %}
+ {% for typeEvents in events['UpgradeBuilding'] %}
+ {% for event in typeEvents %}
<tr>
<td>{{ event.type }}</td>
<td class="timer">
@@ -97,6 +98,7 @@
</td>
</tr>
{% endfor %}
+ {% endfor %}
</tbody>
</table>
{% endif %}
@@ -190,21 +192,21 @@
<tr class="village__buildings__row">
<td>{{ building.type | default(type) }}</td>
<td>{{ building.level | default(0) }}</td>
- <td>{{ building.getBuildTime() | buildTime }}</td>
+ <td>{{ building.getBuildTimeForLevel(building.getEffectiveLevel() + 1) | buildTime }}</td>
<td class="resources">
<span>
<i class="icon icon-wood"></i>
- {{ building.getResourceRequirements()['wood'] }}
+ {{ building.getResourceRequirementsForLevel(building.getEffectiveLevel() + 1)['wood'] }}
</span>
&nbsp;
<span>
<i class="icon icon-clay"></i>
- {{ building.getResourceRequirements()['clay'] }}
+ {{ building.getResourceRequirementsForLevel(building.getEffectiveLevel() + 1)['clay'] }}
</span>
&nbsp;
<span>
<i class="icon icon-iron"></i>
- {{ building.getResourceRequirements()['iron'] }}
+ {{ building.getResourceRequirementsForLevel(building.getEffectiveLevel() + 1)['iron'] }}
</span>
</td>
<td>
@@ -235,6 +237,7 @@
<tr>
<td>{{ unit.type }}</td>
<td>{{ unit.amount }}</td>
+ {% if not unit.isTraveling %}
<td>
{{ unit.getBuildTime(1) | buildTime }}
</td>
@@ -265,6 +268,9 @@
<input type="submit" value="Train" {{ village.canTrain(village, unit, 1) ? '' : 'disabled' }}>
</form>
</td>
+ {% else %}
+ <td>~traveling~</td>
+ {% endif %}
</tr>
{% endfor %}
</tbody>