diff --git a/module/models/Item/Aspect.mjs b/module/models/Item/Aspect.mjs index 5890588..bbcf426 100644 --- a/module/models/Item/Aspect.mjs +++ b/module/models/Item/Aspect.mjs @@ -1,11 +1,12 @@ -export class AspectItemData extends foundry.abstract.TypeDataModel { +import { DescribedItemData } from "./DescribedItemData.mjs"; + +export class AspectItemData extends DescribedItemData { static defineSchema() { const fields = foundry.data.fields; return { used: new fields.BooleanField({ initial: false }), /** The number of seconds that the effect of the aspect stays */ deactivateAfter: new fields.NumberField({ nullable: true }), - info: new fields.HTMLField({ nullable: true, blank: false, trim: true }), }; }; }; diff --git a/module/models/Item/CommonItemData.mjs b/module/models/Item/CommonItemData.mjs index abcbb5a..dd1e85a 100644 --- a/module/models/Item/CommonItemData.mjs +++ b/module/models/Item/CommonItemData.mjs @@ -25,10 +25,26 @@ export class CommonItemData extends foundry.abstract.TypeDataModel { integer: true, }), tier: new fields.StringField({ - initial: `simple`, + initial: DOTDUNGEON.defaultItemTier, nullable: false, choices: DOTDUNGEON.itemTiers, }), + location: new fields.StringField({ + initial: null, + nullable: true, + /* + "equipped" = on player, actively having an effect (e.g. armour + is worn, weapon is held), not all items have an equipped state + "inventory" = on player, equivalent to being put in a backpack + "storage" = not on player at all, in a chest in their house or + smth, these items should be displayed in the storage tab + "transportation" = not on player, in some form of transportation, + these items should be hidden on the sheet and the items that + are on a transportation should be referenced by UUID in that + transportation item + */ + choices: ["equipped", "inventory", "storage", "transportation"], + }), }; }; }; diff --git a/module/models/Item/Equipment.mjs b/module/models/Item/Equipment.mjs index 6e9d7f9..82b58de 100644 --- a/module/models/Item/Equipment.mjs +++ b/module/models/Item/Equipment.mjs @@ -3,12 +3,6 @@ import { DescribedItemData } from "./DescribedItemData.mjs"; export class EquipmentItemData extends DescribedItemData { static defineSchema() { const fields = foundry.data.fields; - return mergeObject(super.defineSchema(), { - extra_inventory: new fields.NumberField({ - initial: null, - nullable: true, - required: false, - }), - }); + return mergeObject(super.defineSchema(), {}); }; };