diff --git a/lang/en.json b/lang/en.json index c9160405..59cb6b20 100755 --- a/lang/en.json +++ b/lang/en.json @@ -614,10 +614,6 @@ "title": "{name} Resource", "rerollDice": "Reroll Dice" }, - "RiskItAllDialog": { - "title": "Risk It All - Clear Stress and Hope", - "submit": "Submit" - }, "TagTeamSelect": { "title": "Tag Team Roll", "leaderTitle": "Initiating Character", @@ -2294,8 +2290,7 @@ "placeholder": "Using character dimensions", "disabledPlaceholder": "Set by character size", "height": { "label": "Height" }, - "width": { "label": "Width" }, - "scale": { "label": "Token Scale" } + "width": { "label": "Width" } }, "evolved": { "maximumTier": { "label": "Maximum Tier" }, diff --git a/module/applications/dialogs/deathMove.mjs b/module/applications/dialogs/deathMove.mjs index ea7a18eb..0996fc27 100644 --- a/module/applications/dialogs/deathMove.mjs +++ b/module/applications/dialogs/deathMove.mjs @@ -9,8 +9,7 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV this.actor = actor; this.selectedMove = null; this.showRiskItAllButton = false; - this.riskItAllButtonLabel = ""; - this.riskItAllHope = 0; + this.riskItAllButtonLabel = "" } get title() { @@ -110,7 +109,6 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV } else { chatMessage = game.i18n.format('DAGGERHEART.UI.Chat.deathMove.riskItAllSuccess', { hope: config.roll.hope.value }) this.showRiskItAllButton = true; - this.riskItAllHope = config.roll.hope.value; this.riskItAllButtonLabel = game.i18n.format('DAGGERHEART.UI.Chat.deathMove.riskItAllClearStressAndHitPoints', { hope: config.roll.hope.value }) } } @@ -187,8 +185,7 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV open: autoExpandDescription ? 'open' : '', chevron: autoExpandDescription ? 'fa-chevron-up' : 'fa-chevron-down', showRiskItAllButton: this.showRiskItAllButton, - riskItAllButtonLabel: this.riskItAllButtonLabel, - riskItAllHope: this.riskItAllHope + riskItAllButtonLabel: this.riskItAllButtonLabel } ), title: game.i18n.localize('DAGGERHEART.UI.Chat.deathMove.title'), diff --git a/module/applications/dialogs/riskItAllDialog.mjs b/module/applications/dialogs/riskItAllDialog.mjs deleted file mode 100644 index 5a114d3a..00000000 --- a/module/applications/dialogs/riskItAllDialog.mjs +++ /dev/null @@ -1,42 +0,0 @@ -const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; -export default class RiskItAllDialog extends HandlebarsApplicationMixin(ApplicationV2) { - constructor(actor, config) { - super({}); - - this.actor = actor; - this.validChoices = null; - this.config = config; - } - - get title() { - return game.i18n.format('DAGGERHEART.APPLICATIONS.RiskItAllDialog.title', { actor: this.actor.name }); - } - - static DEFAULT_OPTIONS = { - classes: ['daggerheart', 'dh-style', 'dialog', 'views', 'risk-it-all'], - position: { width: 'auto', height: 'auto' }, - window: { icon: 'fa-solid fa-skull' }, - actions: { - submit: this.submit - } - }; - - static PARTS = { - application: { - id: 'risk-it-all', - template: 'systems/daggerheart/templates/dialogs/riskItAllDialog.hbs' - } - }; - - async _prepareContext(_options) { - const context = await super._prepareContext(_options); - context.RiskItAllDialog = this.RiskItAllDialog; - context.title = game.i18n.localize('DAGGERHEART.APPLICATIONS.RiskItAllDialog.submit'); - - return context; - } - - static async submit() { - this.close(); - } -} diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index febb6155..d3e30dab 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -1,6 +1,5 @@ import { abilities } from '../../config/actorConfig.mjs'; import { emitAsGM, GMUpdateEvent, RefreshType, socketEvent } from '../../systemRegistration/socket.mjs'; -import RiskItAllDialog from '../dialogs/riskItAllDialog.mjs'; export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLog { constructor(options) { @@ -83,7 +82,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo element.addEventListener('click', this.groupRollExpandSection) ); html.querySelectorAll('.risk-it-all-button').forEach(element => - element.addEventListener('click', event => this.riskItAllClearStressAndHitPoints(event, data)) + element.addEventListener('click', event => this.riskItAllClearStressAndHitPoints(event, message)) ); }; @@ -376,12 +375,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo } - async riskItAllClearStressAndHitPoints(event, data) { - const hopeValue = event.target.dataset.hope; - const config = { - hope: hopeValue - } - await new RiskItAllDialog(data.actor, config).render({ force: true }); + async riskItAllClearStressAndHitPoints(event, message) { + console.log("riskItAllClearStressAndHitPoints button hit!", event, message); } diff --git a/module/data/activeEffect/beastformEffect.mjs b/module/data/activeEffect/beastformEffect.mjs index 65e36606..5311b827 100644 --- a/module/data/activeEffect/beastformEffect.mjs +++ b/module/data/activeEffect/beastformEffect.mjs @@ -19,7 +19,6 @@ export default class BeastformEffect extends BaseEffect { base64: false }), tokenSize: new fields.SchemaField({ - scale: new fields.NumberField({ nullable: false, initial: 1 }), height: new fields.NumberField({ integer: false, nullable: true }), width: new fields.NumberField({ integer: false, nullable: true }) }) @@ -56,9 +55,7 @@ export default class BeastformEffect extends BaseEffect { const update = { ...baseUpdate, texture: { - src: this.characterTokenData.tokenImg, - scaleX: this.characterTokenData.tokenSize.scale, - scaleY: this.characterTokenData.tokenSize.scale + src: this.characterTokenData.tokenImg }, ring: { enabled: this.characterTokenData.usesDynamicToken, @@ -89,9 +86,7 @@ export default class BeastformEffect extends BaseEffect { y, 'texture': { enabled: this.characterTokenData.usesDynamicToken, - src: token.flags.daggerheart?.beastformTokenImg ?? this.characterTokenData.tokenImg, - scaleX: this.characterTokenData.tokenSize.scale, - scaleY: this.characterTokenData.tokenSize.scale + src: token.flags.daggerheart?.beastformTokenImg ?? this.characterTokenData.tokenImg }, 'ring': { subject: { diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index a7f99ca8..d36a4b08 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -738,7 +738,7 @@ export default class DhCharacter extends BaseDataActor { static migrateData(source) { if (typeof source.scars === 'object') source.scars = 0; - if (source.resources?.hope?.max) source.scars = Math.max(6 - source.resources.hope.max, 0); + if (source.resources.hope.max) source.scars = Math.max(6 - source.resources.hope.max, 0); return super.migrateData(source); } diff --git a/module/data/item/beastform.mjs b/module/data/item/beastform.mjs index dd491169..1840e26a 100644 --- a/module/data/item/beastform.mjs +++ b/module/data/item/beastform.mjs @@ -49,7 +49,6 @@ export default class DHBeastform extends BaseDataItem { choices: CONFIG.DH.ACTOR.tokenSize, initial: CONFIG.DH.ACTOR.tokenSize.custom.id }), - 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 }) }), @@ -185,7 +184,6 @@ export default class DHBeastform extends BaseDataItem { tokenImg: this.parent.parent.prototypeToken.texture.src, tokenRingImg: this.parent.parent.prototypeToken.ring.subject.texture, tokenSize: { - scale: this.parent.parent.prototypeToken.texture.scaleX, height: this.parent.parent.prototypeToken.height, width: this.parent.parent.prototypeToken.width } @@ -211,9 +209,7 @@ export default class DHBeastform extends BaseDataItem { height, width, texture: { - src: this.tokenImg, - scaleX: this.tokenSize.scale, - scaleY: this.tokenSize.scale + src: this.tokenImg }, ring: { subject: { diff --git a/styles/less/global/global.less b/styles/less/global/global.less index 6c63fe7a..6cc63c2a 100644 --- a/styles/less/global/global.less +++ b/styles/less/global/global.less @@ -51,14 +51,3 @@ } } } - -/* TODO: Remove me when this issue is resolved https://github.com/foundryvtt/foundryvtt/issues/13734 */ -body.theme-dark, -.themed.theme-dark { - color-scheme: dark; -} - -body.theme-light, -.themed.theme-light { - color-scheme: light; -} diff --git a/styles/less/global/index.less b/styles/less/global/index.less index 216dc9f4..f51140de 100644 --- a/styles/less/global/index.less +++ b/styles/less/global/index.less @@ -10,6 +10,7 @@ @import './tab-description.less'; @import './tab-features.less'; @import './tab-effects.less'; +@import './tab-settings.less'; @import './item-header.less'; @import './feature-section.less'; @import './inventory-item.less'; diff --git a/styles/less/global/item-header.less b/styles/less/global/item-header.less index f47ca7dc..073762e0 100755 --- a/styles/less/global/item-header.less +++ b/styles/less/global/item-header.less @@ -160,7 +160,7 @@ .item-description { display: flex; flex-direction: column; - gap: 7px; + gap: 10px; } h3 { diff --git a/styles/less/global/tab-settings.less b/styles/less/global/tab-settings.less new file mode 100644 index 00000000..3d5248be --- /dev/null +++ b/styles/less/global/tab-settings.less @@ -0,0 +1,8 @@ +@import '../utils/colors.less'; +@import '../utils/fonts.less'; + +.sheet.daggerheart.dh-style { + .tab.settings { + margin-bottom: 36px; + } +} diff --git a/styles/less/ui/sidebar/tabs.less b/styles/less/ui/sidebar/tabs.less index c620ff91..e9de2924 100644 --- a/styles/less/ui/sidebar/tabs.less +++ b/styles/less/ui/sidebar/tabs.less @@ -1,4 +1,4 @@ -.theme-light#interface #ui-right #sidebar { +.theme-light #interface #ui-right #sidebar { menu li button img { filter: @grey-filter; } diff --git a/templates/dialogs/riskItAllDialog.hbs b/templates/dialogs/riskItAllDialog.hbs deleted file mode 100644 index 0bf78e6b..00000000 --- a/templates/dialogs/riskItAllDialog.hbs +++ /dev/null @@ -1,18 +0,0 @@ -
-
-

{{title}}

-
-
- TODO magic here -
- -
\ No newline at end of file diff --git a/templates/sheets/items/beastform/settings.hbs b/templates/sheets/items/beastform/settings.hbs index 82065ad3..844b9d61 100644 --- a/templates/sheets/items/beastform/settings.hbs +++ b/templates/sheets/items/beastform/settings.hbs @@ -47,9 +47,6 @@ disabled=dimensionsDisabled }} -
- {{formGroup systemFields.tokenSize.fields.scale value=source.system.tokenSize.scale localize=true }} -
{{else}} {{localize "DAGGERHEART.ITEMS.Beastform.evolvedTokenHint"}} {{/unless}} diff --git a/templates/ui/chat/deathMove.hbs b/templates/ui/chat/deathMove.hbs index b36ee590..f73b32cd 100644 --- a/templates/ui/chat/deathMove.hbs +++ b/templates/ui/chat/deathMove.hbs @@ -19,7 +19,7 @@ {{#if this.showRiskItAllButton}}
-