mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
[Fix] Itemlink Redux Revengeance (#399)
* Small random fixes * Added use of ItemLinkFields * Multiclass levelup fixes * Fixed our onCreate methods unintentionally being run on all clients * Remade apps handling * Added for all class items and subclass * Restored foreignDocumentUuidField * Improved * PR fxies * Fixed tooltip enrichment * . * Reverted silly change
This commit is contained in:
parent
fcba5041e9
commit
2a4777f1a0
61 changed files with 648 additions and 489 deletions
|
|
@ -26,15 +26,15 @@ export default class DhpActor extends Actor {
|
|||
/** @inheritDoc */
|
||||
getEmbeddedDocument(embeddedName, id, options) {
|
||||
let doc;
|
||||
switch ( embeddedName ) {
|
||||
case "Action":
|
||||
switch (embeddedName) {
|
||||
case 'Action':
|
||||
doc = this.system.actions?.get(id);
|
||||
if(!doc && this.system.attack?.id === id) doc = this.system.attack;
|
||||
if (!doc && this.system.attack?.id === id) doc = this.system.attack;
|
||||
break;
|
||||
default:
|
||||
return super.getEmbeddedDocument(embeddedName, id, options);
|
||||
}
|
||||
if ( options?.strict && !doc ) {
|
||||
if (options?.strict && !doc) {
|
||||
throw new Error(`The key ${id} does not exist in the ${embeddedName} Collection`);
|
||||
}
|
||||
return doc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue