From ac4ca8bc1c270ca7007c56cb906ebd06723b10af Mon Sep 17 00:00:00 2001 From: phBalance Date: Fri, 8 Nov 2024 21:50:40 -0700 Subject: [PATCH 1/3] chore(v12): don't create temp documents, just new them --- module/actor/actor-sheet.mjs | 18 +- module/actor/actor.mjs | 26 +- module/item/item-attack.mjs | 14 +- module/testing/testing-damage-functions.mjs | 20 +- module/testing/testing-defense.mjs | 48 +- .../testing/testing-everything-lad-lass.mjs | 4 +- module/testing/testing-full.mjs | 14 +- module/testing/testing-upload.mjs | 626 +++++++----------- 8 files changed, 314 insertions(+), 456 deletions(-) diff --git a/module/actor/actor-sheet.mjs b/module/actor/actor-sheet.mjs index 13d4529e..63f0ea36 100644 --- a/module/actor/actor-sheet.mjs +++ b/module/actor/actor-sheet.mjs @@ -254,7 +254,7 @@ export class HeroSystemActorSheet extends ActorSheet { name: "Defense Calculation Actor", type: "pc", }, - { temporary: true }, + {}, ); defenseCalculationActor.system.is5e = this.actor.system.is5e; @@ -263,9 +263,9 @@ export class HeroSystemActorSheet extends ActorSheet { `; - const pdAttack = await new HeroSystem6eItem( + const pdAttack = new HeroSystem6eItem( HeroSystem6eItem.itemDataFromXml(pdContentsAttack, defenseCalculationActor), - { temporary: true, parent: defenseCalculationActor }, + { parent: defenseCalculationActor }, ); await pdAttack._postUpload(); @@ -313,9 +313,9 @@ export class HeroSystemActorSheet extends ActorSheet { `; - const edAttack = await new HeroSystem6eItem( + const edAttack = new HeroSystem6eItem( HeroSystem6eItem.itemDataFromXml(edContentsAttack, defenseCalculationActor), - { temporary: true, parent: defenseCalculationActor }, + { parent: defenseCalculationActor }, ); await edAttack._postUpload(); @@ -364,9 +364,9 @@ export class HeroSystemActorSheet extends ActorSheet { `; - const mdAttack = await new HeroSystem6eItem( + const mdAttack = new HeroSystem6eItem( HeroSystem6eItem.itemDataFromXml(mdContentsAttack, defenseCalculationActor), - { temporary: true, parent: defenseCalculationActor }, + { parent: defenseCalculationActor }, ); await mdAttack._postUpload(); @@ -412,9 +412,9 @@ export class HeroSystemActorSheet extends ActorSheet { `; - const drainAttack = await new HeroSystem6eItem( + const drainAttack = new HeroSystem6eItem( HeroSystem6eItem.itemDataFromXml(drainContentsAttack, defenseCalculationActor), - { temporary: true, parent: defenseCalculationActor }, + { parent: defenseCalculationActor }, ); await drainAttack._postUpload(); diff --git a/module/actor/actor.mjs b/module/actor/actor.mjs index 465a6824..1762257c 100644 --- a/module/actor/actor.mjs +++ b/module/actor/actor.mjs @@ -871,19 +871,14 @@ export class HeroSystem6eActor extends Actor { }, ], origin: this.uuid, - // duration: { - // seconds: 3.154e7 * 100, // 100 years should be close to infinity - // }, flags: { dcvDex: dcvDex, - // temporary: true, encumbrance: true, }, }; if (prevActiveEffect) { await prevActiveEffect.delete(); - //prevActiveEffect = null; } await this.createEmbeddedDocuments("ActiveEffect", [activeEffect]); @@ -1335,12 +1330,12 @@ export class HeroSystem6eActor extends Actor { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Reset system properties to defaults - const _actor = await HeroSystem6eActor.create( + const _actor = new HeroSystem6eActor( { name: "Test Actor", type: this.type, }, - { temporary: true }, + {}, ); const _system = _actor.system; @@ -1532,8 +1527,7 @@ export class HeroSystem6eActor extends Actor { } } } else { - const item = await HeroSystem6eItem.create(itemData, { - temporary: true, + const item = new HeroSystem6eItem(itemData, { parent: this, }); this.items.set(item.system.XMLID + item.system.POSITION, item); @@ -1580,8 +1574,7 @@ export class HeroSystem6eActor extends Actor { POSITION: parseInt(system2.POSITION), }, }; - const item = await HeroSystem6eItem.create(itemData2, { - temporary: true, + const item = new HeroSystem6eItem(itemData2, { parent: this, }); this.items.set(item.system.XMLID + item.system.POSITION, item); @@ -1829,10 +1822,13 @@ export class HeroSystem6eActor extends Actor { levels: "0", }, }; - const perceptionItem = await HeroSystem6eItem.create(itemDataPerception, { - temporary: this.id ? false : true, - parent: this, - }); + const perceptionItem = this.id + ? await HeroSystem6eItem.create(itemDataPerception, { + parent: this, + }) + : new HeroSystem6eItem(itemDataPerception, { + parent: this, + }); if (!this.id) { this.items.set(perceptionItem.system.XMLID, perceptionItem); } diff --git a/module/item/item-attack.mjs b/module/item/item-attack.mjs index 721c5152..59fe81f2 100644 --- a/module/item/item-attack.mjs +++ b/module/item/item-attack.mjs @@ -445,7 +445,7 @@ export async function AttackToHit(item, options) { const effectiveItemData = item.toObject(); effectiveItemData._id = null; effectiveItemData.system.LEVELS = options.effectiveLevels; - effectiveItem = await HeroSystem6eItem.create(effectiveItemData, { parent: item.actor, temporary: true }); + effectiveItem = new HeroSystem6eItem(effectiveItemData, { parent: item.actor }); await effectiveItem._postUpload(); } } @@ -1220,9 +1220,7 @@ async function _rollApplyKnockback(token, knockbackDice) { `; - const pdAttack = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(pdContentsAttack, actor), { - temporary: true, - }); + const pdAttack = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(pdContentsAttack, actor), {}); await pdAttack._postUpload(); pdAttack.name ??= "KNOCKBACK"; @@ -1402,7 +1400,7 @@ export async function _onRollDamage(event) { const effectiveItemData = item.toObject(); effectiveItemData._id = null; effectiveItemData.system.LEVELS = toHitData.effectiveLevels; - effectiveItem = await HeroSystem6eItem.create(effectiveItemData, { parent: item.actor, temporary: true }); + effectiveItem = new HeroSystem6eItem(effectiveItemData, { parent: item.actor }); await effectiveItem._postUpload(); } } @@ -1662,7 +1660,7 @@ export async function _onRollMindScanEffectRoll(event) { const effectiveItemData = item.toObject(); effectiveItemData._id = null; effectiveItemData.system.LEVELS = toHitData.effectiveLevels; - effectiveItem = await HeroSystem6eItem.create(effectiveItemData, { parent: item.actor, temporary: true }); + effectiveItem = new HeroSystem6eItem(effectiveItemData, { parent: item.actor }); await effectiveItem._postUpload(); } } @@ -3198,9 +3196,7 @@ async function _calcKnockback(body, item, options, knockbackMultiplier) { `; - const kbAttack = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(kbContentsAttack, actor), { - temporary: true, - }); + const kbAttack = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(kbContentsAttack, actor), {}); //await pdAttack._postUpload(); let { defenseValue, defenseTags } = getActorDefensesVsAttack(actor, kbAttack); knockbackTags = [...knockbackTags, ...defenseTags]; diff --git a/module/testing/testing-damage-functions.mjs b/module/testing/testing-damage-functions.mjs index 7c9edab2..7fa3a37c 100644 --- a/module/testing/testing-damage-functions.mjs +++ b/module/testing/testing-damage-functions.mjs @@ -158,12 +158,11 @@ export function registerDamageFunctionTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -197,13 +196,12 @@ export function registerDamageFunctionTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -237,12 +235,11 @@ export function registerDamageFunctionTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -276,12 +273,11 @@ export function registerDamageFunctionTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); diff --git a/module/testing/testing-defense.mjs b/module/testing/testing-defense.mjs index e222fb24..d38d0d83 100644 --- a/module/testing/testing-defense.mjs +++ b/module/testing/testing-defense.mjs @@ -20,24 +20,22 @@ export function registerDefenseTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); const contentsAttack = ` `; - const itemDefense = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + const itemDefense = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await itemDefense._postUpload(); actor.items.set(itemDefense.system.XMLID, itemDefense); - const itemAttack = await new HeroSystem6eItem( - HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), - { temporary: true, parent: actor }, - ); + const itemAttack = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), { + parent: actor, + }); await itemAttack._postUpload(); const defense = determineDefense(actor, itemAttack); @@ -55,24 +53,22 @@ export function registerDefenseTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); const contentsAttack = ` `; - const itemDefense = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + const itemDefense = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await itemDefense._postUpload(); actor.items.set(itemDefense.system.XMLID, itemDefense); - const itemAttack = await new HeroSystem6eItem( - HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), - { temporary: true, parent: actor }, - ); + const itemAttack = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), { + parent: actor, + }); await itemAttack._postUpload(); const defense = determineDefense(actor, itemAttack); @@ -90,7 +86,7 @@ export function registerDefenseTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); const contentsAttack = ` @@ -98,17 +94,15 @@ export function registerDefenseTests(quench) { `; - const itemDefense = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + const itemDefense = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await itemDefense._postUpload(); actor.items.set(itemDefense.system.XMLID, itemDefense); - const itemAttack = await new HeroSystem6eItem( - HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), - { temporary: true, parent: actor }, - ); + const itemAttack = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), { + parent: actor, + }); await itemAttack._postUpload(); const defense = determineDefense(actor, itemAttack); @@ -126,7 +120,7 @@ export function registerDefenseTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); const contentsAttack = ` @@ -134,17 +128,15 @@ export function registerDefenseTests(quench) { `; - const itemDefense = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + const itemDefense = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await itemDefense._postUpload(); actor.items.set(itemDefense.system.XMLID, itemDefense); - const itemAttack = await new HeroSystem6eItem( - HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), - { temporary: true, parent: actor }, - ); + const itemAttack = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contentsAttack, actor), { + parent: actor, + }); await itemAttack._postUpload(); diff --git a/module/testing/testing-everything-lad-lass.mjs b/module/testing/testing-everything-lad-lass.mjs index a309212d..04933d1b 100644 --- a/module/testing/testing-everything-lad-lass.mjs +++ b/module/testing/testing-everything-lad-lass.mjs @@ -953,7 +953,7 @@ export function registerEverythingLadLass(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); @@ -1938,7 +1938,7 @@ export function registerEverythingLadLass(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); diff --git a/module/testing/testing-full.mjs b/module/testing/testing-full.mjs index a6183e3b..bcabd365 100644 --- a/module/testing/testing-full.mjs +++ b/module/testing/testing-full.mjs @@ -96,7 +96,7 @@ export function registerFullTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); @@ -373,7 +373,7 @@ export function registerFullTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); @@ -846,7 +846,7 @@ export function registerFullTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); @@ -1107,7 +1107,7 @@ export function registerFullTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); @@ -1381,7 +1381,7 @@ export function registerFullTests(quench) { name: defaultActorName, type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); @@ -1537,7 +1537,7 @@ export function registerFullTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); @@ -1710,7 +1710,7 @@ export function registerFullTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor.uploadFromXml(contents); diff --git a/module/testing/testing-upload.mjs b/module/testing/testing-upload.mjs index 741e2c91..1c56c860 100644 --- a/module/testing/testing-upload.mjs +++ b/module/testing/testing-upload.mjs @@ -34,12 +34,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -102,12 +101,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -149,12 +147,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -198,13 +195,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.dex.value = 15; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -252,12 +248,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -306,12 +301,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -359,12 +353,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -412,12 +405,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -468,12 +460,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -521,12 +512,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -580,12 +570,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -633,12 +622,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -697,13 +685,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -763,13 +750,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -820,13 +806,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -877,13 +862,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -940,13 +924,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -997,13 +980,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1052,13 +1034,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1106,13 +1087,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1157,13 +1137,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1209,13 +1188,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.dex.value = 15; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1273,13 +1251,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.ego.value = 38; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1333,12 +1310,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1402,12 +1378,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1461,13 +1436,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.ego.value = 38; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1532,13 +1506,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.ego.value = 38; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1589,13 +1562,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1640,13 +1612,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1688,13 +1659,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1736,13 +1706,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1784,13 +1753,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1832,13 +1800,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1883,13 +1850,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1934,13 +1900,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); actor.system.is5e = true; - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -1985,13 +1950,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2033,13 +1997,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2081,13 +2044,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2132,13 +2094,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2183,13 +2144,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2231,13 +2191,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2279,13 +2238,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2331,12 +2289,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2376,13 +2333,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2423,13 +2379,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2479,13 +2434,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2528,13 +2482,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.str.value = 10; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2582,13 +2535,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.str.value = 15; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2649,13 +2601,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.str.value = 15; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2703,12 +2654,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2746,12 +2696,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2792,12 +2741,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2857,12 +2805,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2919,12 +2866,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -2971,12 +2917,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3036,12 +2981,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3106,12 +3050,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3157,12 +3100,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3212,12 +3154,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3273,13 +3214,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.int.value = 25; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3332,13 +3272,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.int.value = 13; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3392,13 +3331,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.int.value = 13; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3448,13 +3386,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.int.value = 13; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3509,13 +3446,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3557,13 +3493,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = false; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3610,12 +3545,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3660,13 +3594,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3720,13 +3653,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3769,12 +3701,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3824,13 +3755,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3875,12 +3805,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3935,12 +3864,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -3995,20 +3923,18 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - mpItem = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(mpContents, actor), { - temporary: true, + mpItem = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(mpContents, actor), { parent: actor, }); await mpItem._postUpload(); actor.items.set(mpItem.system.XMLID, mpItem); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4074,19 +4000,17 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - mpItem = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(mpContents, actor), { - temporary: true, + mpItem = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(mpContents, actor), { parent: actor, }); await mpItem._postUpload(); actor.items.set(mpItem.system.XMLID, mpItem); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4155,22 +4079,20 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); // Elemental Control - ecItem = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(ecContents, actor), { - temporary: true, + ecItem = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(ecContents, actor), { parent: actor, }); await ecItem._postUpload(); actor.items.set(ecItem.system.XMLID, ecItem); // Power in Elemental Control - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4244,13 +4166,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4307,13 +4228,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4362,13 +4282,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4431,13 +4350,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4488,12 +4406,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4550,12 +4467,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4600,12 +4516,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4647,12 +4562,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4691,13 +4605,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4739,13 +4652,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4796,13 +4708,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4847,12 +4758,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4890,12 +4800,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -4940,19 +4849,18 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - skillEnhancerItem = await new HeroSystem6eItem( + skillEnhancerItem = new HeroSystem6eItem( HeroSystem6eItem.itemDataFromXml(skillEnhancerContents, actor), - { temporary: true, parent: actor }, + { parent: actor }, ); await skillEnhancerItem._postUpload(); actor.items.set(skillEnhancerItem.system.XMLID, skillEnhancerItem); - skillItem = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + skillItem = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await skillItem._postUpload(); @@ -5013,12 +4921,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5069,12 +4976,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5123,12 +5029,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5174,13 +5079,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5229,13 +5133,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5287,13 +5190,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5351,13 +5253,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5406,13 +5307,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5461,12 +5361,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5518,12 +5417,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5575,12 +5473,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5629,12 +5526,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5686,12 +5582,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5740,12 +5635,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5794,12 +5688,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5848,12 +5741,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5902,12 +5794,11 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -5959,13 +5850,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6024,13 +5914,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6129,13 +6018,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6181,17 +6069,17 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.dex.value = 15; await actor._postUpload(); - item = await new HeroSystem6eItem( + item = new HeroSystem6eItem( { ...HeroSystem6eItem.itemDataFromXml(contents, actor), type: "martialart", // TODO: Kludge to make itemDataFromXml match the uploading code. }, - { temporary: true, parent: actor }, + { parent: actor }, ); await item._postUpload(); actor.items.set(item.system.XMLID, item); @@ -6235,17 +6123,17 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem( + item = new HeroSystem6eItem( { ...HeroSystem6eItem.itemDataFromXml(contents, actor), type: "martialart", // TODO: Kludge to make itemDataFromXml match the uploading code. }, - { temporary: true, parent: actor }, + { parent: actor }, ); await item._postUpload(); actor.items.set(item.system.XMLID, item); @@ -6290,7 +6178,7 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); @@ -6300,7 +6188,7 @@ export function registerUploadTests(quench) { ...HeroSystem6eItem.itemDataFromXml(contents, actor), type: "martialart", // TODO: Kludge to make itemDataFromXml match the uploading code. }, - { temporary: true, parent: actor }, + { parent: actor }, ); await item._postUpload(); actor.items.set(item.system.XMLID, item); @@ -6346,7 +6234,7 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.characteristics.dex.value = 15; await actor._postUpload(); @@ -6356,7 +6244,7 @@ export function registerUploadTests(quench) { ...HeroSystem6eItem.itemDataFromXml(contents, actor), type: "martialart", // TODO: Kludge to make itemDataFromXml match the uploading code. }, - { temporary: true, parent: actor }, + { parent: actor }, ); await item._postUpload(); actor.items.set(item.system.XMLID, item); @@ -6397,13 +6285,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6469,21 +6356,19 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; actor.system.characteristics.int.value = 15; await actor._postUpload(); - const perceptionItem = await new HeroSystem6eItem(itemDataPerception, { - temporary: true, + const perceptionItem = new HeroSystem6eItem(itemDataPerception, { parent: actor, }); await perceptionItem._postUpload(); actor.items.set(perceptionItem.system.XMLID, perceptionItem); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6536,13 +6421,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6599,13 +6483,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6656,13 +6539,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = false; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6710,13 +6592,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = false; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6773,13 +6654,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = false; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6832,13 +6712,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); @@ -6916,13 +6795,12 @@ export function registerUploadTests(quench) { name: "Quench Actor", type: "pc", }, - { temporary: true }, + {}, ); actor.system.is5e = false; await actor._postUpload(); - item = await new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { - temporary: true, + item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); await item._postUpload(); From 7641722e13d75ac3be7e60b6d9b366f2e63c849e Mon Sep 17 00:00:00 2001 From: phBalance Date: Fri, 8 Nov 2024 22:18:10 -0700 Subject: [PATCH 2/3] refactor(comments): clean up comment --- module/actor/actor.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/actor/actor.mjs b/module/actor/actor.mjs index 1762257c..62186323 100644 --- a/module/actor/actor.mjs +++ b/module/actor/actor.mjs @@ -1409,8 +1409,7 @@ export class HeroSystem6eActor extends Actor { if (this.system.is5e && this.id) { // We can't delay this with the changes array because any items based on this actor needs this value. - // Speifically compound power is a problem if we don't set is5e properly for a 5e actor. - // changes[`system.is5e`] = this.system.is5e; + // Specifically compound power is a problem if we don't set is5e properly for a 5e actor. await this.update({ "system.is5e": this.system.is5e }); } From 9dbf1dda7c854fa1a30f06ef243f5a81b8ce884d Mon Sep 17 00:00:00 2001 From: phBalance Date: Fri, 8 Nov 2024 22:18:33 -0700 Subject: [PATCH 3/3] fix(test): make actor.system.is5e = false rather than falsy --- module/testing/testing-damage-functions.mjs | 3 + module/testing/testing-upload.mjs | 66 ++++++++++++++++++++- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/module/testing/testing-damage-functions.mjs b/module/testing/testing-damage-functions.mjs index 7fa3a37c..cfdee4c5 100644 --- a/module/testing/testing-damage-functions.mjs +++ b/module/testing/testing-damage-functions.mjs @@ -160,6 +160,7 @@ export function registerDamageFunctionTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -237,6 +238,7 @@ export function registerDamageFunctionTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -275,6 +277,7 @@ export function registerDamageFunctionTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { diff --git a/module/testing/testing-upload.mjs b/module/testing/testing-upload.mjs index 1c56c860..9da96814 100644 --- a/module/testing/testing-upload.mjs +++ b/module/testing/testing-upload.mjs @@ -36,6 +36,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -103,6 +104,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -149,6 +151,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -197,6 +200,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.dex.value = 15; await actor._postUpload(); @@ -250,6 +254,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -303,6 +308,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -355,6 +361,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -407,6 +414,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -462,6 +470,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -514,6 +523,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -572,6 +582,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -624,6 +635,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -1190,6 +1202,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.dex.value = 15; await actor._postUpload(); @@ -1253,6 +1266,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.ego.value = 38; await actor._postUpload(); @@ -1312,6 +1326,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -1380,6 +1395,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -1438,6 +1454,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.ego.value = 38; await actor._postUpload(); @@ -1508,6 +1525,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.ego.value = 38; await actor._postUpload(); @@ -1902,9 +1920,9 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = true; await actor._postUpload(); - actor.system.is5e = true; item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { parent: actor, }); @@ -2291,6 +2309,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -2484,6 +2503,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.str.value = 10; await actor._postUpload(); @@ -2537,6 +2557,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.str.value = 15; await actor._postUpload(); @@ -2603,6 +2624,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.str.value = 15; await actor._postUpload(); @@ -2656,6 +2678,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -2698,6 +2721,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -2743,6 +2767,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -2807,6 +2832,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -2868,6 +2894,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -2919,6 +2946,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -2983,6 +3011,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -3052,6 +3081,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -3102,6 +3132,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -3156,6 +3187,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -3216,6 +3248,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.int.value = 25; await actor._postUpload(); @@ -3274,6 +3307,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.int.value = 13; await actor._postUpload(); @@ -3333,6 +3367,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.int.value = 13; await actor._postUpload(); @@ -3388,6 +3423,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.int.value = 13; await actor._postUpload(); @@ -3547,6 +3583,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -3703,6 +3740,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -3807,6 +3845,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -3866,6 +3905,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4002,6 +4042,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); mpItem = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(mpContents, actor), { @@ -4408,6 +4449,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4469,6 +4511,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4518,6 +4561,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4564,6 +4608,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4760,6 +4805,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4802,6 +4848,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4851,6 +4898,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); skillEnhancerItem = new HeroSystem6eItem( @@ -4923,6 +4971,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -4978,6 +5027,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5031,6 +5081,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5363,6 +5414,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5419,6 +5471,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5475,6 +5528,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5528,6 +5582,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5584,6 +5639,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5637,6 +5693,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5690,6 +5747,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5743,6 +5801,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -5796,6 +5855,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; await actor._postUpload(); item = new HeroSystem6eItem(HeroSystem6eItem.itemDataFromXml(contents, actor), { @@ -6071,6 +6131,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.dex.value = 15; await actor._postUpload(); @@ -6183,7 +6244,7 @@ export function registerUploadTests(quench) { actor.system.is5e = true; await actor._postUpload(); - item = await new HeroSystem6eItem( + item = new HeroSystem6eItem( { ...HeroSystem6eItem.itemDataFromXml(contents, actor), type: "martialart", // TODO: Kludge to make itemDataFromXml match the uploading code. @@ -6236,6 +6297,7 @@ export function registerUploadTests(quench) { }, {}, ); + actor.system.is5e = false; actor.system.characteristics.dex.value = 15; await actor._postUpload();