diff --git a/css/deltagreen.css b/css/deltagreen.css index e9c5cdb..567fee9 100644 --- a/css/deltagreen.css +++ b/css/deltagreen.css @@ -1514,6 +1514,7 @@ a[data-action="applySkillImprovements"] { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; + column-gap: 8px; width: 100%; height: 100%; } @@ -1524,6 +1525,15 @@ a[data-action="applySkillImprovements"] { padding: 3px; } + .stats-wrapper { + margin-top: 8px; + margin-bottom: 8px; + } + + .mb-8 { + margin-bottom: 8px; + } + .window-content > nav.sheet-tabs { grid-column: 2; grid-row: 1; @@ -1533,6 +1543,25 @@ a[data-action="applySkillImprovements"] { margin-bottom: 0; position: relative; z-index: 2; + display: flex; + flex-wrap: nowrap; + } + + .tabs [data-action="tab"] { + flex: 0 0 7.5rem; + text-align: center; + z-index: 0; + margin-left: -6px; + + &:first-child { + margin-left: 0; + } + } + + .tabs [data-action="tab"][data-tab="about"] { + flex: 0 0 auto; + min-width: unset; + margin-left: auto; } .window-content > [data-application-part="rightBar"], @@ -1566,7 +1595,7 @@ a[data-action="applySkillImprovements"] { .tabs [data-action="tab"].active { position: relative; - z-index: 1; + z-index: 3; margin-bottom: -2px; padding-bottom: 2px; } @@ -1585,22 +1614,65 @@ a[data-action="applySkillImprovements"] { font-size: 12px; } + .resources { + margin-bottom: 8px; + } + .resource-inner-grid-3col input { padding: 1px; } - .breaking-point { - justify-content: space-between; - display: flex; + .breaking-point-inline { + display: grid; + grid-template-columns: 1fr auto auto; align-items: center; + column-gap: 6px; + border: none; + padding: 0; + background: none; - input { - width: 40px; + .breaking-point-label { + margin: 0; + white-space: nowrap; + justify-self: start; + } + + .breaking-point-input { + width: 2.5rem; + min-width: 2.5rem; + max-width: 2.5rem; + padding: 1px; + text-align: center; + font-size: 12px; + justify-self: end; + } + + .fa-refresh { + text-decoration: none; + font-size: 12px; + justify-self: end; } } - .mb-10 { - margin-bottom: 10px; + .exhausted-section.resource { + display: grid; + grid-template-columns: 1fr auto; + align-items: center; + column-gap: 8px; + row-gap: 4px; + border: none; + margin-bottom: 8px; + padding: 0; + background: none; + + .exhaustion-label { + justify-self: start; + } + + .labeled-resource-checkbox, + input[type="number"] { + justify-self: end; + } } .stats { @@ -1613,14 +1685,220 @@ a[data-action="applySkillImprovements"] { display: flex; } + .skill-util-buttons { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: stretch; + gap: 8px; + width: 100%; + margin: 5px 0; + box-sizing: border-box; + + .action-pill { + flex: 1 1 0; + min-width: 0; + margin: 0; + text-align: center; + } + + .typed-skill-add { + margin-right: 0; + } + + a[data-action="applySkillImprovements"] { + float: none; + } + + .custom-skills-edit-toggle { + flex: 0 0 auto; + min-width: 2rem; + padding-inline: 6px; + } + } + + .custom-skill-group-label { + display: flex; + align-items: center; + justify-content: center; + min-height: 1.35rem; + height: auto; + margin-top: 4px; + margin-bottom: 4px; + padding: 2px 4px; + font-size: 0.7rem; + font-weight: bold; + letter-spacing: 0.02em; + text-transform: uppercase; + line-height: 1.2; + } + + &.custom-skills-edit-mode .custom-skills-edit-toggle { + background-color: rgba(0, 0, 0, 0.45); + outline: 1px solid #000; + } + + &.custom-skills-edit-mode .program-style .custom-skills-edit-toggle { + background-color: #000; + color: #fff; + } + + .typed-skill-row { + min-height: 27px; + align-items: center; + } + + .custom-skill-controls-slot { + position: relative; + display: flex; + flex: 0 0 70px; + min-width: 70px; + min-height: 1.2rem; + align-items: center; + justify-content: flex-end; + } + + .custom-skill-play-controls { + display: flex; + flex: 1 1 auto; + align-items: center; + justify-content: flex-end; + min-height: 1.2rem; + } + + .custom-skill-controls-slot .custom-skill-edit-controls { + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: flex-end; + gap: 2px; + margin: 0; + } + + .special-training-box .custom-skill-edit-controls { + position: static; + flex: 0 0 auto; + align-items: center; + gap: 2px; + margin: 0; + } + + &:not(.custom-skills-edit-mode) .custom-skill-edit-controls { + display: none; + } + + &.custom-skills-edit-mode .custom-skill-play-controls { + visibility: hidden; + pointer-events: none; + } + + .typed-skills-columns { + align-items: start; + } + + .typed-skills-column { + display: flex; + flex-direction: column; + gap: 3px; + min-width: 0; + } + + .skill-and-training-controls { + display: flex; + flex-direction: row; + flex: 0 0 auto; + gap: 2px; + } + + .scenario-information-grid { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); + column-gap: 12px; + row-gap: 8px; + align-items: start; + width: 100%; + box-sizing: border-box; + padding-bottom: 10px; + } + + .scenario-information-left, + .scenario-information-right { + min-width: 0; + } + + .scenario-information-left.bio-grid-2col { + grid-template-columns: minmax(4rem, max-content) minmax(0, 1fr); + padding-bottom: 0; + } + + .scenario-information-corruption { + display: block; + flex: none; + max-width: 100%; + box-sizing: border-box; + padding-bottom: 10px; + } + + .scenario-information-yellow-sign-row { + display: grid; + grid-template-columns: max-content max-content max-content; + column-gap: 8px; + align-items: center; + flex: none; + width: fit-content; + max-width: 100%; + } + + .scenario-information-corruption-row { + display: grid; + grid-template-columns: max-content max-content; + column-gap: 8px; + align-items: center; + flex: none; + width: fit-content; + max-width: 100%; + margin-top: 8px; + } + + .scenario-information-yellow-sign-row > *, + .scenario-information-corruption-row > * { + flex: none; + } + + .scenario-information-corruption-label { + display: inline-flex; + align-items: baseline; + gap: 0; + flex: none; + white-space: nowrap; + } + + .scenario-information-corruption-label > .yellow-king { + flex: none; + display: inline-block; + } + + .scenario-information-corruption-row input[type="number"] { + width: 2.5rem; + min-width: 2.5rem; + } + .adaptation-grid-4col { display: grid; - grid-template-columns: 50% 25px 25px 25px; + grid-template-columns: 1fr 25px 25px 25px; align-content: center; - justify-content: left; align-items: center; row-gap: 0; margin-bottom: 0; + + > label { + justify-self: start; + } + + > input.labeled-resource-checkbox { + justify-self: end; + } } .adaptation-grid-4col .adapted-label-slot { diff --git a/lang/ca.json b/lang/ca.json index d4a0418..ca67333 100644 --- a/lang/ca.json +++ b/lang/ca.json @@ -46,6 +46,7 @@ "DG.Skills.flight": "Flight", "DG.Skills.AddTypedOrCustomSkill": "Afegir tipus o habilitat personalitzada", + "DG.Skills.ToggleEditDeleteSkills": "Editar/eliminar habilitats", "DG.Skills.AddSkill": "Afegir habilitat", "DG.Skills.EditTypedOrCustomSkill": "Edit Typed or Custom Skill", "DG.Skills.EditSkill": "Edit Skill", @@ -76,6 +77,14 @@ "DG.Navigation.Gear": "Equip", "DG.Navigation.CV": "C.V.", "DG.Navigation.Contacts": "Contactes", + "DG.Navigation.Agent.skills": "Habilitats", + "DG.Navigation.Agent.combat": "Combat", + "DG.Navigation.Agent.physical": "Físic", + "DG.Navigation.Agent.motivations": "Mental", + "DG.Navigation.Agent.gear": "Equip", + "DG.Navigation.Agent.personal": "C.V.", + "DG.Navigation.Agent.bio": "C.V.", + "DG.Navigation.Agent.bonds": "Contactes", "DG.About.OnlineHelp": "Documentació del sistema oberta en (EN LÍNEA)", "DG.About.OnlineHelpTooltip": "Inicia el navegador amb ajuda en línea de Github", @@ -227,11 +236,13 @@ "DG.Sheet.BlockHeaders.Statistics": "STATISTICS", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "Descripció física/notes", "DG.Sheet.BlockHeaders.SkillsAndTraining": "SKILLS AND TRAINING", + "DG.Sheet.BlockHeaders.SpecialTraining": "SPECIAL 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.ScenarioInformation": "SCENARIO INFORMATION", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "BONDS / RELATIONSHIPS / CONTACTS", "DG.UnnaturalSheet.HideUntrainedSkillsLabel": "Amagar habilitats no entrenades", diff --git a/lang/cn.json b/lang/cn.json index b179958..8c84581 100644 --- a/lang/cn.json +++ b/lang/cn.json @@ -47,6 +47,7 @@ "DG.TypeSkills.Subskills.Painting": "绘画", "DG.Skills.AddTypedOrCustomSkill": "Add Typed/Custom Skill", + "DG.Skills.ToggleEditDeleteSkills": "编辑/删除技能", "DG.Skills.AddSkill": "Add Skill", "DG.Skills.Apply": "Apply", "DG.Skills.ApplySkillImprovements": "添加类型/自定义技能", @@ -92,6 +93,14 @@ "DG.Navigation.Gear": "装备", "DG.Navigation.CV": "个人情况", "DG.Navigation.Contacts": "重要关系", + "DG.Navigation.Agent.skills": "技能", + "DG.Navigation.Agent.combat": "战斗", + "DG.Navigation.Agent.physical": "健康", + "DG.Navigation.Agent.motivations": "精神", + "DG.Navigation.Agent.gear": "装备", + "DG.Navigation.Agent.personal": "个人情况", + "DG.Navigation.Agent.bio": "个人情况", + "DG.Navigation.Agent.bonds": "重要关系", "DG.About.OnlineHelp": "System Documentation on (ONLINE)", "DG.About.OnlineHelpTooltip": "Launch browser with online GitHub help.", @@ -241,11 +250,13 @@ "DG.Sheet.BlockHeaders.Statistics": "统计", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "外貌描述 / 笔记", "DG.Sheet.BlockHeaders.SkillsAndTraining": "技能与特训", + "DG.Sheet.BlockHeaders.SpecialTraining": "特殊训练", "DG.Sheet.BlockHeaders.Injuries": "伤害", "DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "崩溃点和适应", "DG.Sheet.BlockHeaders.Adaptations": "适应", "DG.Sheet.BlockHeaders.MotivationsAndDisorders": "动机和精神疾病", "DG.Sheet.BlockHeaders.PersonalInfoCV": "个人信息 / 简历", + "DG.Sheet.BlockHeaders.ScenarioInformation": "场景信息", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "重要关系 / 关系 / 联系人", "DG.UnnaturalSheet.HideUntrainedSkillsLabel": "隐藏未训练技能", diff --git a/lang/de.json b/lang/de.json index 23a5d3e..1098b87 100644 --- a/lang/de.json +++ b/lang/de.json @@ -46,6 +46,7 @@ "DG.Skills.flight": "Flight", "DG.Skills.AddTypedOrCustomSkill": "Eigene Fertigkeit hinzufügen", + "DG.Skills.ToggleEditDeleteSkills": "Fertigkeiten bearbeiten/löschen", "DG.Skills.AddSkill": "Fertigkeit hinzufügen", "DG.Skills.Apply": "Anwenden", "DG.Skills.ApplySkillImprovements": "Verbesserungen der Fertigkeiten anwenden", @@ -91,6 +92,14 @@ "DG.Navigation.Gear": "Ausrüstung", "DG.Navigation.CV": "Persönlich", "DG.Navigation.Contacts": "Bindungen", + "DG.Navigation.Agent.skills": "Fertigkeiten", + "DG.Navigation.Agent.combat": "Kampf", + "DG.Navigation.Agent.physical": "Statistiken", + "DG.Navigation.Agent.motivations": "Psychologie", + "DG.Navigation.Agent.gear": "Ausrüstung", + "DG.Navigation.Agent.personal": "Persönlich", + "DG.Navigation.Agent.bio": "Persönlich", + "DG.Navigation.Agent.bonds": "Bindungen", "DG.About.OnlineHelp": "Systemdokumentation auf (ONLINE)", "DG.About.OnlineHelpTooltip": "Starten des Browsers mit der Online-Hilfe von GitHub.", @@ -244,11 +253,13 @@ "DG.Sheet.BlockHeaders.Statistics": "STATISTIK", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "PHYSISCHE BESCHREIBUNG / ANMERKUNGEN", "DG.Sheet.BlockHeaders.SkillsAndTraining": "FERTIGKEITEN UND TRAINING", + "DG.Sheet.BlockHeaders.SpecialTraining": "SPEZIALTRAINING", "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.ScenarioInformation": "SZENARIENINFORMATIONEN", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "BINDUNGEN / BEZIEHUNGEN / KONTAKTE", "DG.UnnaturalSheet.HideUntrainedSkillsLabel": "Untrainierte ausblenden", diff --git a/lang/en.json b/lang/en.json index dedb711..b6842a2 100644 --- a/lang/en.json +++ b/lang/en.json @@ -84,6 +84,7 @@ "DG.Skills.Tooltip.unnatural": "Recognize, research, or recall truths about entities and forces beyond human understanding.", "DG.Skills.AddTypedOrCustomSkill": "Add Typed/Custom Skill", + "DG.Skills.ToggleEditDeleteSkills": "Edit/Delete Skills", "DG.Skills.AddSkill": "Add Skill", "DG.Skills.Apply": "Apply", "DG.Skills.ApplySkillImprovements.Title": "Apply Skill Improvements", @@ -142,9 +143,11 @@ "DG.Attributes.Tooltip.cha": "See Page 19 of the Agent's Handbook - Charisma", "DG.Navigation.Agent.skills": "Skills", + "DG.Navigation.Agent.combat": "Combat", "DG.Navigation.Agent.physical": "Statistics", "DG.Navigation.Agent.motivations": "Psychological", "DG.Navigation.Agent.gear": "Equipment", + "DG.Navigation.Agent.personal": "Personal", "DG.Navigation.Agent.bio": "Bio", "DG.Navigation.Agent.bonds": "Bonds", "DG.Navigation.NPC.skills": "Skills & Training", @@ -310,11 +313,13 @@ "DG.Sheet.BlockHeaders.Statistics": "STATISTICS", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "PHYSICAL DESCRIPTION / NOTES", "DG.Sheet.BlockHeaders.SkillsAndTraining": "SKILLS AND TRAINING", + "DG.Sheet.BlockHeaders.SpecialTraining": "SPECIAL 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.ScenarioInformation": "SCENARIO INFORMATION", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "BONDS / RELATIONSHIPS / CONTACTS", "DG.AgentSheet.ProfessionPlaceholder": "PROFESSION (RANK IF APPLICABLE)", diff --git a/lang/es.json b/lang/es.json index c35a0ac..b3699c7 100644 --- a/lang/es.json +++ b/lang/es.json @@ -84,6 +84,7 @@ "DG.Skills.Tooltip.unnatural": "Conocimiento acerca de los secretos más fundamentales y desgarradores del universo. Úsala para recordar, reconocer o investigar hechos sobre todo aquello que los humanos consideran antinatural. Esto va mucho más allá del ocultismo, porque la habilidad Antinatural representa cosas que existen de verdad. Utilízala para poder filtrar información de los confines más oscuros de los mitos y el folclore y reconocer qué partes son ciertas. El valor de COR de tu Agente nunca puede ser superior a 99 menos su valor de habilidad Antinatural.", "DG.Skills.AddTypedOrCustomSkill": "Añadir tipo o habilidad personalizada", + "DG.Skills.ToggleEditDeleteSkills": "Editar/eliminar habilidades", "DG.Skills.AddSkill": "Añadir habilidad", "DG.Skills.Apply": "Aplicar", "DG.Skills.ApplySkillImprovements.Title": "Aplicar mejoras de habilidad", @@ -142,9 +143,11 @@ "DG.Attributes.Tooltip.cha": "Encanto, liderazgo y atractivo personal. Podría indicar atractivo físico.", "DG.Navigation.Agent.skills": "Habilidades", + "DG.Navigation.Agent.combat": "Combate", "DG.Navigation.Agent.physical": "Características", "DG.Navigation.Agent.motivations": "Salud mental", "DG.Navigation.Agent.gear": "Equipo", + "DG.Navigation.Agent.personal": "Personal", "DG.Navigation.Agent.bio": "Trasfondo", "DG.Navigation.Agent.bonds": "Lazos", "DG.Navigation.NPC.skills": "Habilidades y entrenamiento", @@ -308,11 +311,13 @@ "DG.Sheet.BlockHeaders.Statistics": "CARACTERÍSTICAS", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "DESCRIPCIÓN FÍSICA Y NOTAS", "DG.Sheet.BlockHeaders.SkillsAndTraining": "HABILIDADES Y ENTRENAMIENTO", + "DG.Sheet.BlockHeaders.SpecialTraining": "ENTRENAMIENTO ESPECIAL", "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.ScenarioInformation": "INFORMACIÓN DEL ESCENARIO", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "LAZOS, RELACIONES Y CONTACTOS", "DG.AgentSheet.ProfessionPlaceholder": "Profesión (rango, si es necesario)", diff --git a/lang/fr.json b/lang/fr.json index 9e98377..2f314d6 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -84,6 +84,7 @@ "DG.Skills.Tooltip.unnatural": "Connaissance des secrets fondamentaux de l’univers, propres à provoquer la folie.", "DG.Skills.AddTypedOrCustomSkill": "Ajouter une compétence personnalisée", + "DG.Skills.ToggleEditDeleteSkills": "Modifier/supprimer les compétences", "DG.Skills.AddSkill": "Ajout Compétence", "DG.Skills.Apply": "Appliquer", "DG.Skills.ApplySkillImprovements": "Appliquer l'augmentation d'EXP", @@ -142,9 +143,11 @@ "DG.Attributes.Tooltip.cha": "Voir Page 19 du Manuel de l'Agent - Charisme", "DG.Navigation.Agent.skills": "Compétences", + "DG.Navigation.Agent.combat": "Combat", "DG.Navigation.Agent.physical": "Statistiques", "DG.Navigation.Agent.motivations": "Psychologie", "DG.Navigation.Agent.gear": "Équipement", + "DG.Navigation.Agent.personal": "Personnel", "DG.Navigation.Agent.bio": "Biographie", "DG.Navigation.Agent.bonds": "Attaches", "DG.Navigation.NPC.skills": "Compétences & Formation", @@ -308,11 +311,13 @@ "DG.Sheet.BlockHeaders.Statistics": "STATISTIQUES", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "DESCRIPTION PHYSIQUE / NOTES", "DG.Sheet.BlockHeaders.SkillsAndTraining": "COMPÉTENCES ET FORMATION", + "DG.Sheet.BlockHeaders.SpecialTraining": "FORMATION SPÉCIALE", "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.ScenarioInformation": "INFORMATIONS DE SCÉNARIO", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "ATTACHES, RELATIONS ET CONTACTS", "DG.AgentSheet.ProfessionPlaceholder": "PROFESSION (RANG LE CAS ÉCHÉANT)", diff --git a/lang/ja.json b/lang/ja.json index c6293fd..a0e22a0 100644 --- a/lang/ja.json +++ b/lang/ja.json @@ -47,6 +47,7 @@ "DG.Skills.flight": "飛行", "DG.Skills.AddTypedOrCustomSkill": "類型/カスタム技能を追加", + "DG.Skills.ToggleEditDeleteSkills": "技能の編集/削除", "DG.Skills.AddSkill": "技能を追加", "DG.Skills.Apply": "適用", "DG.Skills.ApplySkillImprovements": "技能上達を適用", @@ -92,6 +93,14 @@ "DG.Navigation.Gear": "装備", "DG.Navigation.CV": "経歴", "DG.Navigation.Contacts": "絆", + "DG.Navigation.Agent.skills": "技能", + "DG.Navigation.Agent.combat": "戦闘", + "DG.Navigation.Agent.physical": "能力値", + "DG.Navigation.Agent.motivations": "精神", + "DG.Navigation.Agent.gear": "装備", + "DG.Navigation.Agent.personal": "経歴", + "DG.Navigation.Agent.bio": "経歴", + "DG.Navigation.Agent.bonds": "絆", "DG.About.OnlineHelp": "システムドキュメンテーション(オンライン)", "DG.About.OnlineHelpTooltip": "オンラインGitHubヘルプをブラウザで開く。", @@ -243,11 +252,13 @@ "DG.Sheet.BlockHeaders.Statistics": "能力値", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "身体的特徴とメモ", "DG.Sheet.BlockHeaders.SkillsAndTraining": "技能と訓練", + "DG.Sheet.BlockHeaders.SpecialTraining": "特殊訓練", "DG.Sheet.BlockHeaders.Injuries": "負傷", "DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "限界点と慣れ", "DG.Sheet.BlockHeaders.Adaptations": "慣れ", "DG.Sheet.BlockHeaders.MotivationsAndDisorders": "モチベーションと精神障害", "DG.Sheet.BlockHeaders.PersonalInfoCV": "個人情報 / 経歴", + "DG.Sheet.BlockHeaders.ScenarioInformation": "シナリオ情報", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "絆 / 関係 / 協力者", "DG.UnnaturalSheet.HideUntrainedSkillsLabel": "初期値の技能を非表示", diff --git a/lang/pl.json b/lang/pl.json index b28a2ad..d4ddfd9 100644 --- a/lang/pl.json +++ b/lang/pl.json @@ -84,6 +84,7 @@ "DG.Skills.Tooltip.unnatural": "Rozpoznawanie, badanie lub przypominanie sobie prawd o bytach i siłach wykraczających poza ludzkie zrozumienie.", "DG.Skills.AddTypedOrCustomSkill": "Dodaj Typową/Niestandardową Umiejętność", + "DG.Skills.ToggleEditDeleteSkills": "Edytuj/usuń umiejętności", "DG.Skills.AddSkill": "Dodaj Umiejętność", "DG.Skills.Apply": "Zastosuj", "DG.Skills.ApplySkillImprovements.Title": "Zastosuj ulepszenia umiejętności", @@ -142,9 +143,11 @@ "DG.Attributes.Tooltip.cha": "Zobacz stronę 19 Podręcznika Agenta – Charyzma", "DG.Navigation.Agent.skills": "Umiejętności", + "DG.Navigation.Agent.combat": "Walka", "DG.Navigation.Agent.physical": "Statystyki", "DG.Navigation.Agent.motivations": "Psychika", "DG.Navigation.Agent.gear": "Wyposażenie", + "DG.Navigation.Agent.personal": "Osobiste", "DG.Navigation.Agent.bio": "Osobiste", "DG.Navigation.Agent.bonds": "Więzi", "DG.Navigation.NPC.skills": "Umiejętności i szkolenia", @@ -306,11 +309,13 @@ "DG.Sheet.BlockHeaders.Statistics": "STATYSTYKI", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "OPIS FIZYCZNY / UWAGI", "DG.Sheet.BlockHeaders.SkillsAndTraining": "UMIEJĘTNOŚCI I SZKOLENIE", + "DG.Sheet.BlockHeaders.SpecialTraining": "SZKOLENIE SPECJALNE", "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.ScenarioInformation": "INFORMACJE SCENARIUSZA", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "WIĘZI / RELACJE / KONTAKTY", "DG.AgentSheet.ProfessionPlaceholder": "ZAWÓD (RANGA, JEŚLI DOTYCZY)", diff --git a/lang/pt-BR.json b/lang/pt-BR.json index 53fea46..93c7b4b 100644 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -84,6 +84,7 @@ "DG.Skills.Tooltip.unnatural": "Reconhecer, pesquisar ou recordar verdades sobre entidades e forças além da compreensão humana.", "DG.Skills.AddTypedOrCustomSkill": "Adicionar Habilidade Personalizada", + "DG.Skills.ToggleEditDeleteSkills": "Editar/excluir habilidades", "DG.Skills.AddSkill": "Adicionar Habilidade", "DG.Skills.Apply": "Aplicar", "DG.Skills.ApplySkillImprovements.Title": "Aplicar Melhorias", @@ -142,9 +143,11 @@ "DG.Attributes.Tooltip.cha": "Veja a página 19 do Manual do Agente — Carisma.", "DG.Navigation.Agent.skills": "Habilidades", + "DG.Navigation.Agent.combat": "Combate", "DG.Navigation.Agent.physical": "Estatísticas", "DG.Navigation.Agent.motivations": "Mental", "DG.Navigation.Agent.gear": "Equipamento", + "DG.Navigation.Agent.personal": "Pessoal", "DG.Navigation.Agent.bio": "Pessoal", "DG.Navigation.Agent.bonds": "Laços", "DG.Navigation.NPC.skills": "Habilidades & Treinamento", @@ -308,11 +311,13 @@ "DG.Sheet.BlockHeaders.Statistics": "ESTATÍSTICAS", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "Descrição Física/Notas", "DG.Sheet.BlockHeaders.SkillsAndTraining": "HABILIDADES E TREINAMENTO", + "DG.Sheet.BlockHeaders.SpecialTraining": "TREINAMENTO ESPECIAL", "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.ScenarioInformation": "INFORMAÇÕES DO CENÁRIO", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "LAÇOS / RELACIONAMENTOS / CONTATOS", "DG.AgentSheet.ProfessionPlaceholder": "PROFISSÂO", diff --git a/lang/sv.json b/lang/sv.json index 668c7e3..2074e69 100644 --- a/lang/sv.json +++ b/lang/sv.json @@ -47,6 +47,7 @@ "DG.Skills.flight": "Flyg", "DG.Skills.AddTypedOrCustomSkill": "Lägg till anpassad färdighet", + "DG.Skills.ToggleEditDeleteSkills": "Redigera/ta bort färdigheter", "DG.Skills.AddSkill": "Lägg till färdighet", "DG.Skills.Apply": "Tillämpa", "DG.Skills.ApplySkillImprovements": "Förbättra ibockade färdigheter ", @@ -92,6 +93,14 @@ "DG.Navigation.Gear": "Utrustning", "DG.Navigation.CV": "Personligt", "DG.Navigation.Contacts": "Kontakter", + "DG.Navigation.Agent.skills": "Färdigheter", + "DG.Navigation.Agent.combat": "Strid", + "DG.Navigation.Agent.physical": "Statistik", + "DG.Navigation.Agent.motivations": "Psykologi", + "DG.Navigation.Agent.gear": "Utrustning", + "DG.Navigation.Agent.personal": "Personligt", + "DG.Navigation.Agent.bio": "Personligt", + "DG.Navigation.Agent.bonds": "Kontakter", "DG.About.OnlineHelp": "Systemdokumentation på (ONLINE)", "DG.About.OnlineHelpTooltip": "Starta webbläsare med online GitHub-hjälp.", @@ -243,11 +252,13 @@ "DG.Sheet.BlockHeaders.Statistics": "STATISTIK", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "ANTECKNINGAR", "DG.Sheet.BlockHeaders.SkillsAndTraining": "FÄRDIGHETER OCH TRÄNING", + "DG.Sheet.BlockHeaders.SpecialTraining": "SPECIALTRÄ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.ScenarioInformation": "SCENARIOINFORMATION", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "KAMRATER OCH RELATIONER", "DG.UnnaturalSheet.HideUntrainedSkillsLabel": "Dölj otränade färdigheter", diff --git a/lang/uk.json b/lang/uk.json index aa4196b..7c8d23e 100644 --- a/lang/uk.json +++ b/lang/uk.json @@ -84,6 +84,7 @@ "DG.Skills.Tooltip.unnatural": "Розпізнавати, досліджувати або пригадувати істини про сили, що виходять за межі людського розуміння.", "DG.Skills.AddTypedOrCustomSkill": "Додати типізовану/власну навичку", + "DG.Skills.ToggleEditDeleteSkills": "Редагувати/видалити навички", "DG.Skills.AddSkill": "Додати навичку", "DG.Skills.Apply": "Застосувати", "DG.Skills.ApplySkillImprovements.Title": "Застосувати покращення навичок", @@ -142,9 +143,11 @@ "DG.Attributes.Tooltip.cha": "Див. стор. 19 в Agent's Handbook — Charisma (Харизма)", "DG.Navigation.Agent.skills": "Навички", + "DG.Navigation.Agent.combat": "Бій", "DG.Navigation.Agent.physical": "Статистика", "DG.Navigation.Agent.motivations": "Психологія", "DG.Navigation.Agent.gear": "Спорядження", + "DG.Navigation.Agent.personal": "Особисте", "DG.Navigation.Agent.bio": "Особисте", "DG.Navigation.Agent.bonds": "Зв’язки", "DG.Navigation.NPC.skills": "Навички та підготовка", @@ -308,11 +311,13 @@ "DG.Sheet.BlockHeaders.Statistics": "СТАТИСТИКА", "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes": "ФІЗИЧНИЙ ОПИС / НОТАТКИ", "DG.Sheet.BlockHeaders.SkillsAndTraining": "НАВИЧКИ ТА ПІДГОТОВКА", + "DG.Sheet.BlockHeaders.SpecialTraining": "СПЕЦІАЛЬНА ПІДГОТОВКА", "DG.Sheet.BlockHeaders.Injuries": "ТРАВМИ", "DG.Sheet.BlockHeaders.BreakingPointAndAdaptations": "ТОЧКА ЗЛАМУ ТА АДАПТАЦІЇ", "DG.Sheet.BlockHeaders.Adaptations": "Адаптації", "DG.Sheet.BlockHeaders.MotivationsAndDisorders": "МОТИВАЦІЇ ТА РОЗЛАДИ", "DG.Sheet.BlockHeaders.PersonalInfoCV": "ОСОБИСТІ ДАНІ / РЕЗЮМЕ", + "DG.Sheet.BlockHeaders.ScenarioInformation": "ІНФОРМАЦІЯ СЦЕНАРІЮ", "DG.Sheet.BlockHeaders.BondsRelationshipsContacts": "ЗВ’ЯЗКИ / СТОСУНКИ / КОНТАКТИ", "DG.AgentSheet.ProfessionPlaceholder": "ПРОФЕСІЯ (ЗВАННЯ, ЯКЩО Є)", diff --git a/module/sheets/agent-sheet-v2.js b/module/sheets/agent-sheet-v2.js index a424730..68374a8 100644 --- a/module/sheets/agent-sheet-v2.js +++ b/module/sheets/agent-sheet-v2.js @@ -5,9 +5,35 @@ 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: 700 }, + position: { width: 958, height: 700 }, actions: { openStatsEdit: this._openStatsEdit, + toggleCustomSkillsEdit: function toggleCustomSkillsEdit(event) { + event.preventDefault(); + event.stopPropagation(); + this._customSkillsEditMode = !this._customSkillsEditMode; + this._syncCustomSkillsEditModeUi(); + return this.render(); + }, + }, + }); + + /** @type {boolean} */ + _customSkillsEditMode = false; + + /** @override */ + static TABS = /** @type {const} */ ({ + primary: { + initial: "skills", + labelPrefix: "DG.Navigation.Agent", + tabs: [ + { id: "skills" }, + { id: "combat" }, + { id: "motivations" }, + { id: "gear" }, + { id: "personal" }, + { id: "about", icon: "fas fa-question-circle", label: "" }, + ], }, }); @@ -21,19 +47,233 @@ export default class DGAgentSheetV2 extends DGAgentSheet { rightBar: { template: `${this.TEMPLATE_PATH}/parts/right-bar.html`, templates: [ - `${this.TEMPLATE_PATH}/parts/skills-tab.html`, - `${this.TEMPLATE_PATH}/parts/physical-tab-v2.html`, + `${this.TEMPLATE_PATH}/parts/skills-tab-v2.html`, + `${this.TEMPLATE_PATH}/parts/combat-tab-v2.html`, `${this.TEMPLATE_PATH}/parts/motivations-tab-v2.html`, - `${this.TEMPLATE_PATH}/parts/gear-tab.html`, - `${this.TEMPLATE_PATH}/parts/bio-tab-v2.html`, - `${this.TEMPLATE_PATH}/parts/bonds-tab.html`, + `${this.TEMPLATE_PATH}/parts/gear-tab-v2.html`, + `${this.TEMPLATE_PATH}/parts/personal-tab-v2.html`, `${this.TEMPLATE_PATH}/parts/about-tab.html`, - `${this.TEMPLATE_PATH}/partials/custom-skills-partial.html`, + `${this.TEMPLATE_PATH}/partials/custom-skills-partial-v2.html`, + `${this.TEMPLATE_PATH}/partials/bonds-section-partial.html`, + `${this.TEMPLATE_PATH}/partials/weapons-section-partial.html`, + `${this.TEMPLATE_PATH}/partials/armor-section-partial.html`, + `${this.TEMPLATE_PATH}/partials/injuries-section-partial.html`, + `${this.TEMPLATE_PATH}/partials/other-gear-section-partial.html`, `${this.TEMPLATE_PATH}/partials/notes-partial.html`, ], }, }); + /** @override */ + _configureRenderOptions(options) { + super._configureRenderOptions(options); + + if (!this.actor.limited) return; + + options.parts = ["leftBar", "tabs", "rightBar"]; + } + + /** @override */ + _prepareTabs(group) { + const tabs = super._prepareTabs(group); + + if (!this.actor.limited || this.actor.type !== "agent") return tabs; + + return { + personal: { ...tabs.personal, active: true, cssClass: "active" }, + }; + } + + /** @override */ + async _prepareContext(options) { + const context = await super._prepareContext(options); + + if (this.actor.type !== "agent") return context; + + context.typedSkillColumns = this._prepareTypedSkillColumns(); + context.customSkillsEditMode = this._customSkillsEditMode; + + return context; + } + + /** @override */ + async _onRender(context, options) { + await super._onRender(context, options); + this._syncCustomSkillsEditModeUi(); + } + + /** @returns {void} */ + _syncCustomSkillsEditModeUi() { + this.element?.classList.toggle( + "custom-skills-edit-mode", + Boolean(this._customSkillsEditMode), + ); + } + + /** + * Packs skill groups into columns without splitting a group across columns. + * Respects the world "Sort Skills By Column" setting (same as core skills). + * + * @param {object[]} groups - Skill groups with skills and rowCount (sorted A–Z). + * @param {number} numCols - Number of columns. + * @returns {object[][]} Column arrays of render blocks. + */ + _packSkillGroupsIntoColumns(groups, numCols) { + const sortByColumn = game.settings.get("deltagreen", "sortSkills"); + if (sortByColumn) { + return this._packSkillGroupsByColumn(groups, numCols); + } + return this._packSkillGroupsByRow(groups, numCols); + } + + /** + * @param {object} column + * @param {object} group + * @returns {void} + */ + _appendSkillGroupToColumn(column, group) { + column.blocks.push({ + type: "groupHeader", + group: group.group, + label: group.label, + ...(group.isSpecialTraining ? { isSpecialTraining: true } : {}), + }); + + const skillType = group.isSpecialTraining ? "training" : "typedSkill"; + for (const skill of group.skills) { + column.blocks.push({ ...skill, type: skillType }); + } + + column.height += group.rowCount; + } + + /** + * Column-first packing (read down each column, then the next). + * + * @param {object[]} groups + * @param {number} numCols + * @returns {object[][]} + */ + _packSkillGroupsByColumn(groups, numCols) { + const columns = Array.from({ length: numCols }, () => ({ + blocks: [], + height: 0, + })); + + if (groups.length === 0) { + return columns.map((col) => col.blocks); + } + + const totalHeight = groups.reduce((sum, group) => sum + group.rowCount, 0); + const targetHeight = totalHeight / numCols; + let colIndex = 0; + + for (const group of groups) { + const col = columns[colIndex]; + + if ( + colIndex < numCols - 1 && + col.blocks.length > 0 && + col.height + group.rowCount > targetHeight + ) { + colIndex += 1; + } + + this._appendSkillGroupToColumn(columns[colIndex], group); + } + + return columns.map((col) => col.blocks); + } + + /** + * Row-first packing (groups round-robin across columns, like core skill row sort). + * + * @param {object[]} groups + * @param {number} numCols + * @returns {object[][]} + */ + _packSkillGroupsByRow(groups, numCols) { + const columns = Array.from({ length: numCols }, () => ({ + blocks: [], + height: 0, + })); + + for (let i = 0; i < groups.length; i++) { + this._appendSkillGroupToColumn(columns[i % numCols], groups[i]); + } + + return columns.map((col) => col.blocks); + } + + /** + * Builds grouped typed-skill columns for the V2 skills tab. + * + * @returns {object[][]} + */ + _prepareTypedSkillColumns() { + const groupsMap = new Map(); + + for (const [key, skill] of Object.entries(this.actor.system.typedSkills)) { + const groupKey = skill.group; + if (!groupsMap.has(groupKey)) { + groupsMap.set(groupKey, { + group: groupKey, + label: game.i18n.localize(`DG.TypeSkills.${groupKey}`), + skills: [], + rowCount: 0, + }); + } + + groupsMap.get(groupKey).skills.push({ + ...skill, + key, + actorType: this.actor.type, + }); + } + + const groups = [...groupsMap.values()].map((group) => { + group.skills.sort((a, b) => + a.label.localeCompare(b.label, game.i18n.lang), + ); + group.rowCount = 1 + group.skills.length; + return group; + }); + + groups.sort((a, b) => a.label.localeCompare(b.label, game.i18n.lang)); + + const trainings = this._prepareSpecialTrainingBlocks(); + if (trainings.length > 0) { + groups.push({ + group: "specialTraining", + isSpecialTraining: true, + label: game.i18n.localize("DG.Sheet.BlockHeaders.SpecialTraining"), + skills: trainings, + rowCount: 1 + trainings.length, + }); + } + + return this._packSkillGroupsIntoColumns(groups, 3); + } + + /** + * Sorted special-training blocks for the skills tab (single-column list). + * + * @returns {object[]} + */ + _prepareSpecialTrainingBlocks() { + const trainings = this._prepareSpecialTrainings().map((training) => ({ + ...training, + sortLabel: training.name.toUpperCase(), + actorType: this.actor.type, + })); + + trainings.sort((a, b) => + a.sortLabel.localeCompare(b.sortLabel, game.i18n.lang), + ); + + return trainings; + } + static _openStatsEdit() { const form = new ActorEditStatForm({ actor: this.actor, diff --git a/templates/actor/partials/armor-section-partial.html b/templates/actor/partials/armor-section-partial.html new file mode 100644 index 0000000..b2e83d7 --- /dev/null +++ b/templates/actor/partials/armor-section-partial.html @@ -0,0 +1,75 @@ +