[Feature] Actor Directory subtitles (#1332)

* Show subtitles for various actor types in actor directory

* Show adversary and environment type

* Update companion subtitles

* Fallback adversay and environment label to item type label
This commit is contained in:
Carlos Fernandez 2025-11-26 19:38:11 -08:00 committed by GitHub
parent b4c2034789
commit 630ba5ab7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,19 @@
<li class="directory-item entry document {{@root.documentCls}} flexrow" data-entry-id="{{id}}">
{{#if thumbnail}}
<img class="thumbnail" src="{{thumbnail}}" alt="{{name}}" loading="lazy">
{{/if}}
<a class="entry-name ellipsis" data-action="activateEntry">
<span>{{name}}</span>
{{#if (or (eq type "adversary") (eq type "environment"))}}
<span class="entry-subtitle">{{localize "DAGGERHEART.UI.Sidebar.actorDirectory.tier" tier=system.tier type=(@root.getTypeLabel this)}}</span>
{{else if (eq type "character")}}
<span class="entry-subtitle">{{localize "DAGGERHEART.UI.Sidebar.actorDirectory.character" level=system.levelData.level.current}}</span>
{{else if (eq type "companion")}}
{{#if system.partner}}
<span class="entry-subtitle">{{localize "DAGGERHEART.UI.Sidebar.actorDirectory.companion" level=system.levelData.level.current partner=system.partner.name}}</span>
{{else}}
<span class="entry-subtitle">{{localize "DAGGERHEART.UI.Sidebar.actorDirectory.companionNoPartner"}}</span>
{{/if}}
{{/if}}
</a>
</li>