diff --git a/langs/en-ca.json b/langs/en-ca.json index 09b5bc8..28a8dfc 100644 --- a/langs/en-ca.json +++ b/langs/en-ca.json @@ -19,12 +19,14 @@ "HeroSkillsCardV1": "Hero Skill Card" }, "common": { - "ability": { + "abilities": { "grit": "Grit", "gait": "Gait", "grip": "Grip", - "glim": "Glim" + "glim": "Glim", + "thin-glim": "Thin Glim" }, + "ability": "Ability", "access": { "Common": "Common", "Uncommon": "Uncommon", @@ -95,10 +97,10 @@ "Apps": { "move-run": "@RipCrypt.common.move • @RipCrypt.common.run", "traits-range": "@RipCrypt.common.traits • @RipCrypt.common.range", - "grit-skills": "@RipCrypt.common.ability.grit Skills", - "gait-skills": "@RipCrypt.common.ability.gait Skills", - "grip-skills": "@RipCrypt.common.ability.grip Skills", - "glim-skills": "@RipCrypt.common.ability.glim Skills", + "grit-skills": "@RipCrypt.common.abilities.grit Skills", + "gait-skills": "@RipCrypt.common.abilities.gait Skills", + "grip-skills": "@RipCrypt.common.abilities.grip Skills", + "glim-skills": "@RipCrypt.common.abilities.glim Skills", "a11y": { "guts-value-edit": "The current amount of guts the character has", "guts-value-readonly": "The current amount of guts the character has", diff --git a/module/Apps/ActorSheets/HeroSummaryCardV1.mjs b/module/Apps/ActorSheets/HeroSummaryCardV1.mjs index e3883d3..e5ed643 100644 --- a/module/Apps/ActorSheets/HeroSummaryCardV1.mjs +++ b/module/Apps/ActorSheets/HeroSummaryCardV1.mjs @@ -125,7 +125,7 @@ export class HeroSummaryCardV1 extends GenericAppMixin(HandlebarsApplicationMixi ctx.abilities.push({ id: key, name: localizer( - `RipCrypt.common.ability.${key}`, + `RipCrypt.common.abilities.${key}`, { value: ctx.actor.system.ability[key] }, ), value: ctx.meta.limited ? `?` : ctx.actor.system.ability[key], diff --git a/module/data/Item/Skill.mjs b/module/data/Item/Skill.mjs index d2ace39..57c52c9 100644 --- a/module/data/Item/Skill.mjs +++ b/module/data/Item/Skill.mjs @@ -2,10 +2,21 @@ import { gameTerms } from "../../gameTerms.mjs"; const { fields } = foundry.data; +const abilityPaths = [`grit`, `gait`, `grip`, `glim`, `thin-glim`]; + export class SkillData extends foundry.abstract.TypeDataModel { // MARK: Schema static defineSchema() { - const schema = {}; + const schema = { + ability: new fields.StringField({ + initial: abilityPaths[0], + blank: true, + trim: true, + nullable: false, + required: true, + choices: () => abilityPaths, + }), + }; const advances = {}; for (const rank of Object.values(gameTerms.Rank)) { @@ -35,7 +46,19 @@ export class SkillData extends foundry.abstract.TypeDataModel { // #region Sheet Data getFormFields(_ctx) { - const fields = []; + const fields = [ + { + id: `fate-path`, + type: `dropdown`, + label: `RipCrypt.common.ability`, + path: `system.ability`, + value: this.ability, + options: abilityPaths.map(ability => ({ + label: `RipCrypt.common.abilities.${ability}`, + value: ability, + })), + }, + ]; return fields; }; // #endregion