This commit is contained in:
2025-09-18 10:43:10 +02:00
parent 5186b26408
commit ddae4ad4b0
2 changed files with 17 additions and 13 deletions
+12 -11
View File
@@ -95,6 +95,7 @@ try {
data.rtRawString = "{}";
}
// expose a minimal config (labels)
data.cfg = {
labels: {
@@ -145,17 +146,17 @@ try {
callback: async (html) => {
const form = html[0].querySelector("form") || html[0];
const get = (k) => Number(form.querySelector(`[name="${k}"]`)?.value || 0);
const patch = {
"base.armour": get("armour"),
"base.integrity": get("integrity"),
"base.manoeuvre": get("manoeuvre"),
"base.detection": get("detection"),
"base.speed": get("speed"),
"base.space": get("space"),
"base.power": get("power")
};
for (const [k, v] of Object.entries(patch)) await this.actor.setFlag(VB_MOD, k, v);
this.render(true);
const patchBase = {
armour: get("armour"),
integrity: get("integrity"),
manoeuvre: get("manoeuvre"),
detection: get("detection"),
speed: get("speed"),
space: get("space"),
power: get("power")
};
await this.actor.setFlag(VB_MOD, "base", patchBase);
this.render(true);
}
},
cancel: { label: "Cancel" }