mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Added attribution for items, adversary and environment
This commit is contained in:
parent
2820c96259
commit
5f20505eda
22 changed files with 288 additions and 13 deletions
|
|
@ -39,7 +39,8 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
|
|||
type: 'base',
|
||||
isNPC: true,
|
||||
settingSheet: null,
|
||||
hasResistances: true
|
||||
hasResistances: true,
|
||||
hasAttribution: false
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -53,6 +54,13 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
|
|||
const fields = foundry.data.fields;
|
||||
const schema = {};
|
||||
|
||||
if (this.metadata.hasAttribution) {
|
||||
schema.attribution = new fields.SchemaField({
|
||||
source: new fields.StringField(),
|
||||
page: new fields.NumberField(),
|
||||
artist: new fields.StringField()
|
||||
});
|
||||
}
|
||||
if (this.metadata.isNPC) schema.description = new fields.HTMLField({ required: true, nullable: true });
|
||||
if (this.metadata.hasResistances)
|
||||
schema.resistance = new fields.SchemaField({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue