mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 21:21:08 +01:00
110 - Class Data Model (#111)
* Added PreCreate/Create/Delete logic for Class/Subclass and set it as foreignUUID fields in PC * Moved methods into TypedModelData * Simplified Subclass
This commit is contained in:
parent
53be047e12
commit
746e0f239a
14 changed files with 190 additions and 224 deletions
|
|
@ -9,7 +9,7 @@
|
|||
<a
|
||||
class='effect-control'
|
||||
data-action='editFeature'
|
||||
data-feature={{feature.uuid}}
|
||||
data-feature='{{feature.uuid}}'
|
||||
data-tooltip='{{localize "DAGGERHEART.Tooltip.openItemWorld"}}'
|
||||
>
|
||||
<i class="fa-solid fa-globe"></i>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<a
|
||||
class='effect-control'
|
||||
data-action='deleteFeature'
|
||||
data-feature={{feature.uuid}}
|
||||
data-feature='{{feature.uuid}}'
|
||||
data-tooltip='{{localize "DAGGERHEART.Tooltip.delete"}}'
|
||||
>
|
||||
<i class='fas fa-trash'></i>
|
||||
|
|
|
|||
|
|
@ -5,22 +5,16 @@
|
|||
>
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Foundation"}}</legend>
|
||||
{{#each source.system.foundationFeature.abilities as |feature key|}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' feature=feature}}
|
||||
{{/each}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' feature=source.system.foundationFeature}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Specialization"}}</legend>
|
||||
{{#each source.system.specializationFeature.abilities as |feature key|}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' feature=feature}}
|
||||
{{/each}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' feature=source.system.specializationFeature}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Mastery"}}</legend>
|
||||
{{#each source.system.masteryFeature.abilities as |feature key|}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' feature=feature}}
|
||||
{{/each}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' feature=source.system.masteryFeature}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<fieldset class="left-main-container" style="flex: 1;">
|
||||
<legend class="legend">
|
||||
{{#if this.document.system.class}}
|
||||
{{#if this.document.system.multiclass}}
|
||||
{{#if this.document.system.class.value}}
|
||||
{{#if this.document.system.multiclass.value}}
|
||||
<span class="class-feature-selectable {{#if this.multiclass}}inactive{{/if}}" data-action="selectFeatureSet" data-multiclass="false">{{this.document.system.class.name}} {{localize "DAGGERHEART.General.Features"}}</span>
|
||||
/
|
||||
<span class="class-feature-selectable {{#if (not this.multiclass)}}inactive{{/if}}" data-action="selectFeatureSet" data-multiclass="true">{{this.document.system.multiclass.name}} {{localize "DAGGERHEART.General.Features"}}</span>
|
||||
{{else}}
|
||||
<span>{{this.document.system.class.name}} {{localize "DAGGERHEART.General.Features"}}</span>
|
||||
<span>{{this.document.system.class.value.name}} {{localize "DAGGERHEART.General.Features"}}</span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<span>{{localize "DAGGERHEART.Sheets.PC.Features.Title"}}</span>
|
||||
|
|
|
|||
|
|
@ -4,17 +4,17 @@
|
|||
<div class="class-info">
|
||||
<div class="flexrow">
|
||||
<img class="portrait" src="{{document.img}}" alt="{{document.name}}" data-edit="img">
|
||||
{{#if document.system.class}}
|
||||
{{#if document.system.class.value}}
|
||||
<div class="flexcol">
|
||||
<h2 class="class-title flex0" data-action="viewObject" data-value="{{document.system.class.uuid}}" data-tab="guide">
|
||||
<h2 class="class-title flex0" data-action="viewObject" data-value="{{document.system.class.value.uuid}}" data-tab="guide">
|
||||
<img class="domain-image" src="{{domains.first}}" />
|
||||
<span>{{document.system.class.name}}</span>
|
||||
<span>{{document.system.class.value.name}}</span>
|
||||
<img class="domain-image" src="{{domains.second}}" />
|
||||
</h2>
|
||||
<span class="domain-title flex0">
|
||||
<span>{{document.system.class.system.domains.[0]}}</span>
|
||||
<span>{{document.system.class.value.system.domains.[0]}}</span>
|
||||
<span>and</span>
|
||||
<span>{{document.system.class.system.domains.[1]}}</span>
|
||||
<span>{{document.system.class.value.system.domains.[1]}}</span>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="flexcol">
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<button data-action="selectAncestry" class="option-select"><i class="fa-solid fa-user-large"></i></button>
|
||||
{{/objectSelector}}
|
||||
{{#objectSelector title="Subclass" ids=(join document.system.subclass.uuid) values=(join document.system.subclass.name) titleFontSize=14}}
|
||||
<button data-action="selectSubclass" class="option-select" {{#if (not ../document.system.class)}}disabled{{/if}}><i class="fa-solid fa-fw fa-search"></i></button>
|
||||
<button data-action="selectSubclass" class="option-select" {{#if (not ../document.system.class.value)}}disabled{{/if}}><i class="fa-solid fa-fw fa-search"></i></button>
|
||||
{{/objectSelector}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue