From fb4af90b07b72b8d6b0d7be7fdcca94fce679c6f Mon Sep 17 00:00:00 2001 From: "walther.johnson" Date: Mon, 7 Jul 2025 16:33:15 -0600 Subject: [PATCH] fix unnecessary fallback and change to uuid field for validation --- module/data/action/baseAction.mjs | 4 ++-- module/data/chat-message/abilityUse.mjs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 4d3da21e..5997cd05 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -536,8 +536,8 @@ export default class DHBaseAction extends foundry.abstract.DataModel { description: this.description, actions: [], source: { - actor: this.item?.actor?.uuid ?? this.item?.actor?.id ?? null, - item: this.item?.uuid ?? this.item?.id ?? null + actor: this.item?.actor?.uuid ?? null, + item: this.item?.uuid ?? null } }; const msg = new cls({ diff --git a/module/data/chat-message/abilityUse.mjs b/module/data/chat-message/abilityUse.mjs index b593d271..b4498000 100644 --- a/module/data/chat-message/abilityUse.mjs +++ b/module/data/chat-message/abilityUse.mjs @@ -9,8 +9,8 @@ export default class DHAbilityUse extends foundry.abstract.TypeDataModel { name: new fields.StringField({}), description: new fields.StringField({}), source: new fields.SchemaField({ - actor: new fields.StringField({ nullable: true }), - item: new fields.StringField({ nullable: true }) + actor: new fields.DocumentUUIDField({ nullable: true, type: "Actor" }), + item: new fields.DocumentUUIDField({ nullable: true, Type: "Item" }) }), actions: new fields.ArrayField( new fields.ObjectField({