mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +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
|
|
@ -266,9 +266,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
const doc = await getDocFromElement(target);
|
||||
const actorLoadout = doc.actor.system.loadoutSlot;
|
||||
if (actorLoadout.available) return doc.update({ 'system.inVault': false });
|
||||
ui.notifications.warn(
|
||||
game.i18n.format('DAGGERHEART.UI.Notifications.loadoutMaxReached', { max: actorLoadout.max })
|
||||
);
|
||||
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.loadoutMaxReached'));
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -686,6 +684,11 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
*/
|
||||
static async #toggleVault(_event, button) {
|
||||
const doc = await getDocFromElement(button);
|
||||
const { available } = this.document.system.loadoutSlot;
|
||||
if (doc.system.inVault && !available) {
|
||||
return ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.loadoutMaxReached'));
|
||||
}
|
||||
|
||||
await doc?.update({ 'system.inVault': !doc.system.inVault });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue