mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
[Feature] NPC Actors (#1949)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
c23ac61ee5
commit
53f15a7fde
32 changed files with 548 additions and 29 deletions
13
templates/sheets-settings/npc-settings/details.hbs
Normal file
13
templates/sheets-settings/npc-settings/details.hbs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<section
|
||||
class='tab {{tabs.details.cssClass}} {{tabs.details.id}}'
|
||||
data-tab='{{tabs.details.id}}'
|
||||
data-group='{{tabs.details.group}}'
|
||||
>
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
|
||||
{{formInput systemFields.description value=document._source.system.description}}
|
||||
</fieldset>
|
||||
|
||||
{{formGroup systemFields.motives value=document._source.system.motives}}
|
||||
{{formGroup systemFields.difficulty value=document._source.system.difficulty localize=true}}
|
||||
</section>
|
||||
29
templates/sheets-settings/npc-settings/features.hbs
Normal file
29
templates/sheets-settings/npc-settings/features.hbs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<section
|
||||
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
||||
data-tab='{{tabs.features.id}}'
|
||||
data-group='{{tabs.features.group}}'
|
||||
>
|
||||
<button type="button" class="add-feature-btn" data-action="createDoc" data-document-class="Item" data-type="feature">
|
||||
{{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
|
||||
</button>
|
||||
<fieldset>
|
||||
<legend>{{localize tabs.features.label}}</legend>
|
||||
<ul class="feature-list">
|
||||
{{#each @root.features as |feature|}}
|
||||
<li class="feature-item" id="{{feature.id}}" draggable="true">
|
||||
<img src="{{feature.img}}" alt="">
|
||||
<div class="label">
|
||||
<span>{{feature.name}}</span>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<a data-action="editDoc" data-item-uuid="{{feature.uuid}}" data-tooltip="{{localize 'CONTROLS.CommonEdit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||
<a data-action="deleteDoc" data-item-uuid="{{feature.uuid}}" data-tooltip="{{localize 'CONTROLS.CommonDelete'}}"><i class="fa-solid fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<div class="features-dragger">
|
||||
<span>{{localize "DAGGERHEART.GENERAL.dropFeaturesHere"}}</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</section>
|
||||
3
templates/sheets-settings/npc-settings/header.hbs
Normal file
3
templates/sheets-settings/npc-settings/header.hbs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<header class="dialog-header">
|
||||
<h1>{{document.name}}</h1>
|
||||
</header>
|
||||
|
|
@ -44,10 +44,9 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="adversary-navigation">
|
||||
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
<button type="button" data-action="openSettings" data-tooltip-text="{{localize "DAGGERHEART.UI.Tooltip.openSheetSettings"}}">
|
||||
<i class="fa-solid fa-wrench"></i>
|
||||
</button>
|
||||
</div>
|
||||
{{/ 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
</header>
|
||||
|
|
@ -50,9 +50,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="companion-navigation">
|
||||
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
<button type="button" data-action="openSettings" data-tooltip-text="{{localize "DAGGERHEART.UI.Tooltip.openSheetSettings"}}">
|
||||
<i class="fa-solid fa-wrench"></i>
|
||||
</button>
|
||||
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
<button type="button" data-action="openSettings" data-tooltip-text="{{localize "DAGGERHEART.UI.Tooltip.openSheetSettings"}}">
|
||||
<i class="fa-solid fa-wrench"></i>
|
||||
</button>
|
||||
{{/ 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -44,9 +44,10 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="environment-navigation">
|
||||
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
<button type="button" data-action="openSettings">
|
||||
<i class="fa-solid fa-wrench"></i>
|
||||
</button>
|
||||
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
<button type="button" data-action="openSettings">
|
||||
<i class="fa-solid fa-wrench"></i>
|
||||
</button>
|
||||
{{/ 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
</div>
|
||||
</header>
|
||||
14
templates/sheets/actors/npc/features.hbs
Normal file
14
templates/sheets/actors/npc/features.hbs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
|
||||
data-group='{{tabs.features.group}}'>
|
||||
<div class="feature-section">
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title=tabs.features.label
|
||||
type='feature'
|
||||
collection=@root.features
|
||||
hideContextMenu=true
|
||||
hideModifyControls=true
|
||||
canCreate=@root.editable
|
||||
showActions=@root.editable
|
||||
}}
|
||||
</div>
|
||||
</section>
|
||||
40
templates/sheets/actors/npc/header.hbs
Normal file
40
templates/sheets/actors/npc/header.hbs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<header class='npc-header-sheet'>
|
||||
<div class="portrait">
|
||||
<img src="{{source.img}}" alt="{{source.name}}" data-action='editImage' data-edit="img">
|
||||
</div>
|
||||
<div class="info-section">
|
||||
<line-div></line-div>
|
||||
|
||||
<div class="name-row">
|
||||
<h1
|
||||
class="input actor-name"
|
||||
contenteditable="plaintext-only"
|
||||
data-property="name"
|
||||
placeholder="{{localize "DAGGERHEART.GENERAL.actorName"}}"
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
>{{source.name}}</h1>
|
||||
</div>
|
||||
|
||||
{{#if source.system.difficulty}}
|
||||
<div class="tags">
|
||||
<div class="tag">
|
||||
<span>{{localize "DAGGERHEART.GENERAL.difficulty"}}</span>
|
||||
<span>{{source.system.difficulty}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<line-div></line-div>
|
||||
|
||||
<div class="npc-info">
|
||||
<span class="description">
|
||||
<i>{{{description}}}</i>
|
||||
</span>
|
||||
<div class="motives-and-tactics">
|
||||
<b>{{localize 'DAGGERHEART.ACTORS.NPC.FIELDS.motives.label'}}: </b>
|
||||
{{source.system.motives}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
7
templates/sheets/actors/npc/navigation.hbs
Normal file
7
templates/sheets/actors/npc/navigation.hbs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<div class="npc-navigation">
|
||||
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
<button type="button" data-action="openSettings" data-tooltip-text="{{localize "DAGGERHEART.UI.Tooltip.openSheetSettings"}}">
|
||||
<i class="fa-solid fa-wrench"></i>
|
||||
</button>
|
||||
{{/'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||
</div>
|
||||
11
templates/sheets/actors/npc/notes.hbs
Normal file
11
templates/sheets/actors/npc/notes.hbs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<section
|
||||
class='tab {{tabs.notes.cssClass}} {{tabs.notes.id}}'
|
||||
data-tab='{{tabs.notes.id}}'
|
||||
data-group='{{tabs.notes.group}}'
|
||||
>
|
||||
{{formInput notes.field value=notes.value enriched=notes.enriched toggled=true}}
|
||||
|
||||
{{#if (and showAttribution document.system.attribution.artist)}}
|
||||
<label class="artist-attribution">{{localize "DAGGERHEART.GENERAL.artistAttribution" artist=document.system.attribution.artist}}</label>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<line-div></line-div>
|
||||
<nav class='feature-tab sheet-tabs tabs' data-group='primary'>
|
||||
{{#each tabs as |tab|}}
|
||||
<a class='{{tab.id}} {{tab.cssClass}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}'>
|
||||
<a class='{{tab.id}} {{tab.cssClass}} {{#if tab.empty}}empty{{/if}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}'>
|
||||
<span>{{localize tab.label}}</span>
|
||||
</a>
|
||||
{{/each}}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<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 "npc")}}
|
||||
<span class="entry-subtitle">{{localize "TYPES.Actor.npc"}}</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")}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue