Move adaptation ticks to Agent Sheet V2 left panel (#297)

Port issue #297 from reyzor/297-adaption-left-panel: adaptation incident
checkboxes live in the left bar; Psychological tab is motivations/disorders only.
Includes #281 tooltips on adaptation controls, adapted-label-slot spacing,
locale key DG.Sheet.BlockHeaders.Adaptations (11 languages), and height 700.
Age remains on the bio tab (#374).
Manual port from branch reyzor/297-adaption-left-panel (@reyzor1991), not a
literal cherry-pick, due to merge conflicts with v14 and extravaganza work.
Co-authored-by: reyzor1991
This commit is contained in:
Aaron Lutomski
2026-05-29 21:05:50 -07:00
parent 8656cb0f7c
commit a768a02fa3
16 changed files with 171 additions and 80 deletions
+6
View File
@@ -11,7 +11,13 @@
- [#211](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/211) - Move macros to System macros folder in compendium.
- [#283](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/283) - Added new actor sheet with left hand Sidebar RFC
- [#291](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/291) - Moving Luck button from three dots to left hand panel
- [#297](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/297) - Move adaption ticks to left hand panel
- [#374](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/374) - Moving Age to Bio tab
- [#393](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/393) - Updated to support Foundry v14
- [#223](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/223) - Migrated item sheets to Foundry ApplicationV2 (`ItemSheetV2`)
### **Bug Fixes:**
- [#392](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/392) - Fixed sheet rolls
## Version 1.6.6 - 2026-04-15
+82 -11
View File
@@ -126,6 +126,18 @@
cursor: pointer;
}
button.rollable.inline-roll {
display: inline;
margin: 0;
padding: 0;
border: none;
background: transparent;
font: inherit;
color: inherit;
line-height: inherit;
vertical-align: baseline;
}
.not-rollable {
color: #999999;
}
@@ -1345,7 +1357,7 @@ a[data-action="applySkillImprovements"] {
.window-content {
display: grid;
grid-template-columns: 220px 1fr;
grid-template-rows: auto;
grid-template-rows: auto 1fr;
width: 100%;
height: 100%;
}
@@ -1353,18 +1365,56 @@ a[data-action="applySkillImprovements"] {
.left-bar {
grid-column: 1;
grid-row: 1 / -1;
padding: 10px;
padding: 3px;
}
.window-content > :not(.left-bar) {
.window-content > nav.sheet-tabs {
grid-column: 2;
grid-row: 1;
align-self: start;
width: 100%;
box-sizing: border-box;
margin-bottom: 0;
position: relative;
z-index: 2;
}
.window-content > [data-application-part="rightBar"],
.window-content > .right-bar {
grid-column: 2;
grid-row: 2;
width: 100%;
min-height: 0;
box-sizing: border-box;
padding-right: 0;
margin-right: 0;
}
.right-bar {
display: flex;
flex-direction: column;
min-height: 0;
height: 100%;
}
.right-bar > .tab {
flex: 1 1 auto;
min-height: 0;
}
/* Match V1: flat top edge on panel; active tab overlaps the panel top border */
.right-bar > .tab.active {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.tabs [data-action="tab"].active {
position: relative;
z-index: 1;
margin-bottom: -2px;
padding-bottom: 2px;
}
.profile-img {
width: 100%;
height: auto;
@@ -1383,10 +1433,6 @@ a[data-action="applySkillImprovements"] {
padding: 1px;
}
.tab.active {
padding-top: 20px;
}
.breaking-point {
justify-content: space-between;
display: flex;
@@ -1397,19 +1443,44 @@ a[data-action="applySkillImprovements"] {
}
}
.mb-10 {
margin-bottom: 10px;
}
.stats {
input {
margin: 1px;
}
}
.luck {
margin-top: 5px;
}
.horizontal-bar-section-divider.skills-header {
display: flex;
}
.adaptation-grid-4col {
display: grid;
grid-template-columns: 50% 25px 25px 25px;
align-content: center;
justify-content: left;
align-items: center;
row-gap: 0;
margin-bottom: 0;
}
.adaptation-grid-4col .adapted-label-slot {
grid-column: 1 / -1;
min-height: 1.35em;
}
.adaptation-grid-4col .adapted-label-slot .adapted-label {
display: block;
margin: 0;
}
.adaptation-block {
border: 1px solid black;
padding: 3px;
}
}
.stats-wrapper {
+1
View File
@@ -229,6 +229,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "SKILLS AND TRAINING",
"DG.Sheet.BlockHeaders.Injuries": "INJURIES",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "BREAKING POINT AND ADAPTATIONS",
"DG.Sheet.BlockHeaders.Adaptations": "Adaptations",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTIVATIONS AND DISORDERS",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "PERSONAL INFORMATION / CV",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "BONDS / RELATIONSHIPS / CONTACTS",
+1
View File
@@ -243,6 +243,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "技能与特训",
"DG.Sheet.BlockHeaders.Injuries": "伤害",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "崩溃点和适应",
"DG.Sheet.BlockHeaders.Adaptations": "适应",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "动机和精神疾病",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "个人信息 / 简历",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "重要关系 / 关系 / 联系人",
+1
View File
@@ -246,6 +246,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "FERTIGKEITEN UND TRAINING",
"DG.Sheet.BlockHeaders.Injuries": "VERLETZUNGEN",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "BELASTUNGSSCHWELLE UND GEWÖHNUNGEN",
"DG.Sheet.BlockHeaders.Adaptations": "Gewöhnungen",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTIVATIONEN UND STÖRUNGEN",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "PERSÖNLICHE INFORMATIONEN / LEBENSLAUF",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "BINDUNGEN / BEZIEHUNGEN / KONTAKTE",
+2
View File
@@ -312,6 +312,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "SKILLS AND TRAINING",
"DG.Sheet.BlockHeaders.Injuries": "INJURIES",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "BREAKING POINT AND ADAPTATIONS",
"DG.Sheet.BlockHeaders.Adaptations": "Adaptations",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTIVATIONS AND DISORDERS",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "PERSONAL INFORMATION / CV",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "BONDS / RELATIONSHIPS / CONTACTS",
@@ -349,6 +350,7 @@
"DG.Sheet.class.item": "Item Sheet",
"DG.Sheet.class.agent": "Agent Sheet",
"DG.Sheet.class.agentV2": "Agent Sheet V2",
"DG.Sheet.class.npc": "NPC Sheet",
"DG.Sheet.class.unnatural": "Unnatural Sheet",
"DG.Sheet.class.vehicle": "Vehicle Sheet",
+1
View File
@@ -310,6 +310,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "HABILIDADES Y ENTRENAMIENTO",
"DG.Sheet.BlockHeaders.Injuries": "HERIDAS",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "PUNTO DE RUPTURA Y ADAPTACIONES",
"DG.Sheet.BlockHeaders.Adaptations": "Adaptaciones",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTIVACIONES Y TRANSTORNOS MENTALES",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "INFORMACIÓN PERSONAL Y CURRÍCULO",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "LAZOS, RELACIONES Y CONTACTOS",
+1
View File
@@ -310,6 +310,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "COMPÉTENCES ET FORMATION",
"DG.Sheet.BlockHeaders.Injuries": "BLESSURES ET MALADIES",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "SEUIL DE RUPTURE ET ADAPTATIONS",
"DG.Sheet.BlockHeaders.Adaptations": "Adaptations",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTIVATIONS ET TROUBLES PSYCHIQUES",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "DÉTAILS PERSONNELS ET NOTES",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "ATTACHES, RELATIONS ET CONTACTS",
+1
View File
@@ -245,6 +245,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "技能と訓練",
"DG.Sheet.BlockHeaders.Injuries": "負傷",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "限界点と慣れ",
"DG.Sheet.BlockHeaders.Adaptations": "慣れ",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "モチベーションと精神障害",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "個人情報 / 経歴",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "絆 / 関係 / 協力者",
+1
View File
@@ -308,6 +308,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "UMIEJĘTNOŚCI I SZKOLENIE",
"DG.Sheet.BlockHeaders.Injuries": "URAZY",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "PUNKT ZŁAMANIA I ADAPTACJE",
"DG.Sheet.BlockHeaders.Adaptations": "Adaptacje",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTYWACJE I ZABURZENIA",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "DANE OSOBOWE / CV",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "WIĘZI / RELACJE / KONTAKTY",
+1
View File
@@ -310,6 +310,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "HABILIDADES E TREINAMENTO",
"DG.Sheet.BlockHeaders.Injuries": "FERIMENTOS",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "PONTO DE RUPTURA E ADAPTAÇÕES",
"DG.Sheet.BlockHeaders.Adaptations": "Adaptações",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTIVAÇÕES E DISTÚRBIOS",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "INFORMAÇÕES PESSOAIS / C.V.",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "LAÇOS / RELACIONAMENTOS / CONTATOS",
+1
View File
@@ -245,6 +245,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "FÄRDIGHETER OCH TRÄNING",
"DG.Sheet.BlockHeaders.Injuries": "SKADOR",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "BRYTPUNKT OCH ANPASSNINGAR",
"DG.Sheet.BlockHeaders.Adaptations": "Anpassningar",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "MOTIVATIONER OCH STÖRNINGAR",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "PERSONLIG INFORMATION",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "KAMRATER OCH RELATIONER",
+1
View File
@@ -310,6 +310,7 @@
"DG.Sheet.BlockHeaders.SkillsAndTraining": "НАВИЧКИ ТА ПІДГОТОВКА",
"DG.Sheet.BlockHeaders.Injuries": "ТРАВМИ",
"DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "ТОЧКА ЗЛАМУ ТА АДАПТАЦІЇ",
"DG.Sheet.BlockHeaders.Adaptations": "Адаптації",
"DG.Sheet.BlockHeaders.MotivationsAndDisorders": "МОТИВАЦІЇ ТА РОЗЛАДИ",
"DG.Sheet.BlockHeaders.PersonalInfoCV": "ОСОБИСТІ ДАНІ / РЕЗЮМЕ",
"DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "ЗВ’ЯЗКИ / СТОСУНКИ / КОНТАКТИ",
+2 -2
View File
@@ -5,7 +5,7 @@ import ActorEditStatForm from "./edit-stats.js";
export default class DGAgentSheetV2 extends DGAgentSheet {
static DEFAULT_OPTIONS = /** @type {const} */ ({
classes: ["actor-sheet-v2"],
position: { width: 950, height: 665 },
position: { width: 950, height: 700 },
actions: {
openStatsEdit: this._openStatsEdit,
},
@@ -17,6 +17,7 @@ export default class DGAgentSheetV2 extends DGAgentSheet {
template: `${this.TEMPLATE_PATH}/parts/left-bar.html`,
templates: [`${this.TEMPLATE_PATH}/partials/sanity-partial.html`],
},
tabs: this.BASE_PARTS.tabs,
rightBar: {
template: `${this.TEMPLATE_PATH}/parts/right-bar.html`,
templates: [
@@ -31,7 +32,6 @@ export default class DGAgentSheetV2 extends DGAgentSheet {
`${this.TEMPLATE_PATH}/partials/notes-partial.html`,
],
},
tabs: this.BASE_PARTS.tabs,
});
static _openStatsEdit() {
+69 -7
View File
@@ -21,7 +21,7 @@
</div>
</div>
<div class="stats-wrapper">
<div class="stats-wrapper mb-10">
<a class="stats-edit-btn" title="{{localize 'Edit Stats'}}" data-action="openStatsEdit">
<i class="fas fa-pen"></i>
</a>
@@ -52,9 +52,7 @@
</div>
</div>
<br/>
<div class="resources grid grid-3col">
<div class="resources grid grid-3col mb-10">
{{!-- HP --}}
<div class="resource-outer-grid-1col">
<label for="actor.system.health.value"
@@ -101,9 +99,7 @@
{{/if}}
</div>
<br/>
<div class="breaking-point">
<div class="breaking-point mb-10">
<label class="bolded-label">{{localize 'DG.Mental.BreakingPoint'}}</label>
<input class="centered"
title="{{localize 'DG.Tooltip.BreakPoint'}}"
@@ -114,6 +110,72 @@
<a class="fa fa-refresh" data-action="resetBreakingPoint" title="Reset breaking point to be current SAN - WP."></a>
</div>
<div class="adaptation-grid-4col">
<label data-tooltip="{{localize 'DG.Mental.Tooltip.Violence'}}">
{{localize 'DG.Mental.Violence'}}
</label>
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.violence.incident1"
data-tooltip="{{localize 'DG.Mental.Tooltip.Checkbox.Violence'}}"
{{checked actor.system.sanity.adaptations.violence.incident1}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.violence.incident2"
data-tooltip="{{localize 'DG.Mental.Tooltip.Checkbox.Violence'}}"
{{checked actor.system.sanity.adaptations.violence.incident2}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.violence.incident3"
data-tooltip="{{localize 'DG.Mental.Tooltip.Checkbox.Violence'}}"
{{checked actor.system.sanity.adaptations.violence.incident3}}
data-dtype="Boolean" />
<div class="adapted-label-slot">
<label class="adapted-label"
data-tooltip="{{localize 'DG.Tooltip.AdaptedToViolence'}}">
{{#if actor.system.sanity.adaptations.violence.isAdapted }}
{{localize 'DG.Mental.AdaptedToViolence'}}
{{/if}}
</label>
</div>
<label data-tooltip="{{localize 'DG.Mental.Tooltip.Helplessness'}}">
{{localize 'DG.Mental.Helplessness'}}
</label>
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.helplessness.incident1"
data-tooltip="{{localize 'DG.Mental.Tooltip.Checkbox.Helplessness'}}"
{{checked actor.system.sanity.adaptations.helplessness.incident1}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.helplessness.incident2"
data-tooltip="{{localize 'DG.Mental.Tooltip.Checkbox.Helplessness'}}"
{{checked actor.system.sanity.adaptations.helplessness.incident2}}
data-dtype="Boolean" />
<input class="labeled-resource-checkbox"
type="checkbox"
name="system.sanity.adaptations.helplessness.incident3"
data-tooltip="{{localize 'DG.Mental.Tooltip.Checkbox.Helplessness'}}"
{{checked actor.system.sanity.adaptations.helplessness.incident3}}
data-dtype="Boolean" />
<div class="adapted-label-slot">
<label class="adapted-label"
data-tooltip="{{localize 'DG.Tooltip.AdaptedToHelplessness'}}">
{{#if actor.system.sanity.adaptations.helplessness.isAdapted }}
{{localize 'DG.Mental.AdaptedToHelplessness'}}
{{/if}}
</label>
</div>
</div>
<div class="luck">
<label class="bolded-label">{{localize 'DG.RollLuck'}}</label>
<a class="fas fa-dice" data-action="rollLuck"></a>
@@ -2,66 +2,6 @@
<div class="tab motivations {{tabs.motivations.cssClass}}"
data-group="primary"
data-tab="motivations">
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.BreakingPointAndAdaptations"}}</span>
</div>
<div>
<div>
<label class="bolded-label">{{localize 'DG.Mental.SanityLossIncidentsLabel'}}</label>
<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"
data-tooltip="{{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"
data-tooltip="{{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>