mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-07-15 02:36:42 -04:00
Update Simple Worldbuilding for Foundry 0.8.x Compatibility
This commit is contained in:
parent
ee8814b76a
commit
fb0add4cbc
11 changed files with 295 additions and 301 deletions
22
module/item.js
Normal file
22
module/item.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import {EntitySheetHelper} from "./helper.js";
|
||||
|
||||
/**
|
||||
* Extend the base Item document to support attributes and groups with a custom template creation dialog.
|
||||
* @extends {Item}
|
||||
*/
|
||||
export class SimpleItem extends Item {
|
||||
|
||||
/** @inheritdoc */
|
||||
prepareDerivedData() {
|
||||
super.prepareDerivedData();
|
||||
this.data.data.groups = this.data.data.groups || {};
|
||||
this.data.data.attributes = this.data.data.attributes || {};
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
static async createDialog(data={}, options={}) {
|
||||
return EntitySheetHelper.createDialog.call(this, data, options);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue