[Feature] New Environment Sheet (#243)

* rework new environment template sheet, add environment-settings sheet, improve adversary-settings sheet and  delete legacy actor sheet templates

* Potential Adversaries can be dragged out of the sheet onto canvas

* Added ToChat and UseItem

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
Murilo Brito 2025-07-02 09:30:36 -03:00 committed by GitHub
parent d58f303907
commit 3a6a973ea2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 1160 additions and 1143 deletions

View file

@ -1,17 +0,0 @@
<section
class='tab {{tabs.information.cssClass}} {{tabs.information.id}}'
data-tab='{{tabs.information.id}}'
data-group='{{tabs.information.group}}'
>
{{!-- <fieldset>
<legend>{{localize "DAGGERHEART.Sheets.Adversary.FIELDS.description.label" }}</legend>
{{formInput systemFields.description value=source.system.description}}
</fieldset> --}}
<fieldset>
<legend>{{localize "DAGGERHEART.Sheets.Adversary.FIELDS.motivesAndTactics.label" }}</legend>
{{formInput systemFields.motivesAndTactics value=source.system.motivesAndTactics}}
</fieldset>
</section>

View file

@ -1,43 +0,0 @@
<section
class='tab {{tabs.main.cssClass}} {{tabs.main.id}}'
data-tab='{{tabs.main.id}}'
data-group='{{tabs.main.group}}'
>
<div class="adversary-container">
<fieldset class="two-columns even">
<legend>{{localize "DAGGERHEART.Sheets.Adversary.General"}}</legend>
<div class="full-width">{{formGroup systemFields.difficulty value=source.system.difficulty}}</div>
<fieldset>
<legend>{{localize "DAGGERHEART.Sheets.Adversary.HitPoints"}}</legend>
<!--
{{formGroup systemFields.resources.fields.hitPoints.fields.value value=source.system.resources.hitPoints.value}}
{{formGroup systemFields.resources.fields.hitPoints.fields.max value=source.system.resources.hitPoints.max}}
-->
</fieldset>
<fieldset>
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Stress"}}</legend>
<!--
{{formGroup systemFields.resources.fields.stress.fields.value value=source.system.resources.stress.value}}
{{formGroup systemFields.resources.fields.stress.fields.max value=source.system.resources.stress.max}}
-->
</fieldset>
<fieldset>
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Experiences"}} <a><i class="fa-solid fa-plus icon-button" data-action="addExperience"></i></a></legend>
{{#each source.system.experiences}}
<fieldset class="one-column">
<legend>{{this.name}} <a><i class="fa-solid fa-trash icon-button" data-action="removeExperience" data-experience="{{@key}}"></i></a></legend>
{{formGroup @root.systemFields.experiences.element.fields.name name=(concat "system.experiences." @key ".name") value=this.name }}
{{formGroup @root.systemFields.experiences.element.fields.value name=(concat "system.experiences." @key ".value") value=this.value }}
</fieldset>
{{/each}}
</fieldset>
</fieldset>
</div>
</section>

View file

@ -0,0 +1,9 @@
<section
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
data-tab='{{tabs.actions.id}}'
data-group='{{tabs.actions.group}}'
>
<div class="action-section">
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}}
</div>
</section>

View file

@ -1,9 +1,49 @@
<header class='item-card-header'>
<header class='environment-header-sheet'>
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
<div class='item-info'>
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
<div class='item-description'>
<h3>{{localize 'TYPES.Actor.environment'}}</h3>
<div class='item-container'>
<div class="item-info">
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
<div class="tags">
<div class="tag">
<span>
{{localize (concat 'DAGGERHEART.Tiers.' source.system.tier)}}
</span>
</div>
{{#if source.system.type}}
<div class="tag">
<span>
{{localize (concat 'DAGGERHEART.Environment.Type.' source.system.type '.label')}}
</span>
</div>
{{/if}}
</div>
</div>
<div class="status-number">
<div class='status-value armor-slots'>
{{#if source.system.difficulty}}
<p>{{source.system.difficulty}}</p>
{{else}}
<p>-</p>
{{/if}}
</div>
<div class="status-label">
<h4>Difficulty</h4>
</div>
</div>
</div>
<line-div></line-div>
<div class="environment-info">
<div class="description">
<i>{{source.system.description}}</i>
</div>
<div class="impulses">
<b>{{localize 'DAGGERHEART.Sheets.Environment.FIELDS.impulses.label'}}: </b>{{{source.system.impulses}}}
</div>
</div>
<div class="environment-navigation">
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
<button data-action="openSettings">
<i class="fa-solid fa-wrench"></i>
</button>
</div>
</header>

View file

@ -1,16 +0,0 @@
<section
class='tab {{tabs.information.cssClass}} {{tabs.information.id}}'
data-tab='{{tabs.information.id}}'
data-group='{{tabs.information.group}}'
>
<fieldset>
<legend>{{localize "DAGGERHEART.Sheets.Environment.description"}}</legend>
{{formInput systemFields.description value=source.system.description }}
</fieldset>
<fieldset>
<legend>{{localize "DAGGERHEART.Sheets.Environment.impulses"}}</legend>
{{formInput systemFields.impulses value=source.system.impulses }}
</fieldset>
</section>

View file

@ -1,37 +0,0 @@
<section
class='tab {{tabs.main.cssClass}} {{tabs.main.id}}'
data-tab='{{tabs.main.id}}'
data-group='{{tabs.main.group}}'
>
<fieldset class="two-columns even">
<legend>{{localize "DAGGERHEART.Sheets.Environment.general"}}</legend>
{{formGroup systemFields.tier value=source.system.tier localize=true }}
{{formGroup systemFields.type value=source.system.type localize=true }}
{{formGroup systemFields.difficulty value=source.system.difficulty localize=true }}
</fieldset>
<fieldset class="one-column">
<legend>{{localize "DAGGERHEART.Sheets.Environment.potentialAdversaries.label"}}<a><i class="fa-solid fa-plus icon-button" data-action="addAdversary"></i></a></legend>
{{#each source.system.potentialAdversaries}}
<fieldset class="potential-adversary-container" data-potential-adversary="{{@key}}">
<legend><input name="{{concat "system.potentialAdversaries." id ".label" }}" value="{{this.label}}" /><i class="fa-solid fa-trash" data-action="deleteProperty" data-path="system.potentialAdversaries" id={{@key}}></i></legend>
{{#if (eq (length this.adversaries) 0)}}
<div class="adversary-placeholder">{{localize "DAGGERHEART.Sheets.Environment.potentialAdversaries.placeholder"}}</div>
{{else}}
<div class="adversaries-container">
{{#each this.adversaries as |adversary id|}}
<div class="adversary-container" data-action="viewAdversary" data-potential-adversary="{{@../key}}" data-adversary="{{id}}">{{adversary.name}}</div>
{{/each}}
</div>
{{/if}}
</fieldset>
{{/each}}
</fieldset>
<fieldset class="one-column">
<legend>{{localize "DAGGERHEART.Sheets.Environment.features.label"}}<a><i class="fa-solid fa-plus icon-button" data-action="addFeature"></i></a></legend>
</fieldset>
</section>

View file

@ -0,0 +1,10 @@
<section
class='tab {{tabs.notes.cssClass}} {{tabs.notes.id}}'
data-tab='{{tabs.notes.id}}'
data-group='{{tabs.notes.group}}'
>
<fieldset class="fit-height">
<legend>{{localize tabs.notes.label}}</legend>
{{formInput systemFields.notes value=document.system.notes enriched=document.system.notes localize=true toggled=true}}
</fieldset>
</section>

View file

@ -0,0 +1,11 @@
<section
class='tab {{tabs.potentialAdversaries.cssClass}} {{tabs.potentialAdversaries.id}}'
data-tab='{{tabs.potentialAdversaries.id}}'
data-group='{{tabs.potentialAdversaries.group}}'
>
<div class="action-section">
{{#each document.system.potentialAdversaries}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=this.label type='adversary' isGlassy=true adversaries=this.adversaries}}
{{/each}}
</div>
</section>