diff --git a/langs/en-ca.json b/langs/en-ca.json
index 28a8dfc..0ed068f 100644
--- a/langs/en-ca.json
+++ b/langs/en-ca.json
@@ -33,6 +33,7 @@
"Rare": "Rare",
"Scarce": "Scarce"
},
+ "advances": "Advances",
"ammo": "Ammo",
"anatomy": {
"head": "Head",
diff --git a/module/data/Item/Skill.mjs b/module/data/Item/Skill.mjs
index 57c52c9..c02351a 100644
--- a/module/data/Item/Skill.mjs
+++ b/module/data/Item/Skill.mjs
@@ -58,6 +58,20 @@ export class SkillData extends foundry.abstract.TypeDataModel {
value: ability,
})),
},
+ {
+ type: `group`,
+ title: `RipCrypt.common.advances`,
+ paddingTop: `20px`,
+ fields: Object.values(gameTerms.Rank).map(rank => {
+ return {
+ id: `advance-${rank}`,
+ type: `text`,
+ label: `RipCrypt.common.rankNames.${rank}`,
+ path: `system.advances.${rank}`,
+ value: this.advances[rank] ?? ``,
+ };
+ }),
+ },
];
return fields;
};
diff --git a/module/handlebarHelpers/inputs/formFields.mjs b/module/handlebarHelpers/inputs/formFields.mjs
index c916962..bf97126 100644
--- a/module/handlebarHelpers/inputs/formFields.mjs
+++ b/module/handlebarHelpers/inputs/formFields.mjs
@@ -1,8 +1,10 @@
import { barInput } from "./barInput.mjs";
import { booleanInput } from "./booleanInput.mjs";
import { dropdownInput } from "./dropdownInput.mjs";
+import { groupInput } from "./groupInput.mjs";
import { numberInput } from "./numberInput.mjs";
import { stringSet } from "./stringSet.mjs";
+import { textInput } from "./textInput.mjs";
const { getType } = foundry.utils;
@@ -12,6 +14,8 @@ const inputTypes = {
bar: barInput,
dropdown: dropdownInput,
boolean: booleanInput,
+ group: groupInput,
+ text: textInput,
};
const typesToSanitize = new Set([ `string`, `number` ]);
@@ -21,7 +25,9 @@ export function formFields(inputs, opts) {
for (const input of inputs) {
if (inputTypes[input.type] == null) { continue };
- input.limited ??= true;
+ if (input.type !== `group`) {
+ input.limited ??= true;
+ };
if (typesToSanitize.has(getType(input.value))) {
input.value = Handlebars.escapeExpression(input.value);
diff --git a/module/handlebarHelpers/inputs/groupInput.mjs b/module/handlebarHelpers/inputs/groupInput.mjs
new file mode 100644
index 0000000..d6a5c45
--- /dev/null
+++ b/module/handlebarHelpers/inputs/groupInput.mjs
@@ -0,0 +1,26 @@
+import { formFields } from "./formFields.mjs";
+import { localizer } from "../../utils/Localizer.mjs";
+
+export function groupInput(input, data) {
+ const title = localizer(input.title);
+
+ const content = formFields(
+ input.fields,
+ {
+ data: { root: data },
+ hash: { joiner: input.joiner ?? `` },
+ },
+ );
+
+ return `