diff --git a/lang/en.json b/lang/en.json index a06c46c2..0a9448c4 100755 --- a/lang/en.json +++ b/lang/en.json @@ -778,9 +778,7 @@ "title": "Group Roll" }, "TokenConfig": { - "actorSizeUsed": "Actor size is set, determining the dimensions", - "tokenSize": "Token Size", - "sizeCategory": "Size Category" + "actorSizeUsed": "Actor size is set, determining the dimensions" } }, "CLASS": { @@ -2567,11 +2565,10 @@ "tokenImg": { "label": "Token Image" }, "tokenRingImg": { "label": "Subject Texture" }, "tokenSize": { - "placeholder": "Token Size", - "disabledPlaceholder": "Token Size", + "placeholder": "Using character dimensions", + "disabledPlaceholder": "Set by character size", "height": { "label": "Height" }, "width": { "label": "Width" }, - "depth": { "label": "Depth" }, "scale": { "label": "Token Scale" } }, "evolved": { diff --git a/module/applications/sheets/actors/party.mjs b/module/applications/sheets/actors/party.mjs index cec1e1f0..c703ad85 100644 --- a/module/applications/sheets/actors/party.mjs +++ b/module/applications/sheets/actors/party.mjs @@ -26,6 +26,7 @@ export default class Party extends DHBaseActorSheet { actions: { openDocument: Party.#openDocument, deletePartyMember: Party.#deletePartyMember, + deleteItem: Party.#deleteItem, toggleHope: Party.#toggleHope, toggleHitPoints: Party.#toggleHitPoints, toggleStress: Party.#toggleStress, @@ -508,4 +509,23 @@ export default class Party extends DHBaseActorSheet { const newMembersList = currentMembers.filter(uuid => uuid !== doc.uuid); await this.document.update({ 'system.partyMembers': newMembersList }); } + + static async #deleteItem(event, target) { + const doc = await getDocFromElement(target.closest('.inventory-item')); + if (!event.shiftKey) { + const confirmed = await foundry.applications.api.DialogV2.confirm({ + window: { + title: game.i18n.format('DAGGERHEART.APPLICATIONS.DeleteConfirmation.title', { + type: game.i18n.localize('TYPES.Actor.party'), + name: doc.name + }) + }, + content: game.i18n.format('DAGGERHEART.APPLICATIONS.DeleteConfirmation.text', { name: doc.name }) + }); + + if (!confirmed) return; + } + + this.document.deleteEmbeddedDocuments('Item', [doc.id]); + } } diff --git a/module/data/activeEffect/beastformEffect.mjs b/module/data/activeEffect/beastformEffect.mjs index 0fbea122..128c0c52 100644 --- a/module/data/activeEffect/beastformEffect.mjs +++ b/module/data/activeEffect/beastformEffect.mjs @@ -35,7 +35,6 @@ export default class BeastformEffect extends BaseEffect { static migrateData(source) { if (!source.characterTokenData.tokenSize.height) source.characterTokenData.tokenSize.height = 1; if (!source.characterTokenData.tokenSize.width) source.characterTokenData.tokenSize.width = 1; - if (!source.characterTokenData.tokenSize.depth) source.characterTokenData.tokenSize.depth = 1; return super.migrateData(source); } @@ -53,8 +52,7 @@ export default class BeastformEffect extends BaseEffect { if (this.parent.parent.type === 'character') { const baseUpdate = { height: this.characterTokenData.tokenSize.height, - width: this.characterTokenData.tokenSize.width, - depth: this.characterTokenData.tokenSize.depth + width: this.characterTokenData.tokenSize.width }; const update = { ...baseUpdate, diff --git a/module/data/item/beastform.mjs b/module/data/item/beastform.mjs index ee9d9839..d30d6046 100644 --- a/module/data/item/beastform.mjs +++ b/module/data/item/beastform.mjs @@ -51,8 +51,7 @@ export default class DHBeastform extends BaseDataItem { }), scale: new fields.NumberField({ nullable: false, min: 0.2, max: 3, step: 0.05, initial: 1 }), height: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }), - width: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }), - depth: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }) + width: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }) }), mainTrait: new fields.StringField({ required: true, @@ -193,8 +192,7 @@ export default class DHBeastform extends BaseDataItem { tokenSize: { scale: this.parent.parent.prototypeToken.texture.scaleX, height: this.parent.parent.prototypeToken.height, - width: this.parent.parent.prototypeToken.width, - depth: this.parent.parent.prototypeToken.depth + width: this.parent.parent.prototypeToken.width } }, advantageOn: this.advantageOn, @@ -213,12 +211,10 @@ export default class DHBeastform extends BaseDataItem { : null; const width = autoTokenSize ?? this.tokenSize.width; const height = autoTokenSize ?? this.tokenSize.height; - const depth = autoTokenSize ?? this.tokenSize.depth; const prototypeTokenUpdate = { height, width, - depth, texture: { src: this.tokenImg, scaleX: this.tokenSize.scale, diff --git a/module/documents/scene.mjs b/module/documents/scene.mjs index bf700610..59b8091f 100644 --- a/module/documents/scene.mjs +++ b/module/documents/scene.mjs @@ -20,7 +20,7 @@ export default class DhScene extends Scene { const prototype = tokenDoc.actor?.prototypeToken ?? tokenDoc; this.#sizeSyncBatch.set(tokenDoc.id, { size: tokenSize, - prototypeSize: { width: prototype.width, height: prototype.height, depth: prototype.depth }, + prototypeSize: { width: prototype.width, height: prototype.height }, position: { x: tokenDoc.x, y: tokenDoc.y, elevation: tokenDoc.elevation } }); this.#processSyncBatch(); @@ -36,13 +36,11 @@ export default class DhScene extends Scene { const tokenSize = tokenSizes[size]; const width = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.width; const height = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.height; - const depth = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.depth; const updatedPosition = DHToken.getSnappedPositionInSquareGrid(this.grid, position, width, height); return { _id, width, height, - depth, ...updatedPosition }; }); diff --git a/module/documents/token.mjs b/module/documents/token.mjs index 30862724..4ee7ce05 100644 --- a/module/documents/token.mjs +++ b/module/documents/token.mjs @@ -66,8 +66,7 @@ export default class DHToken extends CONFIG.Token.documentClass { if (tokenSize && actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) { document.updateSource({ width: tokenSize, - height: tokenSize, - depth: tokenSize + height: tokenSize }); } } @@ -91,7 +90,7 @@ export default class DHToken extends CONFIG.Token.documentClass { ) { const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes; const tokenSize = tokenSizes[update.system.size]; - if (tokenSize !== this.width || tokenSize !== this.height || tokenSize !== this.depth) { + if (tokenSize !== this.width || tokenSize !== this.height) { this.parent?.syncTokenDimensions(this, update.system.size); } } diff --git a/module/documents/tokenManager.mjs b/module/documents/tokenManager.mjs index 7678d2c7..3ccff4e2 100644 --- a/module/documents/tokenManager.mjs +++ b/module/documents/tokenManager.mjs @@ -15,7 +15,6 @@ export default class DhTokenManager { if (tokenSize && actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) { tokenData.width = tokenSize; tokenData.height = tokenSize; - tokenData.depth = tokenSize; } } diff --git a/system.json b/system.json index bbee2c09..613c26e7 100644 --- a/system.json +++ b/system.json @@ -5,7 +5,7 @@ "version": "2.2.6", "compatibility": { "minimum": "14.361", - "verified": "14.363", + "verified": "14.362", "maximum": "14" }, "url": "https://github.com/Foundryborne/daggerheart", diff --git a/templates/hud/tokenHUD.hbs b/templates/hud/tokenHUD.hbs index cf43e15d..b620ab11 100644 --- a/templates/hud/tokenHUD.hbs +++ b/templates/hud/tokenHUD.hbs @@ -17,7 +17,7 @@ {{/if}} - + {{#if hasCompanion}} @@ -26,13 +26,6 @@ {{/if}} - {{#if isGM}} - - - - {{/if}} - {{#if canConfigure}} diff --git a/templates/sheets-settings/token-config/appearance.hbs b/templates/sheets-settings/token-config/appearance.hbs index 76ba255d..abdb49c2 100644 --- a/templates/sheets-settings/token-config/appearance.hbs +++ b/templates/sheets-settings/token-config/appearance.hbs @@ -1,43 +1,20 @@ - - {{formGroup fields.texture.fields.src value=source.texture.src rootId=rootId}} - {{#if randomImgEnabled}} - {{formGroup fields.randomImg value=source.randomImg classes="slim" rootId=rootId}} - {{else if hasAlternates}} - - {{localize "TOKEN.ImageAlts"}} - - {{selectOptions alternateImages selected=source.texture.src blank=""}} - - - {{/if}} - - {{#if imagePreview}} - - {{#if imagePreview.isVideo}} - - {{else}} - - {{/if}} - - - {{imagePreview.current}} / {{imagePreview.total}} - - - - {{/if}} + {{formGroup fields.texture.fields.src value=source.texture.src rootId=rootId}} + {{#if randomImgEnabled}} + {{formGroup fields.randomImg value=source.randomImg classes="slim" rootId=rootId}} + {{else if hasAlternates}} + + {{localize "TOKEN.ImageAlts"}} + + {{selectOptions alternateImages selected=source.texture.src blank=""}} + - + {{/if}} - {{localize "DAGGERHEART.APPLICATIONS.TokenConfig.tokenSize"}} + {{localize "Token Size"}} {{#if usesActorSize}} - - {{localize "DAGGERHEART.APPLICATIONS.TokenConfig.sizeCategory"}} + + {{localize "Size Category"}} {{selectOptions tokenSizes selected=tokenSize valueAttr="id" labelAttr="label" localize=true}} @@ -46,17 +23,15 @@ {{/if}} - - {{localize "TOKEN.Size"}} - ({{localize "MEASUREMENT.GridSpaces"}}) - - + + {{localize "TOKEN.Dimensions"}} ({{localize "GridSpaces"}}) + + + {{localize "DOCUMENT.FIELDS.width.label"}} {{formInput fields.width value=source.width id=(concat rootId "-width") disabled=actorSizeDisable}} {{localize "DOCUMENT.FIELDS.height.label"}} {{formInput fields.height value=source.height id=(concat rootId "-height") disabled=actorSizeDisable}} - Z - {{formInput fields.depth value=source.depth id=(concat rootId "-depth") disabled=actorSizeDisable}} diff --git a/templates/sheets/actors/adversary/features.hbs b/templates/sheets/actors/adversary/features.hbs index 3b495e74..d320b0d8 100644 --- a/templates/sheets/actors/adversary/features.hbs +++ b/templates/sheets/actors/adversary/features.hbs @@ -6,7 +6,6 @@ type='feature' collection=@root.features hideContextMenu=true - hideModifyControls=true canCreate=@root.editable showActions=@root.editable }} diff --git a/templates/sheets/actors/environment/features.hbs b/templates/sheets/actors/environment/features.hbs index 35fcb038..3fd512da 100644 --- a/templates/sheets/actors/environment/features.hbs +++ b/templates/sheets/actors/environment/features.hbs @@ -9,7 +9,6 @@ type='feature' collection=@root.features hideContextMenu=true - hideModifyControls=true canCreate=@root.editable showActions=@root.editable }} diff --git a/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs b/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs index db2fb6b7..3f58b80b 100644 --- a/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs +++ b/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs @@ -19,8 +19,6 @@ Parameters: - showLabels {boolean} : If true, show label-tags else show simple tags. - hideTooltip {boolean} : If true, disables the tooltip on the item image. - hideControls {boolean} : If true, hides the controls inside inventory-item partials. -- hideContextMenu {boolean}: If true, hides the context menu dropdown button -- hideModifyControls {boolean}: If true, hides the edit and delete options - hideDescription {boolean} : If true, hides the item's description. - hideResources {boolean} : If true, hides the item's resources. - showActions {boolean} : If true show feature's actions. @@ -61,7 +59,6 @@ Parameters: actorType=(ifThen ../actorType ../actorType @root.document.type) hideControls=../hideControls hideContextMenu=../hideContextMenu - hideModifyControls=../hideModifyControls isActor=../isActor categoryAdversary=../categoryAdversary hideTooltip=../hideTooltip diff --git a/templates/sheets/global/partials/inventory-item-V2.hbs b/templates/sheets/global/partials/inventory-item-V2.hbs index 523e9304..d76f2897 100644 --- a/templates/sheets/global/partials/inventory-item-V2.hbs +++ b/templates/sheets/global/partials/inventory-item-V2.hbs @@ -12,8 +12,6 @@ Parameters: - hideTags {boolean} : If true, hide simple-tags else show simple-tags. - hideTooltip {boolean} : If true, disables the tooltip on the item image. - hideControls {boolean} : If true, hides the controls inside inventory-item partials. -- hideContextMenu {boolean}: If true, hides the context menu dropdown button -- hideModifyControls {boolean}: If true, hides the edit and delete options (todo: swap to show, only party cares to show this) - hideDescription {boolean} : If true, hides the item's description. - hideResources {boolean} : If true, hides the item's resources. - showActions {boolean} : If true show feature's actions. @@ -114,12 +112,12 @@ Parameters: - {{else if (and @root.editable (not hideModifyControls))}} + {{else if @root.editable}} {{#if (not isActor)}} - + {{else if (eq type 'adversary')}} diff --git a/templates/sheets/items/beastform/settings.hbs b/templates/sheets/items/beastform/settings.hbs index 60e816b1..82065ad3 100644 --- a/templates/sheets/items/beastform/settings.hbs +++ b/templates/sheets/items/beastform/settings.hbs @@ -46,13 +46,6 @@ placeholder=(localize (ifThen dimensionsDisabled "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.disabledPlaceholder" "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder")) disabled=dimensionsDisabled }} - {{formGroup - systemFields.tokenSize.fields.depth - value=source.system.tokenSize.depth - localize=true - placeholder=(localize (ifThen dimensionsDisabled "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.disabledPlaceholder" "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder")) - disabled=dimensionsDisabled - }} {{formGroup systemFields.tokenSize.fields.scale value=source.system.tokenSize.scale localize=true }} diff --git a/templates/ui/combatTracker/combatTrackerSection.hbs b/templates/ui/combatTracker/combatTrackerSection.hbs index ac759dfe..cf3ca422 100644 --- a/templates/ui/combatTracker/combatTrackerSection.hbs +++ b/templates/ui/combatTracker/combatTrackerSection.hbs @@ -13,20 +13,20 @@ {{#if @root.user.isGM}} + data-action="toggleHidden" data-tooltip aria-label="{{ localize "COMBAT.ToggleVis" }}"> + aria-label="{{ localize "COMBAT.ToggleDead" }}"> {{/if}} {{#if canPing}} + aria-label="{{ localize "COMBAT.PingCombatant" }}"> {{/if}} {{#unless @root.user.isGM}} + aria-label="{{ localize "COMBAT.PanToCombatant" }}"> {{/unless}}