diff --git a/lang/en.json b/lang/en.json index a824d379..7b8b45c7 100755 --- a/lang/en.json +++ b/lang/en.json @@ -113,9 +113,7 @@ "deleteTriggerTitle": "Delete Trigger", "deleteTriggerContent": "Are you sure you want to delete the {trigger} trigger?", "advantageState": "Advantage State", - "damageOnSave": "Damage on Save", - "useDefaultItemValues": "Use default Item values", - "itemDamageIsUsed": "Item Damage Is Used" + "damageOnSave": "Damage on Save" }, "RollField": { "diceRolling": { @@ -130,7 +128,7 @@ "attackModifier": "Attack Modifier", "attackName": "Attack Name", "criticalThreshold": "Critical Threshold", - "includeBase": { "label": "Use Item Damage" }, + "includeBase": { "label": "Include Item Damage" }, "groupAttack": { "label": "Group Attack" }, "multiplier": "Multiplier", "saveHint": "Set a default Trait to enable Reaction Roll. It can be changed later in Reaction Roll Dialog.", @@ -3235,7 +3233,6 @@ "Tooltip": { "disableEffect": "Disable Effect", "enableEffect": "Enable Effect", - "edit": "Edit", "openItemWorld": "Open Item World", "openActorWorld": "Open Actor World", "sendToChat": "Send to Chat", diff --git a/module/applications/sheets/actors/character.mjs b/module/applications/sheets/actors/character.mjs index 3b029771..f2686fdd 100644 --- a/module/applications/sheets/actors/character.mjs +++ b/module/applications/sheets/actors/character.mjs @@ -12,6 +12,8 @@ export default class CharacterSheet extends DHBaseActorSheet { static DEFAULT_OPTIONS = { classes: ['character'], position: { width: 850, height: 800 }, + /* Foundry adds disabled to all buttons and inputs if editPermission is missing. This is not desired. */ + editPermission: CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER, actions: { toggleVault: CharacterSheet.#toggleVault, rollAttribute: CharacterSheet.#rollAttribute, @@ -66,7 +68,7 @@ export default class CharacterSheet extends DHBaseActorSheet { } }, { - handler: CharacterSheet.#getEquipmentContextOptions, + handler: CharacterSheet.#getEquipamentContextOptions, selector: '[data-item-uuid][data-type="armor"], [data-item-uuid][data-type="weapon"]', options: { parentClassHooks: false, @@ -168,16 +170,6 @@ export default class CharacterSheet extends DHBaseActorSheet { return applicationOptions; } - /** @inheritdoc */ - _toggleDisabled(disabled) { - // Overriden to only disable text inputs by default. - // Everything else is done by checking @root.editable in the sheet - const form = this.form; - for (const input of form.querySelectorAll("input:not([type=search]), .editor.prosemirror")) { - input.disabled = disabled; - } - } - /** @inheritDoc */ async _onRender(context, options) { await super._onRender(context, options); @@ -323,11 +315,11 @@ export default class CharacterSheet extends DHBaseActorSheet { /**@type {import('@client/applications/ux/context-menu.mjs').ContextMenuEntry[]} */ const options = [ { - label: 'toLoadout', + name: 'toLoadout', icon: 'fa-solid fa-arrow-up', - visible: target => { + condition: target => { const doc = getDocFromElementSync(target); - return doc?.isOwner && doc.system.inVault; + return doc && doc.system.inVault; }, callback: async target => { const doc = await getDocFromElement(target); @@ -337,11 +329,11 @@ export default class CharacterSheet extends DHBaseActorSheet { } }, { - label: 'recall', + name: 'recall', icon: 'fa-solid fa-bolt-lightning', - visible: target => { + condition: target => { const doc = getDocFromElementSync(target); - return doc?.isOwner && doc.system.inVault; + return doc && doc.system.inVault; }, callback: async (target, event) => { const doc = await getDocFromElement(target); @@ -376,17 +368,17 @@ export default class CharacterSheet extends DHBaseActorSheet { } }, { - label: 'toVault', + name: 'toVault', icon: 'fa-solid fa-arrow-down', - visible: target => { + condition: target => { const doc = getDocFromElementSync(target); - return doc?.isOwner && !doc.system.inVault; + return doc && !doc.system.inVault; }, callback: async target => (await getDocFromElement(target)).update({ 'system.inVault': true }) } ].map(option => ({ ...option, - label: `DAGGERHEART.APPLICATIONS.ContextMenu.${option.label}`, + name: `DAGGERHEART.APPLICATIONS.ContextMenu.${option.name}`, icon: `` })); @@ -399,29 +391,29 @@ export default class CharacterSheet extends DHBaseActorSheet { * @this {CharacterSheet} * @protected */ - static #getEquipmentContextOptions() { + static #getEquipamentContextOptions() { const options = [ { - label: 'equip', + name: 'equip', icon: 'fa-solid fa-hands', - visible: target => { + condition: target => { const doc = getDocFromElementSync(target); - return doc.isOwner && doc && !doc.system.equipped; + return doc && !doc.system.equipped; }, callback: (target, event) => CharacterSheet.#toggleEquipItem.call(this, event, target) }, { - label: 'unequip', + name: 'unequip', icon: 'fa-solid fa-hands', - visible: target => { + condition: target => { const doc = getDocFromElementSync(target); - return doc.isOwner && doc && doc.system.equipped; + return doc && doc.system.equipped; }, callback: (target, event) => CharacterSheet.#toggleEquipItem.call(this, event, target) } ].map(option => ({ ...option, - label: `DAGGERHEART.APPLICATIONS.ContextMenu.${option.label}`, + name: `DAGGERHEART.APPLICATIONS.ContextMenu.${option.name}`, icon: `` })); diff --git a/module/applications/sheets/api/application-mixin.mjs b/module/applications/sheets/api/application-mixin.mjs index e0110ae3..e93ce774 100644 --- a/module/applications/sheets/api/application-mixin.mjs +++ b/module/applications/sheets/api/application-mixin.mjs @@ -418,18 +418,18 @@ export default function DHApplicationMixin(Base) { /**@type {import('@client/applications/ux/context-menu.mjs').ContextMenuEntry[]} */ const options = [ { - label: 'disableEffect', + name: 'disableEffect', icon: 'fa-solid fa-lightbulb', - visible: element => { + condition: element => { const target = element.closest('[data-item-uuid]'); return !target.dataset.disabled && target.dataset.itemType !== 'beastform'; }, callback: async target => (await getDocFromElement(target)).update({ disabled: true }) }, { - label: 'enableEffect', + name: 'enableEffect', icon: 'fa-regular fa-lightbulb', - visible: element => { + condition: element => { const target = element.closest('[data-item-uuid]'); return target.dataset.disabled && target.dataset.itemType !== 'beastform'; }, @@ -437,7 +437,7 @@ export default function DHApplicationMixin(Base) { } ].map(option => ({ ...option, - label: `DAGGERHEART.APPLICATIONS.ContextMenu.${option.label}`, + name: `DAGGERHEART.APPLICATIONS.ContextMenu.${option.name}`, icon: `` })); @@ -468,14 +468,14 @@ export default function DHApplicationMixin(Base) { _getContextMenuCommonOptions({ usable = false, toChat = false, deletable = true }) { const options = [ { - label: 'CONTROLS.CommonEdit', + name: 'CONTROLS.CommonEdit', icon: 'fa-solid fa-pen-to-square', - visible: target => { + condition: target => { const { dataset } = target.closest('[data-item-uuid]'); const doc = getDocFromElementSync(target); return ( (!dataset.noCompendiumEdit && !doc) || - (doc?.isOwner && (!doc?.hasOwnProperty('systemPath') || doc?.inCollection)) + (doc && (!doc?.hasOwnProperty('systemPath') || doc?.inCollection)) ); }, callback: async target => (await getDocFromElement(target)).sheet.render({ force: true }) @@ -484,12 +484,11 @@ export default function DHApplicationMixin(Base) { if (usable) { options.unshift({ - label: 'DAGGERHEART.GENERAL.damage', + name: 'DAGGERHEART.GENERAL.damage', icon: 'fa-solid fa-explosion', - visible: target => { + condition: target => { const doc = getDocFromElementSync(target); return ( - doc?.isOwner && !foundry.utils.isEmpty(doc?.system?.attack?.damage.parts) || !foundry.utils.isEmpty(doc?.damage?.parts) ); @@ -508,11 +507,11 @@ export default function DHApplicationMixin(Base) { }); options.unshift({ - label: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem', + name: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem', icon: 'fa-solid fa-burst', - visible: target => { + condition: target => { const doc = getDocFromElementSync(target); - return doc?.isOwner && !(doc.type === 'domainCard' && doc.system.inVault); + return doc && !(doc.type === 'domainCard' && doc.system.inVault); }, callback: async (target, event) => (await getDocFromElement(target)).use(event) }); @@ -520,19 +519,18 @@ export default function DHApplicationMixin(Base) { if (toChat) options.push({ - label: 'DAGGERHEART.APPLICATIONS.ContextMenu.sendToChat', + name: 'DAGGERHEART.APPLICATIONS.ContextMenu.sendToChat', icon: 'fa-solid fa-message', callback: async target => (await getDocFromElement(target)).toChat(this.document.uuid) }); if (deletable) options.push({ - label: 'CONTROLS.CommonDelete', + name: 'CONTROLS.CommonDelete', icon: 'fa-solid fa-trash', - visible: element => { + condition: element => { const target = element.closest('[data-item-uuid]'); - const doc = getDocFromElementSync(target); - return doc?.isOwner && target.dataset.itemType !== 'beastform'; + return target.dataset.itemType !== 'beastform'; }, callback: async (target, event) => { const doc = await getDocFromElement(target); diff --git a/module/applications/sidebar/tabs/actorDirectory.mjs b/module/applications/sidebar/tabs/actorDirectory.mjs index 89da1426..1306de61 100644 --- a/module/applications/sidebar/tabs/actorDirectory.mjs +++ b/module/applications/sidebar/tabs/actorDirectory.mjs @@ -48,9 +48,9 @@ export default class DhActorDirectory extends foundry.applications.sidebar.tabs. const options = super._getEntryContextOptions(); options.push( { - label: 'DAGGERHEART.UI.Sidebar.actorDirectory.duplicateToNewTier', + name: 'DAGGERHEART.UI.Sidebar.actorDirectory.duplicateToNewTier', icon: ``, - visible: li => { + condition: li => { const actor = game.actors.get(li.dataset.entryId); return actor?.type === 'adversary' && actor.system.type !== 'social'; }, @@ -92,9 +92,9 @@ export default class DhActorDirectory extends foundry.applications.sidebar.tabs. } }, { - label: 'DAGGERHEART.UI.Sidebar.actorDirectory.activateParty', + name: 'DAGGERHEART.UI.Sidebar.actorDirectory.activateParty', icon: ``, - visible: li => { + condition: li => { const actor = game.actors.get(li.dataset.entryId); return actor && actor.type === 'party' && !actor.system.active; }, diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index 34b25591..59939963 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -103,10 +103,23 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo _getEntryContextOptions() { return [ ...super._getEntryContextOptions(), + // { + // name: 'Reroll', + // icon: '', + // condition: li => { + // const message = game.messages.get(li.dataset.messageId); + + // return (game.user.isGM || message.isAuthor) && message.rolls.length > 0; + // }, + // callback: li => { + // const message = game.messages.get(li.dataset.messageId); + // new game.system.api.applications.dialogs.RerollDialog(message).render({ force: true }); + // } + // }, { - label: 'DAGGERHEART.UI.ChatLog.rerollDamage', + name: game.i18n.localize('DAGGERHEART.UI.ChatLog.rerollDamage'), icon: '', - visible: li => { + condition: li => { const message = game.messages.get(li.dataset.messageId); const hasRolledDamage = message.system.hasDamage ? Object.keys(message.system.damage).length > 0 diff --git a/module/applications/ui/combatTracker.mjs b/module/applications/ui/combatTracker.mjs index fb19a17e..1043e128 100644 --- a/module/applications/ui/combatTracker.mjs +++ b/module/applications/ui/combatTracker.mjs @@ -84,15 +84,15 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C _getCombatContextOptions() { return [ { - label: 'COMBAT.ClearMovementHistories', + name: 'COMBAT.ClearMovementHistories', icon: '', - visible: () => game.user.isGM && this.viewed?.combatants.size > 0, + condition: () => game.user.isGM && this.viewed?.combatants.size > 0, callback: () => this.viewed.clearMovementHistories() }, { - label: 'COMBAT.Delete', + name: 'COMBAT.Delete', icon: '', - visible: () => game.user.isGM && !!this.viewed, + condition: () => game.user.isGM && !!this.viewed, callback: () => this.viewed.endCombat() } ]; diff --git a/module/data/action/attackAction.mjs b/module/data/action/attackAction.mjs index f54ea282..5e93d70b 100644 --- a/module/data/action/attackAction.mjs +++ b/module/data/action/attackAction.mjs @@ -13,7 +13,7 @@ export default class DHAttackAction extends DHDamageAction { if (!!this.item?.system?.attack) { if (this.damage.includeBase) { const baseDamage = this.getParentDamage(); - this.damage.parts.hitPoints = new DHDamageData(baseDamage); + this.damage.parts.unshift(new DHDamageData(baseDamage)); } if (this.roll.useDefault) { this.roll.trait = this.item.system.attack.roll.trait; diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index f4835f34..0992350b 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -110,11 +110,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel return this._id; } - /** Returns true if the current user is the owner of the containing item */ - get isOwner() { - return this.item?.isOwner ?? true; - } - /** * Return Item the action is attached too. */ @@ -148,12 +143,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel : null; } - /** Returns true if the action is usable */ - get usable() { - const actor = this.actor; - return this.isOwner && actor?.type === 'character'; - } - static getRollType(parent) { return 'trait'; } diff --git a/module/data/item/base.mjs b/module/data/item/base.mjs index cc198dc4..72718c5e 100644 --- a/module/data/item/base.mjs +++ b/module/data/item/base.mjs @@ -108,8 +108,6 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel { } get actionsList() { - // No actions on non-characters - if (this.actor && this.actor.type !== 'character') return []; return this.actions; } diff --git a/module/data/item/weapon.mjs b/module/data/item/weapon.mjs index 75e6dc8e..9335037c 100644 --- a/module/data/item/weapon.mjs +++ b/module/data/item/weapon.mjs @@ -99,9 +99,7 @@ export default class DHWeapon extends AttachableItem { /* -------------------------------------------- */ get actionsList() { - // No actions on non-characters - if (this.actor && this.actor.type !== 'character') return []; - return [this.attack, ...super.actionsList]; + return [this.attack, ...this.actions]; } get customActions() { diff --git a/module/documents/item.mjs b/module/documents/item.mjs index 8ece56fa..a8b41b05 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -76,13 +76,6 @@ export default class DHItem extends foundry.documents.Item { return this.system.metadata.isInventoryItem ?? false; } - /** Returns true if the item can be used */ - get usable() { - const actor = this.actor; - const actionsList = this.system.actionsList; - return this.isOwner && actor?.type === 'character' && (actionsList?.size || actionsList?.length); - } - /** @inheritdoc */ static async createDialog(data = {}, createOptions = {}, options = {}) { const { folders, types, template, context = {}, ...dialogOptions } = options; diff --git a/styles/less/sheets/actors/character/sheet.less b/styles/less/sheets/actors/character/sheet.less index 68792c99..ee6580fd 100644 --- a/styles/less/sheets/actors/character/sheet.less +++ b/styles/less/sheets/actors/character/sheet.less @@ -11,6 +11,21 @@ padding-bottom: 0; overflow-x: auto; + &.viewMode { + button:not(.btn-toggle-view), + input:not(.search), + .controls, + .character-sidebar-sheet, + .img-portait, + .name-row, + .hope-section, + .downtime-section, + .character-traits, + .card-list { + pointer-events: none; + } + } + .character-sidebar-sheet { grid-row: 1 / span 2; grid-column: 1; diff --git a/styles/less/sheets/actors/character/sidebar.less b/styles/less/sheets/actors/character/sidebar.less index b159a8e8..e7027163 100644 --- a/styles/less/sheets/actors/character/sidebar.less +++ b/styles/less/sheets/actors/character/sidebar.less @@ -316,9 +316,9 @@ border-radius: 3px; background: light-dark(@dark-blue, @golden); clip-path: none; + cursor: pointer; display: flex; align-items: center; - justify-content: center; gap: 4px; border: 1px solid transparent; transition: all 0.3s ease; diff --git a/templates/actionTypes/damage.hbs b/templates/actionTypes/damage.hbs index 454d0413..192c5be5 100644 --- a/templates/actionTypes/damage.hbs +++ b/templates/actionTypes/damage.hbs @@ -21,7 +21,7 @@ {{!-- Handlebars uses Symbol.Iterator to produce index|key. This isn't compatible with our parts object, so we instead use applyTo, which is the same value --}} - {{#each source.parts as |dmg key|}} + {{#each source.parts as |dmg|}}
@@ -31,44 +31,40 @@ {{/unless}} - {{#unless (and @root.source.damage.includeBase (eq key 'hitPoints'))}} - {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}} - {{formField ../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." dmg.applyTo ".resultBased") localize=true classes="checkbox"}} - {{/if}} - {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}} -
-
- {{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}} - {{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path}} -
-
- {{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}} - {{> formula fields=../fields.valueAlt.fields type=../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" key=dmg.applyTo path=../path}} -
-
- {{else}} - {{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path}} - {{/if}} - - {{#if (and (eq dmg.applyTo 'hitPoints') (ne @root.source.type 'healing'))}} - {{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." dmg.applyTo ".type") localize=true}} - {{/if}} - - {{#if ../horde}} + {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}} + {{formField ../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." dmg.applyTo ".resultBased") localize=true classes="checkbox"}} + {{/if}} + {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}} +
- {{localize "DAGGERHEART.ACTORS.Adversary.hordeDamage"}} -
- - {{formField ../fields.valueAlt.fields.flatMultiplier value=dmg.valueAlt.flatMultiplier name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.flatMultiplier") label="DAGGERHEART.ACTIONS.Settings.multiplier" classes="inline-child" localize=true }} - {{formField ../fields.valueAlt.fields.dice value=dmg.valueAlt.dice name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.dice") classes="inline-child" localize=true}} - {{formField ../fields.valueAlt.fields.bonus value=dmg.valueAlt.bonus name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.bonus") localize=true classes="inline-child"}} -
+ {{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}} + {{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path}}
- {{/if}} - +
+ {{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}} + {{> formula fields=../fields.valueAlt.fields type=../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" key=dmg.applyTo path=../path}} +
+
{{else}} - {{localize "DAGGERHEART.ACTIONS.Config.itemDamageIsUsed"}} - {{/unless}} + {{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path}} + {{/if}} + + {{#if (and (eq dmg.applyTo 'hitPoints') (ne @root.source.type 'healing'))}} + {{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." dmg.applyTo ".type") localize=true}} + {{/if}} + + {{#if ../horde}} +
+ {{localize "DAGGERHEART.ACTORS.Adversary.hordeDamage"}} +
+ + {{formField ../fields.valueAlt.fields.flatMultiplier value=dmg.valueAlt.flatMultiplier name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.flatMultiplier") label="DAGGERHEART.ACTIONS.Settings.multiplier" classes="inline-child" localize=true }} + {{formField ../fields.valueAlt.fields.dice value=dmg.valueAlt.dice name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.dice") classes="inline-child" localize=true}} + {{formField ../fields.valueAlt.fields.bonus value=dmg.valueAlt.bonus name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.bonus") localize=true classes="inline-child"}} +
+
+ {{/if}} +
{{/each}} diff --git a/templates/actionTypes/roll.hbs b/templates/actionTypes/roll.hbs index 41f88ba2..9784fc08 100644 --- a/templates/actionTypes/roll.hbs +++ b/templates/actionTypes/roll.hbs @@ -1,7 +1,7 @@
- {{localize "DAGGERHEART.GENERAL.roll"}} - {{#if @root.hasBaseDamage}}{{formInput fields.useDefault name="roll.useDefault" value=source.useDefault dataset=(object tooltip=(localize "DAGGERHEART.ACTIONS.Config.useDefaultItemValues") tooltipDirection="UP")}}{{/if}} + Roll + {{#if @root.hasBaseDamage}}{{formInput fields.useDefault name="roll.useDefault" value=source.useDefault dataset=(object tooltip="Use default Item values" tooltipDirection="UP")}}{{/if}} {{formField fields.type label="DAGGERHEART.GENERAL.type" name="roll.type" value=source.type localize=true choices=@root.getRollTypeOptions localize=true}} diff --git a/templates/sheets/actors/adversary/effects.hbs b/templates/sheets/actors/adversary/effects.hbs index 087e8b30..cefb6e57 100644 --- a/templates/sheets/actors/adversary/effects.hbs +++ b/templates/sheets/actors/adversary/effects.hbs @@ -6,7 +6,7 @@ type='effect' isGlassy=true collection=effects.actives - canCreate=@root.editable + canCreate=true hideResources=true }} @@ -15,7 +15,7 @@ type='effect' isGlassy=true collection=effects.inactives - canCreate=@root.editable + canCreate=true hideResources=true }} diff --git a/templates/sheets/actors/adversary/features.hbs b/templates/sheets/actors/adversary/features.hbs index d320b0d8..a24342fc 100644 --- a/templates/sheets/actors/adversary/features.hbs +++ b/templates/sheets/actors/adversary/features.hbs @@ -6,8 +6,8 @@ type='feature' collection=@root.features hideContextMenu=true - canCreate=@root.editable - showActions=@root.editable + canCreate=true + showActions=true }} \ No newline at end of file diff --git a/templates/sheets/actors/character/effects.hbs b/templates/sheets/actors/character/effects.hbs index a2e5a420..3355d575 100644 --- a/templates/sheets/actors/character/effects.hbs +++ b/templates/sheets/actors/character/effects.hbs @@ -7,7 +7,7 @@ type='effect' isGlassy=true collection=effects.actives - canCreate=@root.editable + canCreate=true hideResources=true }} @@ -16,7 +16,7 @@ type='effect' isGlassy=true collection=effects.inactives - canCreate=@root.editable + canCreate=true hideResources=true disabled=true }} diff --git a/templates/sheets/actors/character/features.hbs b/templates/sheets/actors/character/features.hbs index 70544683..3e942468 100644 --- a/templates/sheets/actors/character/features.hbs +++ b/templates/sheets/actors/character/features.hbs @@ -8,8 +8,8 @@ type='feature' actorType='character' collection=category.values - canCreate=@root.editable - showActions=@root.editable + canCreate=true + showActions=true }} {{else if category.values}} {{> 'daggerheart.inventory-items' @@ -18,7 +18,7 @@ actorType='character' collection=category.values canCreate=false - showActions=@root.editable + showActions=true }} {{/if}} diff --git a/templates/sheets/actors/character/header.hbs b/templates/sheets/actors/character/header.hbs index a75b2c2f..4ceba54d 100644 --- a/templates/sheets/actors/character/header.hbs +++ b/templates/sheets/actors/character/header.hbs @@ -4,24 +4,22 @@

{{source.name}}

- {{#if @root.editable}} - {{#if document.system.needsCharacterSetup}} - - {{else if document.system.levelData.canLevelUp}} - - {{/if}} + {{#if document.system.needsCharacterSetup}} + + {{else if document.system.levelData.canLevelUp}} + {{/if}} {{#unless document.system.needsCharacterSetup}} {{localize 'DAGGERHEART.GENERAL.level'}} @@ -112,14 +110,12 @@ {{/if}} - {{#if @root.editable}} - - - {{/if}} + +

diff --git a/templates/sheets/actors/character/inventory.hbs b/templates/sheets/actors/character/inventory.hbs index c3ddb0ad..30812e17 100644 --- a/templates/sheets/actors/character/inventory.hbs +++ b/templates/sheets/actors/character/inventory.hbs @@ -22,7 +22,7 @@ type='weapon' collection=@root.inventory.weapons isGlassy=true - canCreate=@root.editable + canCreate=true hideResources=true }} {{> 'daggerheart.inventory-items' @@ -30,7 +30,7 @@ type='armor' collection=@root.inventory.armor isGlassy=true - canCreate=@root.editable + canCreate=true hideResources=true }} {{> 'daggerheart.inventory-items' @@ -38,7 +38,7 @@ type='consumable' collection=@root.inventory.consumables isGlassy=true - canCreate=@root.editable + canCreate=true isQuantifiable=true }} {{> 'daggerheart.inventory-items' @@ -46,8 +46,8 @@ type='loot' collection=@root.inventory.loot isGlassy=true - canCreate=@root.editable - showActions=@root.editable + canCreate=true + showActions=true isQuantifiable=true }} diff --git a/templates/sheets/actors/character/loadout.hbs b/templates/sheets/actors/character/loadout.hbs index 9ba3fb04..5e4c9f54 100644 --- a/templates/sheets/actors/character/loadout.hbs +++ b/templates/sheets/actors/character/loadout.hbs @@ -27,7 +27,7 @@ isGlassy=true cardView=cardView collection=document.system.domainCards.loadout - canCreate=@root.editable + canCreate=true }} {{> 'daggerheart.inventory-items' title='DAGGERHEART.GENERAL.Tabs.vault' @@ -35,7 +35,7 @@ isGlassy=true cardView=cardView collection=document.system.domainCards.vault - canCreate=@root.editable + canCreate=true inVault=true }} diff --git a/templates/sheets/actors/character/sidebar.hbs b/templates/sheets/actors/character/sidebar.hbs index 0142ac1d..d3be4983 100644 --- a/templates/sheets/actors/character/sidebar.hbs +++ b/templates/sheets/actors/character/sidebar.hbs @@ -45,11 +45,11 @@ {{/times}} - + {{localize "DAGGERHEART.GENERAL.armorSlots"}}
{{document.system.armorScore.value}} / {{document.system.armorScore.max}} - {{#if @root.editable}}{{/if}} +
@@ -64,9 +64,9 @@ value='{{document.system.armorScore.value}}' max='{{document.system.armorScore.max}}' > - +

{{localize "DAGGERHEART.GENERAL.armorSlots"}}

- {{#if @root.editable}}{{/if}} +
{{/if}} diff --git a/templates/sheets/actors/companion/effects.hbs b/templates/sheets/actors/companion/effects.hbs index 087e8b30..cefb6e57 100644 --- a/templates/sheets/actors/companion/effects.hbs +++ b/templates/sheets/actors/companion/effects.hbs @@ -6,7 +6,7 @@ type='effect' isGlassy=true collection=effects.actives - canCreate=@root.editable + canCreate=true hideResources=true }} @@ -15,7 +15,7 @@ type='effect' isGlassy=true collection=effects.inactives - canCreate=@root.editable + canCreate=true hideResources=true }} diff --git a/templates/sheets/actors/environment/features.hbs b/templates/sheets/actors/environment/features.hbs index 3fd512da..3ad36023 100644 --- a/templates/sheets/actors/environment/features.hbs +++ b/templates/sheets/actors/environment/features.hbs @@ -9,8 +9,8 @@ type='feature' collection=@root.features hideContextMenu=true - canCreate=@root.editable - showActions=@root.editable + canCreate=true + showActions=true }} \ No newline at end of file diff --git a/templates/sheets/actors/party/inventory.hbs b/templates/sheets/actors/party/inventory.hbs index cf056608..74492c73 100644 --- a/templates/sheets/actors/party/inventory.hbs +++ b/templates/sheets/actors/party/inventory.hbs @@ -26,7 +26,7 @@ actorType='party' collection=@root.inventory.weapons isGlassy=true - canCreate=@root.editable + canCreate=true hideResources=true hideContextMenu=true isQuantifiable=true @@ -37,7 +37,7 @@ actorType='party' collection=@root.inventory.armor isGlassy=true - canCreate=@root.editable + canCreate=true hideResources=true hideContextMenu=true isQuantifiable=true @@ -48,7 +48,7 @@ actorType='party' collection=@root.inventory.consumables isGlassy=true - canCreate=@root.editable + canCreate=true hideContextMenu=true isQuantifiable=true }} @@ -58,7 +58,7 @@ actorType='party' collection=@root.inventory.loot isGlassy=true - canCreate=@root.editable + canCreate=true hideContextMenu=true isQuantifiable=true }} diff --git a/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs b/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs index 3f58b80b..5c6eae32 100644 --- a/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs +++ b/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs @@ -52,11 +52,12 @@ Parameters: {{else}}