From efc23f466bd9451da20b416ad6a98b758a8ea652 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 7 Jan 2025 19:51:49 +0100 Subject: [PATCH] Fix #20 : Track cured disorder --- assets/ui/d100.svg | 47 ++++++++++++++++++++++++++++++++ lang/en.json | 3 ++ module/models/mentaldisorder.mjs | 3 +- templates/mentaldisorder.hbs | 4 +++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 assets/ui/d100.svg diff --git a/assets/ui/d100.svg b/assets/ui/d100.svg new file mode 100644 index 0000000..97fcdfd --- /dev/null +++ b/assets/ui/d100.svg @@ -0,0 +1,47 @@ + + + + + + + diff --git a/lang/en.json b/lang/en.json index 02b46c7..86496b2 100644 --- a/lang/en.json +++ b/lang/en.json @@ -210,6 +210,9 @@ "FIELDS": { "description": { "label": "Description" + }, + "cured": { + "label": "Cured" } } }, diff --git a/module/models/mentaldisorder.mjs b/module/models/mentaldisorder.mjs index 0f7f6cc..a05888a 100644 --- a/module/models/mentaldisorder.mjs +++ b/module/models/mentaldisorder.mjs @@ -5,7 +5,8 @@ export default class CthulhuEternalMentalDisorder extends foundry.abstract.TypeD const schema = {} schema.description = new fields.HTMLField({ required: true, textSearch: true }) - + schema.cured = new fields.BooleanField({ required: true, initial: false }) + return schema } diff --git a/templates/mentaldisorder.hbs b/templates/mentaldisorder.hbs index 9dfccf1..275871f 100644 --- a/templates/mentaldisorder.hbs +++ b/templates/mentaldisorder.hbs @@ -4,6 +4,10 @@ {{formInput fields.name value=source.name}} +
+ {{formField systemFields.cured value=system.cured localize=true}} +
+
{{localize "CTHULHUETERNAL.Label.description"}} {{formInput