diff --git a/.gitignore b/.gitignore index ac39572..8e5ea01 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,3 @@ deltagreen.lock # Ignore npm modules node_modules - -# Ignore Foundry VTT Reference Files -reference/ \ No newline at end of file diff --git a/css/deltagreen.css b/css/deltagreen.css index 6c88506..c4f44a8 100644 --- a/css/deltagreen.css +++ b/css/deltagreen.css @@ -737,31 +737,35 @@ div .exhausted-section { margin-bottom: 5px; } -.tab.about .dg-about-links { - gap: 0.5rem; - margin-bottom: 1rem; -} +.tab.about { + .dg-about-links { + gap: 0.5rem; + margin-bottom: 1rem; -.tab.about .dg-about-links a { - display: inline-flex; - align-items: center; - gap: 0.5rem; - width: fit-content; - max-width: 100%; -} + a { + display: inline-flex; + align-items: center; + gap: 0.5rem; + width: fit-content; + max-width: 100%; -.tab.about .dg-about-links a i { - flex: 0 0 auto; -} + i { + flex: 0 0 auto; + } -.tab.about .dg-about-links a span { - flex: 1 1 auto; - line-height: 1.4; - text-align: left; -} + span { + flex: 1 1 auto; + line-height: 1.4; + text-align: left; + } + } + } -.tab.about .dg-about-legal p { - margin: 0.5rem 0; + .dg-about-legal { + p { + margin: 0.5rem 0; + } + } } textarea.wounds { diff --git a/module/data/actor/agent.js b/module/data/actor/agent.js index 1797bf1..a3b1fc8 100644 --- a/module/data/actor/agent.js +++ b/module/data/actor/agent.js @@ -1,7 +1,7 @@ import HumanSkillsActorData from "./base/human-skills.js"; import CharacterData from "./base/character.js"; -const { SchemaField, NumberField, StringField, BooleanField } = +const { SchemaField, NumberField, StringField, BooleanField, HTMLField } = foundry.data.fields; export default class AgentData extends CharacterData { @@ -29,8 +29,10 @@ export default class AgentData extends CharacterData { }), }), physical: new SchemaField({ - description: new StringField({ + description: new HTMLField({ initial: "", + blank: true, + textSearch: true, }), wounds: new StringField({ initial: "" }), firstAidAttempted: new BooleanField({ initial: false }), diff --git a/module/data/actor/npc.js b/module/data/actor/npc.js index 623d360..412cfc1 100644 --- a/module/data/actor/npc.js +++ b/module/data/actor/npc.js @@ -1,7 +1,7 @@ import HumanSkillsActorData from "./base/human-skills.js"; import CharacterData from "./base/character.js"; -const { SchemaField, NumberField, StringField, BooleanField } = +const { SchemaField, NumberField, StringField, BooleanField, HTMLField } = foundry.data.fields; export default class NPCData extends CharacterData { @@ -19,7 +19,7 @@ export default class NPCData extends CharacterData { biography: new SchemaField({ profession: new StringField({ initial: "" }), }), - notes: new StringField({ initial: "" }), + notes: new HTMLField({ initial: "", blank: true, textSearch: true }), shortDescription: new StringField({ initial: "" }), showUntrainedSkills: new BooleanField({ initial: true }), }; diff --git a/module/data/actor/unnatural.js b/module/data/actor/unnatural.js index 6a32949..6e01b87 100644 --- a/module/data/actor/unnatural.js +++ b/module/data/actor/unnatural.js @@ -1,7 +1,7 @@ import UnnaturalSkillsActorData from "./base/unnatural-skills.js"; import CharacterData from "./base/character.js"; -const { SchemaField, NumberField, StringField, BooleanField } = +const { SchemaField, NumberField, StringField, BooleanField, HTMLField } = foundry.data.fields; export default class UnnaturalData extends CharacterData { @@ -17,7 +17,7 @@ export default class UnnaturalData extends CharacterData { successLoss: new StringField({ initial: "1" }), }), schemaVersion: new NumberField({ initial: 1.0 }), - notes: new StringField({ initial: "" }), + notes: new HTMLField({ initial: "", blank: true, textSearch: true }), shortDescription: new StringField({ initial: "" }), showUntrainedSkills: new BooleanField({ initial: true }), }; diff --git a/module/data/actor/vehicle.js b/module/data/actor/vehicle.js index e21ff07..b1cf123 100644 --- a/module/data/actor/vehicle.js +++ b/module/data/actor/vehicle.js @@ -1,6 +1,6 @@ import SheetSettingsActorData from "./base/sheet-settings.js"; -const { SchemaField, NumberField, StringField, ArrayField } = +const { SchemaField, NumberField, StringField, ArrayField, HTMLField } = foundry.data.fields; export default class VehicleData extends foundry.abstract.TypeDataModel { @@ -8,7 +8,7 @@ export default class VehicleData extends foundry.abstract.TypeDataModel { return { ...SheetSettingsActorData.defineSchema(), name: new StringField({ initial: "" }), - description: new StringField({ initial: "" }), + description: new HTMLField({ initial: "", blank: true, textSearch: true }), shortDescription: new StringField({ initial: "" }), health: new SchemaField({ value: new NumberField({ initial: 10 }), diff --git a/module/data/item/base-fields.js b/module/data/item/base-fields.js index d8fba49..896b518 100644 --- a/module/data/item/base-fields.js +++ b/module/data/item/base-fields.js @@ -1,4 +1,4 @@ -const { StringField } = foundry.data.fields; +const { HTMLField } = foundry.data.fields; /** * Shared system fields for all Delta Green item types (from legacy template base). @@ -6,6 +6,6 @@ const { StringField } = foundry.data.fields; */ export default function defineBaseItemSystemFields() { return { - description: new StringField({ initial: "" }), + description: new HTMLField({ initial: "", blank: true, textSearch: true }), }; } diff --git a/module/data/item/bond.js b/module/data/item/bond.js index 16574dc..81ff8df 100644 --- a/module/data/item/bond.js +++ b/module/data/item/bond.js @@ -7,7 +7,7 @@ export default class BondItemData extends foundry.abstract.TypeDataModel { return { ...defineBaseItemSystemFields(), score: new NumberField({ initial: 10, integer: true }), - relationship: new StringField({ initial: "?" }), + relationship: new StringField({ initial: "" }), hasBeenDamagedSinceLastHomeScene: new BooleanField({ initial: false }), }; } diff --git a/module/data/item/ritual.js b/module/data/item/ritual.js index 30e8611..554e8b4 100644 --- a/module/data/item/ritual.js +++ b/module/data/item/ritual.js @@ -1,6 +1,6 @@ import defineBaseItemSystemFields from "./base-fields.js"; -const { NumberField, StringField, BooleanField, SchemaField } = +const { NumberField, StringField, BooleanField, SchemaField, HTMLField } = foundry.data.fields; export default class RitualItemData extends foundry.abstract.TypeDataModel { @@ -22,7 +22,7 @@ export default class RitualItemData extends foundry.abstract.TypeDataModel { activationCosts: new StringField({ initial: "" }), activationTime: new StringField({ initial: "" }), complexity: new StringField({ initial: "Simple" }), - handlerNotes: new StringField({ initial: "" }), + handlerNotes: new HTMLField({ initial: "", blank: true, textSearch: true }), revealed: new BooleanField({ initial: false }), }; } diff --git a/module/data/item/tome.js b/module/data/item/tome.js index 28a27af..ecf753a 100644 --- a/module/data/item/tome.js +++ b/module/data/item/tome.js @@ -1,6 +1,6 @@ import defineBaseItemSystemFields from "./base-fields.js"; -const { NumberField, StringField, BooleanField, SchemaField } = +const { NumberField, StringField, BooleanField, SchemaField, HTMLField } = foundry.data.fields; export default class TomeItemData extends foundry.abstract.TypeDataModel { @@ -16,7 +16,7 @@ export default class TomeItemData extends foundry.abstract.TypeDataModel { failedLoss: new StringField({ initial: "1D6" }), successLoss: new StringField({ initial: "1D4" }), }), - handlerNotes: new StringField({ initial: "" }), + handlerNotes: new HTMLField({ initial: "", blank: true, textSearch: true }), revealed: new BooleanField({ initial: false }), }; } diff --git a/system.json b/system.json index 1f7f15e..fec8891 100644 --- a/system.json +++ b/system.json @@ -203,19 +203,41 @@ "secondaryTokenAttribute": "wp", "documentTypes": { "Actor": { - "agent": {}, - "unnatural": {}, - "npc": {}, - "vehicle": {} + "agent": { + "htmlFields": ["physical.description"] + }, + "unnatural": { + "htmlFields": ["notes"] + }, + "npc": { + "htmlFields": ["notes"] + }, + "vehicle": { + "htmlFields": ["description"] + } }, "Item": { - "weapon": {}, - "armor": {}, - "motivation": {}, - "bond": {}, - "gear": {}, - "tome": {}, - "ritual": {} + "weapon": { + "htmlFields": ["description"] + }, + "armor": { + "htmlFields": ["description"] + }, + "motivation": { + "htmlFields": ["description"] + }, + "bond": { + "htmlFields": ["description"] + }, + "gear": { + "htmlFields": ["description"] + }, + "tome": { + "htmlFields": ["description", "handlerNotes"] + }, + "ritual": { + "htmlFields": ["description", "handlerNotes"] + } } } } diff --git a/template.json b/template.json deleted file mode 100644 index 0967ef4..0000000 --- a/template.json +++ /dev/null @@ -1 +0,0 @@ -{}