Add the pet details (closes #135)
This commit is contained in:
parent
6504e33fad
commit
36976e5123
5 changed files with 107 additions and 3 deletions
|
|
@ -30,6 +30,7 @@ export const partials = [
|
|||
`actors/char-sheet/v2/partials/inventory/items/untyped.v2.pc.hbs`,
|
||||
`actors/char-sheet/v2/partials/inventory/items/aspect.v2.pc.hbs`,
|
||||
`actors/char-sheet/v2/partials/inventory/items/weapon.v2.pc.hbs`,
|
||||
`actors/char-sheet/v2/partials/inventory/items/pet.v2.pc.hbs`,
|
||||
];
|
||||
|
||||
export const preAliasedPartials = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,13 @@ import { DescribedItemData } from "./DescribedItemData.mjs";
|
|||
export class PetItemData extends DescribedItemData {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return mergeObject(super.defineSchema(), {
|
||||
const parentSchema = super.defineSchema();
|
||||
|
||||
delete parentSchema.quantity;
|
||||
delete parentSchema.quantity_affects_used_capacity;
|
||||
delete parentSchema.usage_cost;
|
||||
|
||||
return mergeObject(parentSchema, {
|
||||
upkeep: new fields.NumberField({ initial: null, nullable: true }),
|
||||
pokeballd: new fields.BooleanField({ initial: true }),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export class PlayerSheetv2 extends GenericActorSheet {
|
|||
return stats;
|
||||
};
|
||||
|
||||
_itemTypesHidden = new Set([`pet`, `armour`, `equipment`, `structure`, `service`]);
|
||||
_itemTypesHidden = new Set([`armour`, `equipment`, `structure`, `service`]);
|
||||
toggleItemFilter(filterName) {
|
||||
if (this._itemTypesHidden.has(filterName)) {
|
||||
this._itemTypesHidden.delete(filterName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue