Remove some stuff that I started but began to overwhelm me
This commit is contained in:
parent
69f6d91385
commit
6700c8c1fb
6 changed files with 11 additions and 50 deletions
|
|
@ -1,13 +1,11 @@
|
|||
import AspectItem from "./Aspect.mjs";
|
||||
import SpellItem from "./Spell.mjs";
|
||||
import StructureItem from "./Structure.mjs";
|
||||
|
||||
/** @extends {Item} */
|
||||
export class ItemHandler extends Item {
|
||||
proxyTargets = {
|
||||
aspect: AspectItem,
|
||||
spell: SpellItem,
|
||||
structure: StructureItem,
|
||||
};
|
||||
|
||||
constructor(data, ctx) {
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
import { ItemHandler } from "./Handler.mjs";
|
||||
|
||||
/** @this {ItemHandler} */
|
||||
async function _preCreate() {
|
||||
if (this.isEmbedded) {
|
||||
let actor = this.actor;
|
||||
if (actor.type === "settlement") {
|
||||
return await actor.preItemEmbed(this);
|
||||
};
|
||||
ui.notifications.error(
|
||||
game.i18n.format(
|
||||
`dotdungeon.notification.error.cant-embed-item`,
|
||||
{ item: this, actor }
|
||||
),
|
||||
{ console: false, }
|
||||
);
|
||||
return false;
|
||||
};
|
||||
};
|
||||
|
||||
export default {
|
||||
_preCreate,
|
||||
};
|
||||
|
|
@ -9,7 +9,6 @@ export class EquipmentItemData extends DescribedItemData {
|
|||
nullable: true,
|
||||
required: false,
|
||||
}),
|
||||
material
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ export class PetItemData extends DescribedItemData {
|
|||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return mergeObject(super.defineSchema(), {
|
||||
upkeep: new fields.NumberField({ intial: null, nullable: true }),
|
||||
pokeballd: new fields.BooleanField({ initial: false }),
|
||||
upkeep: new fields.NumberField({ initial: null, nullable: true }),
|
||||
pokeballd: new fields.BooleanField({ initial: true }),
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
import { DescribedItemData } from "./DescribedItemData.mjs";
|
||||
|
||||
export class StructureItemData extends DescribedItemData {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return mergeObject(super.defineSchema(), {
|
||||
one_night: new fields.NumberField({
|
||||
initial: null,
|
||||
nullable: true,
|
||||
}),
|
||||
upkeep: new fields.NumberField({
|
||||
initial: null,
|
||||
nullable: true,
|
||||
}),
|
||||
construction_length: new fields.NumberField({
|
||||
min: 0,
|
||||
initial: 0,
|
||||
nullable: false,
|
||||
}),
|
||||
});
|
||||
};
|
||||
};
|
||||
9
module/models/template.mjs
Normal file
9
module/models/template.mjs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { DescribedItemData } from "./DescribedItemData.mjs";
|
||||
|
||||
export class TemplateData extends DescribedItemData {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return mergeObject(super.defineSchema(), {
|
||||
});
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue