break out motivations tab

This commit is contained in:
jalensailin
2025-07-18 22:47:29 -04:00
parent 8a49460f3c
commit 04dbcb2db9
2 changed files with 120 additions and 0 deletions
+3
View File
@@ -52,6 +52,9 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) {
`${this.TEMPLATE_PATH}/actor/partials/attributes-grid-partial.html`,
],
},
motivations: {
template: `${this.TEMPLATE_PATH}/actor/parts/motivations-tab.html`,
},
});
/* -------------------------------------------- */
+117
View File
@@ -0,0 +1,117 @@
{{!-- Psychological Tab (formerly 'Mental', formerly 'Motivations') --}}
<div class="tab motivations" data-group="primary" data-tab="motivations">
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.BreakingPointAndAdaptations"}}</span>
</div>
<div>
<div class="breaking-point-grid-3col">
<label class="bolded-label">{{localize 'DG.Mental.BreakingPoint'}}</label>
<input class="centered-input-value"
title="{{localize 'DG.Tooltip.BreakPoint'}}"
type="text"
name="system.sanity.currentBreakingPoint"
value="{{actor.system.sanity.currentBreakingPoint}}"
data-dtype="Number" />
<a class="btn-tiny btn-reset-breaking-point"
title="{{localize 'DG.Tooltip.BreakPointReset'}}">{{localize 'DG.Mental.Reset'}}</a>
</div>
<div>
<h4 class="bolded-label">{{localize 'DG.Mental.SanityLossIncidentsLabel'}}</h4>
<div class="adaptation-grid-5col">
<label>{{localize 'DG.Mental.Violence'}}</label>
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.violence.incident1"
{{checked actor.system.sanity.adaptations.violence.incident1}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.violence.incident2"
{{checked actor.system.sanity.adaptations.violence.incident2}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.violence.incident3"
{{checked actor.system.sanity.adaptations.violence.incident3}}
data-dtype="Boolean" />
<label class="adapted-label"
title="{{localize 'DG.Tooltip.AdaptedToViolence'}}">
{{#if actor.system.sanity.adaptations.violence.isAdapted }}
{{localize 'DG.Mental.AdaptedToViolence'}}
{{/if}}
</label>
<label>{{localize 'DG.Mental.Helplessness'}}</label>
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.helplessness.incident1"
{{checked actor.system.sanity.adaptations.helplessness.incident1}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.helplessness.incident2"
{{checked actor.system.sanity.adaptations.helplessness.incident2}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.helplessness.incident3"
{{checked actor.system.sanity.adaptations.helplessness.incident3}}
data-dtype="Boolean" />
<label class="adapted-label"
title="{{localize 'DG.Tooltip.AdaptedToHelplessness'}}">
{{#if actor.system.sanity.adaptations.helplessness.isAdapted }}
{{localize 'DG.Mental.AdaptedToHelplessness'}}
{{/if}}
</label>
</div>
</div>
</div>
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.MotivationsAndDisorders"}}</span>
</div>
<div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-name">{{localize 'DG.Mental.Motivations'}}</div>
<div class="item-name">{{localize 'DG.Mental.Disorders'}}</div>
<div class="item-controls">
<a class="item-control item-create action-pill"
title="Create item"
data-type="motivation"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id| }}
{{#if_eq item.type 'motivation' }}
<li class="item flexrow" data-item-id="{{item.id}}">
<h4 class="item-name"
{{#if item.system.crossedOut }}
style="text-decoration: line-through"
{{/if }}>
{{item.name}}
</h4>
{{#if item.system.crossedOut }}
<h4 class="item-name">{{item.system.disorder}}</h4>
{{/if}}
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
</div>