mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
[Feature] Loadout&Domains Homebrew (#529)
* Removed ChatTheme from settings * 0 or blank loadoutSize now means unlimited * Added Homebrew maxDomains
This commit is contained in:
parent
2e5337c5c5
commit
ee5c3a9322
14 changed files with 74 additions and 65 deletions
|
|
@ -318,8 +318,16 @@ export default class DhpActor extends Actor {
|
|||
|
||||
for (var domainCard of domainCards) {
|
||||
if (levelupAuto) {
|
||||
const item = await foundry.utils.fromUuid(domainCard.data[0]);
|
||||
const embeddedItem = await this.createEmbeddedDocuments('Item', [item.toObject()]);
|
||||
const itemData = (await foundry.utils.fromUuid(domainCard.data[0])).toObject();
|
||||
const embeddedItem = await this.createEmbeddedDocuments('Item', [
|
||||
{
|
||||
...itemData,
|
||||
system: {
|
||||
...itemData.system,
|
||||
inVault: true
|
||||
}
|
||||
}
|
||||
]);
|
||||
selections.push({ ...domainCard, itemUuid: embeddedItem[0].uuid });
|
||||
} else {
|
||||
selections.push({ ...domainCard });
|
||||
|
|
@ -329,8 +337,16 @@ export default class DhpActor extends Actor {
|
|||
const achievementDomainCards = [];
|
||||
if (levelupAuto) {
|
||||
for (var card of Object.values(level.achievements.domainCards)) {
|
||||
const item = await foundry.utils.fromUuid(card.uuid);
|
||||
const embeddedItem = await this.createEmbeddedDocuments('Item', [item.toObject()]);
|
||||
const itemData = (await foundry.utils.fromUuid(card.uuid)).toObject();
|
||||
const embeddedItem = await this.createEmbeddedDocuments('Item', [
|
||||
{
|
||||
...itemData,
|
||||
system: {
|
||||
...itemData.system,
|
||||
inVault: true
|
||||
}
|
||||
}
|
||||
]);
|
||||
card.itemUuid = embeddedItem[0].uuid;
|
||||
achievementDomainCards.push(card);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue