forked from retoor/devplacepy
Every purchase/upgrade path (new and pre-existing) is now race-safe against concurrent requests via atomic conditional SQL updates. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
18 lines
809 B
HTML
18 lines
809 B
HTML
{% for infra in farm.infrastructure %}
|
|
<div class="perk-card">
|
|
<span class="perk-icon" aria-hidden="true">{{ infra.icon }}</span>
|
|
<strong class="perk-name">{{ infra.name }}</strong>
|
|
<span class="perk-effect">{{ infra.description }}</span>
|
|
{% if infra.owned %}
|
|
<span class="perk-maxed">Owned</span>
|
|
{% elif farm.prestige < infra.min_prestige %}
|
|
<span class="perk-maxed">Requires prestige {{ infra.min_prestige }}</span>
|
|
{% else %}
|
|
<form method="post" action="/game/infrastructure/buy" data-game-action="infrastructure">
|
|
<input type="hidden" name="key" value="{{ infra.key }}">
|
|
<button type="submit" class="btn btn-sm" data-confirm="Buy {{ infra.name }} for {{ infra.cost }}c?">Buy ({{ infra.cost }}c)</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|