add Carte Blanche trinket: equip system, gatekeeper multi-slot, mini tooltip portal; new token type Token.CARTE ('carte') with fa-money-check icon; migrations 0010-0012:
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

CARTE type, User.equipped_trinket FK, Token.slots_claimed field; post_save signal sets
equipped_trinket=COIN for new users, PASS for staff; kit bag now shows only the equipped
trinket in Trinkets section; Game Kit applet mini tooltip portal shows Equipped or Equip
Trinket per token; AJAX POST equip-trinket id updates equippedId in-place; equip btn
now works for COIN, PASS, and CARTE (data-token-id added to all three); Gatekeeper CARTE
flow: drop_token sets current_room (no slot reserved); each empty slot up to
slots_claimed+1 gets a drop-token-btn; slots_claimed high-water mark advances on fill,
never decrements; highest CARTE-filled slot gets NVM (release_slot); token_return_btn
resets current_room + slots_claimed + un-fills all CARTE slots; gate_status always returns
full template so launch-game-btn persists via HTMX when gate_status == OPEN; room.html
includes gatekeeper when GATHERING or OPEN; new FT test_trinket_carte_blanche.py (2
tests, both passing); 299 tests green
This commit is contained in:
Disco DeDisco
2026-03-16 00:07:52 -04:00
parent b49218b45b
commit 4239245902
26 changed files with 842 additions and 105 deletions

View File

@@ -1,31 +1,36 @@
{% if tokens %}
{% if equipped_trinket or free_token or tithe_token %}
<div class="kit-bag-section">
<span class="kit-bag-label">Trinkets</span>
<div class="kit-bag-row">
{% for token in tokens %}
{% if token.token_type == "coin" or token.token_type == "pass" %}
<div
class="token"
draggable="true"
data-token-id="{{ token.id }}"
data-token-type="{{ token.token_type }}"
>
{% if token.token_type == "coin" %}
<i class="fa-solid fa-medal"></i>
{% else %}
<i class="fa-solid fa-clipboard"></i>
{% endif %}
<div class="token-tooltip">
<h4>{{ token.tooltip_name }}</h4>
<p>{{ token.tooltip_description }}</p>
{% if token.tooltip_shoptalk %}
<small><em>{{ token.tooltip_shoptalk }}</em></small>
{% endif %}
<p class="expiry">{{ token.tooltip_expiry }}</p>
</div>
</div>
{% if equipped_trinket %}
{% with token=equipped_trinket %}
<div
class="token"
draggable="true"
data-token-id="{{ token.id }}"
data-token-type="{{ token.token_type }}"
>
{% if token.token_type == "coin" %}
<i class="fa-solid fa-medal"></i>
{% elif token.token_type == "carte" %}
<i class="fa-solid fa-money-check"></i>
{% else %}
<i class="fa-solid fa-clipboard"></i>
{% endif %}
{% endfor %}
<div class="token-tooltip">
<h4>{{ token.tooltip_name }}</h4>
<p>{{ token.tooltip_description }}</p>
{% if token.tooltip_shoptalk %}
<small><em>{{ token.tooltip_shoptalk }}</em></small>
{% endif %}
<p class="expiry">{{ token.tooltip_expiry }}</p>
{% with room_html=token.tooltip_room_html %}
{% if room_html %}{{ room_html|safe }}{% endif %}
{% endwith %}
</div>
</div>
{% endwith %}
{% endif %}
</div>
</div>
<div class="kit-bag-section">
@@ -42,6 +47,9 @@
<div class="token-tooltip">
<h4>{{ free_token.tooltip_name }}{% if free_count > 1 %} <span class="token-count">(×{{ free_count }})</span>{% endif %}</h4>
<p>{{ free_token.tooltip_description }}</p>
{% if free_token.tooltip_shoptalk %}
<small><em>{{ free_token.tooltip_shoptalk }}</em></small>
{% endif %}
<p class="expiry">{{ free_token.tooltip_expiry }}</p>
</div>
</div>