mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
PR fixes
This commit is contained in:
parent
72dfc54705
commit
266a2806ab
13 changed files with 102 additions and 52 deletions
|
|
@ -43,14 +43,16 @@ export default class DHBeastform extends BaseDataItem {
|
|||
const allowed = await super._preCreate(data, options, user);
|
||||
if (allowed === false) return;
|
||||
|
||||
if (this.actor?.type !== 'character') {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.beastformInapplicable'));
|
||||
return;
|
||||
if (!this.actor) return;
|
||||
|
||||
if (this.actor.type !== 'character') {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.notifications.beastformInapplicable'));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.actor.items.find(x => x.type === 'beastform')) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.beastformAlreadyApplied'));
|
||||
return;
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.notifications.beastformAlreadyApplied'));
|
||||
return false;
|
||||
}
|
||||
|
||||
const features = await this.parent.parent.createEmbeddedDocuments(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue