diff --git a/lang/en.json b/lang/en.json index 8fad6682..1c7b1827 100755 --- a/lang/en.json +++ b/lang/en.json @@ -1170,8 +1170,8 @@ "spotlight": "Spotlight" }, "CountdownBaseType": { - "shortterm": { "label": "Short Term", "shortLabel": "Short" }, - "longterm": { "label": "Long Term", "shortLabel": "Long" } + "encounter": { "label": "Short Term", "shortLabel": "Short" }, + "narrative": { "label": "Long Term", "shortLabel": "Long" } }, "DaggerheartDiceAnimationEvents": { "critical": { "name": "Critical" }, diff --git a/module/applications/ui/countdowns.mjs b/module/applications/ui/countdowns.mjs index 165f923b..46f76c3d 100644 --- a/module/applications/ui/countdowns.mjs +++ b/module/applications/ui/countdowns.mjs @@ -3,7 +3,6 @@ import { emitGMUpdate, GMUpdateEvent, RefreshType, socketEvent } from '../../sys import { SYSTEM } from './../../../module/config/system.mjs'; const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; -const { shortterm, longterm } = SYSTEM.GENERAL.countdownType; /** * A UI element which displays the countdowns in this world. @@ -66,9 +65,9 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application * @returns {string[]} */ get visibleCountdownTypes() { - const { shortterm, longterm } = SYSTEM.GENERAL.countdownType; + const { encounter, narrative } = SYSTEM.GENERAL.countdownType; return game.user.getFlag(CONFIG.DH.id, CONFIG.DH.FLAGS.userFlags.countdownTypeModes) - ?? [shortterm.id, longterm.id]; + ?? [encounter.id, narrative.id]; } async _renderFrame(options) { diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index 05862377..3c251437 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -960,15 +960,15 @@ export const countdownAppMode = { }; export const countdownType = { - shortterm: { - id: 'shortterm', - label: 'DAGGERHEART.CONFIG.CountdownBaseType.shortterm.label', - shortLabel: 'DAGGERHEART.CONFIG.CountdownBaseType.shortterm.shortLabel' + encounter: { + id: 'encounter', + label: 'DAGGERHEART.CONFIG.CountdownBaseType.encounter.label', + shortLabel: 'DAGGERHEART.CONFIG.CountdownBaseType.encounter.shortLabel' }, - longterm: { - id: 'longterm', - label: 'DAGGERHEART.CONFIG.CountdownBaseType.longterm.label', - shortLabel: 'DAGGERHEART.CONFIG.CountdownBaseType.longterm.shortLabel' + narrative: { + id: 'narrative', + label: 'DAGGERHEART.CONFIG.CountdownBaseType.narrative.label', + shortLabel: 'DAGGERHEART.CONFIG.CountdownBaseType.narrative.shortLabel' } }; diff --git a/module/data/countdowns.mjs b/module/data/countdowns.mjs index da7ae321..4252d87d 100644 --- a/module/data/countdowns.mjs +++ b/module/data/countdowns.mjs @@ -27,19 +27,6 @@ export default class DhCountdowns extends foundry.abstract.DataModel { foundry.ui.countdowns.changedCountdownsForAnimation.add(...changedCountdowns); } - - migrateData(source) { - for (const countdown of source.countdowns) { - switch (countdown.type) { - case 'narrative': - countdown.type = CONFIG.DH.GENERAL.countdownType.longterm.id; - break; - case 'encounter': - countdown.type = CONFIG.DH.GENERAL.countdownType.shortterm.id; - break; - } - } - } } export class DhCountdown extends foundry.abstract.DataModel { @@ -49,7 +36,7 @@ export class DhCountdown extends foundry.abstract.DataModel { type: new fields.StringField({ required: true, choices: CONFIG.DH.GENERAL.countdownType, - initial: CONFIG.DH.GENERAL.countdownType.shortterm.id, + initial: CONFIG.DH.GENERAL.countdownType.encounter.id, label: 'DAGGERHEART.GENERAL.type' }), name: new fields.StringField({ @@ -113,7 +100,7 @@ export class DhCountdown extends foundry.abstract.DataModel { : undefined; return { - type: type ?? CONFIG.DH.GENERAL.countdownType.shortterm.id, + type: type ?? CONFIG.DH.GENERAL.countdownType.encounter.id, name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Countdown.newCountdown'), img: 'icons/magic/time/hourglass-yellow-green.webp', ownership: ownership, diff --git a/module/data/fields/action/countdownField.mjs b/module/data/fields/action/countdownField.mjs index 366de6df..e963fa67 100644 --- a/module/data/fields/action/countdownField.mjs +++ b/module/data/fields/action/countdownField.mjs @@ -9,7 +9,7 @@ export default class CountdownField extends fields.ArrayField { type: new fields.StringField({ required: true, choices: CONFIG.DH.GENERAL.countdownType, - initial: CONFIG.DH.GENERAL.countdownType.shortterm.id, + initial: CONFIG.DH.GENERAL.countdownType.encounter.id, label: 'DAGGERHEART.GENERAL.type' }), name: new fields.StringField({ diff --git a/src/packs/adversaries/adversary_Adult_Flickerfly_G7jiltRjgvVhZewm.json b/src/packs/adversaries/adversary_Adult_Flickerfly_G7jiltRjgvVhZewm.json index efcbc0c9..ecb93d1b 100644 --- a/src/packs/adversaries/adversary_Adult_Flickerfly_G7jiltRjgvVhZewm.json +++ b/src/packs/adversaries/adversary_Adult_Flickerfly_G7jiltRjgvVhZewm.json @@ -713,7 +713,7 @@ "countdown": [ { "name": "Hallucinatory Breath", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/air/fog-gas-smoke-purple.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Arch_Necromancer_WPEOIGfclNJxWb87.json b/src/packs/adversaries/adversary_Arch_Necromancer_WPEOIGfclNJxWb87.json index f9186877..5da74eb3 100644 --- a/src/packs/adversaries/adversary_Arch_Necromancer_WPEOIGfclNJxWb87.json +++ b/src/packs/adversaries/adversary_Arch_Necromancer_WPEOIGfclNJxWb87.json @@ -759,7 +759,7 @@ "countdown": [ { "name": "Your Life Is Mine", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/unholy/hand-claw-fire-green.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json b/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json index 67f8ef99..0bc6bf2d 100644 --- a/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json +++ b/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json @@ -522,7 +522,7 @@ "countdown": [ { "name": "Blood and Souls", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/creatures/unholy/demon-fire-horned-clawed.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Fallen_Sorcerer_PELRry1vqjBzSAlr.json b/src/packs/adversaries/adversary_Fallen_Sorcerer_PELRry1vqjBzSAlr.json index 1ca88613..975cf6aa 100644 --- a/src/packs/adversaries/adversary_Fallen_Sorcerer_PELRry1vqjBzSAlr.json +++ b/src/packs/adversaries/adversary_Fallen_Sorcerer_PELRry1vqjBzSAlr.json @@ -563,7 +563,7 @@ "countdown": [ { "name": "Shackles of Guilt", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/unholy/strike-hand-glow-pink.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Fallen_Warlord__Realm_Breaker_hxZ0sgoFJubh5aj6.json b/src/packs/adversaries/adversary_Fallen_Warlord__Realm_Breaker_hxZ0sgoFJubh5aj6.json index 1dd8aa0c..15663752 100644 --- a/src/packs/adversaries/adversary_Fallen_Warlord__Realm_Breaker_hxZ0sgoFJubh5aj6.json +++ b/src/packs/adversaries/adversary_Fallen_Warlord__Realm_Breaker_hxZ0sgoFJubh5aj6.json @@ -613,7 +613,7 @@ "countdown": [ { "name": "All-Consuming Rage", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/control/fear-fright-monster-grin-red-orange.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Fallen_Warlord__Undefeated_Champion_RXkZTwBRi4dJ3JE5.json b/src/packs/adversaries/adversary_Fallen_Warlord__Undefeated_Champion_RXkZTwBRi4dJ3JE5.json index d8deea16..6cb1c0ce 100644 --- a/src/packs/adversaries/adversary_Fallen_Warlord__Undefeated_Champion_RXkZTwBRi4dJ3JE5.json +++ b/src/packs/adversaries/adversary_Fallen_Warlord__Undefeated_Champion_RXkZTwBRi4dJ3JE5.json @@ -621,7 +621,7 @@ "countdown": [ { "name": "Circle of Defilement", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/unholy/barrier-fire-pink.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Gorgon_8mJYMpbLTb8qIOrr.json b/src/packs/adversaries/adversary_Gorgon_8mJYMpbLTb8qIOrr.json index cd27e344..1fcfcce4 100644 --- a/src/packs/adversaries/adversary_Gorgon_8mJYMpbLTb8qIOrr.json +++ b/src/packs/adversaries/adversary_Gorgon_8mJYMpbLTb8qIOrr.json @@ -593,7 +593,7 @@ "countdown": [ { "name": "Petrifying Gaze", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/earth/strike-body-stone-crumble.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Head_Guard_mK3A5FTx6k8iPU3F.json b/src/packs/adversaries/adversary_Head_Guard_mK3A5FTx6k8iPU3F.json index 3f0ea2de..9a6cc509 100644 --- a/src/packs/adversaries/adversary_Head_Guard_mK3A5FTx6k8iPU3F.json +++ b/src/packs/adversaries/adversary_Head_Guard_mK3A5FTx6k8iPU3F.json @@ -346,7 +346,7 @@ "countdown": [ { "name": "On My Signal", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/skills/ranged/target-bullseye-arrow-blue.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Juvenile_Flickerfly_MYXmTx2FHcIjdfYZ.json b/src/packs/adversaries/adversary_Juvenile_Flickerfly_MYXmTx2FHcIjdfYZ.json index ccb21cc2..24683a37 100644 --- a/src/packs/adversaries/adversary_Juvenile_Flickerfly_MYXmTx2FHcIjdfYZ.json +++ b/src/packs/adversaries/adversary_Juvenile_Flickerfly_MYXmTx2FHcIjdfYZ.json @@ -611,7 +611,7 @@ "countdown": [ { "name": "Hallucinatory Breath", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/air/fog-gas-smoke-purple.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Monarch_yx0vK2yfNVZKWUUi.json b/src/packs/adversaries/adversary_Monarch_yx0vK2yfNVZKWUUi.json index 470c6bc2..8d5845a9 100644 --- a/src/packs/adversaries/adversary_Monarch_yx0vK2yfNVZKWUUi.json +++ b/src/packs/adversaries/adversary_Monarch_yx0vK2yfNVZKWUUi.json @@ -346,7 +346,7 @@ "countdown": [ { "name": "Casus Belli", - "type": "longterm", + "type": "narrative", "defaultOwnership": -1, "img": "icons/sundries/scrolls/scroll-bound-sealed-red-tan.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Mortal_Hunter_mVV7a7KQAORoPMgZ.json b/src/packs/adversaries/adversary_Mortal_Hunter_mVV7a7KQAORoPMgZ.json index d726cbcd..33677263 100644 --- a/src/packs/adversaries/adversary_Mortal_Hunter_mVV7a7KQAORoPMgZ.json +++ b/src/packs/adversaries/adversary_Mortal_Hunter_mVV7a7KQAORoPMgZ.json @@ -688,7 +688,7 @@ "countdown": [ { "name": "Rampage", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/movement/trail-streak-zigzag-yellow.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Secret_Keeper_sLAccjvCWfeedbpI.json b/src/packs/adversaries/adversary_Secret_Keeper_sLAccjvCWfeedbpI.json index 8b470203..93bfef2c 100644 --- a/src/packs/adversaries/adversary_Secret_Keeper_sLAccjvCWfeedbpI.json +++ b/src/packs/adversaries/adversary_Secret_Keeper_sLAccjvCWfeedbpI.json @@ -436,7 +436,7 @@ "countdown": [ { "name": "Summoning Ritual", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/unholy/silhouette-light-fire-blue.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Stonewraith_3aAS2Qm3R6cgaYfE.json b/src/packs/adversaries/adversary_Stonewraith_3aAS2Qm3R6cgaYfE.json index 7dcd4bbc..52869085 100644 --- a/src/packs/adversaries/adversary_Stonewraith_3aAS2Qm3R6cgaYfE.json +++ b/src/packs/adversaries/adversary_Stonewraith_3aAS2Qm3R6cgaYfE.json @@ -522,7 +522,7 @@ "countdown": [ { "name": "Avalanche Roar", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/sonic/projectile-sound-rings-wave.webp", "progress": { diff --git a/src/packs/adversaries/adversary_Volcanic_Dragon__Ashen_Tyrant_pMuXGCSOQaxpi5tb.json b/src/packs/adversaries/adversary_Volcanic_Dragon__Ashen_Tyrant_pMuXGCSOQaxpi5tb.json index 37a5b55f..e360f0c8 100644 --- a/src/packs/adversaries/adversary_Volcanic_Dragon__Ashen_Tyrant_pMuXGCSOQaxpi5tb.json +++ b/src/packs/adversaries/adversary_Volcanic_Dragon__Ashen_Tyrant_pMuXGCSOQaxpi5tb.json @@ -840,7 +840,7 @@ "countdown": [ { "name": "Apocalyptic Thrasing", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/creatures/abilities/mouth-teeth-fire-orange.webp", "progress": { diff --git a/src/packs/domains/domainCard_Mass_Disguise_dT95m0Jam8sWbeuC.json b/src/packs/domains/domainCard_Mass_Disguise_dT95m0Jam8sWbeuC.json index 6b685f2e..b9fbaed9 100644 --- a/src/packs/domains/domainCard_Mass_Disguise_dT95m0Jam8sWbeuC.json +++ b/src/packs/domains/domainCard_Mass_Disguise_dT95m0Jam8sWbeuC.json @@ -57,7 +57,7 @@ "countdown": [ { "name": "Mass Disguise", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/time/hourglass-brown-orange.webp", "progress": { diff --git a/src/packs/environments/environment_Burning_Heart_of_the_Woods_oY69NN4rYxoRE4hl.json b/src/packs/environments/environment_Burning_Heart_of_the_Woods_oY69NN4rYxoRE4hl.json index 891bb808..86d3eff4 100644 --- a/src/packs/environments/environment_Burning_Heart_of_the_Woods_oY69NN4rYxoRE4hl.json +++ b/src/packs/environments/environment_Burning_Heart_of_the_Woods_oY69NN4rYxoRE4hl.json @@ -510,7 +510,7 @@ "countdown": [ { "name": "Choking Ash", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/air/fog-gas-smoke-brown.webp", "progress": { diff --git a/src/packs/environments/environment_Bustling_Marketplace_HZKA7hkej7JJY503.json b/src/packs/environments/environment_Bustling_Marketplace_HZKA7hkej7JJY503.json index f7b1b543..e10fad1a 100644 --- a/src/packs/environments/environment_Bustling_Marketplace_HZKA7hkej7JJY503.json +++ b/src/packs/environments/environment_Bustling_Marketplace_HZKA7hkej7JJY503.json @@ -257,7 +257,7 @@ "countdown": [ { "name": "Chase Thief", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/skills/movement/feet-winged-boots-brown.webp", "progress": { diff --git a/src/packs/environments/environment_Castle_Siege_1eZ32Esq7rfZOjlu.json b/src/packs/environments/environment_Castle_Siege_1eZ32Esq7rfZOjlu.json index 505c3a45..190d78b1 100644 --- a/src/packs/environments/environment_Castle_Siege_1eZ32Esq7rfZOjlu.json +++ b/src/packs/environments/environment_Castle_Siege_1eZ32Esq7rfZOjlu.json @@ -256,7 +256,7 @@ "countdown": [ { "name": "Siege Weapons (Environment Change)", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/weapons/artillery/catapult-simple.webp", "progress": { diff --git a/src/packs/environments/environment_Chaos_Realm_2Z1mKc65LxNk2PqR.json b/src/packs/environments/environment_Chaos_Realm_2Z1mKc65LxNk2PqR.json index c2f3f3af..e7c2c4e0 100644 --- a/src/packs/environments/environment_Chaos_Realm_2Z1mKc65LxNk2PqR.json +++ b/src/packs/environments/environment_Chaos_Realm_2Z1mKc65LxNk2PqR.json @@ -208,7 +208,7 @@ "countdown": [ { "name": "Impossible Architecture", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/symbols/squares-3d-green.webp", "progress": { @@ -317,7 +317,7 @@ "countdown": [ { "name": "Everything You Are This Place Will Take from You", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/control/sihouette-hold-beam-green.webp", "progress": { diff --git a/src/packs/environments/environment_Cliffside_Ascent_LPpfdlNKqiZIl04w.json b/src/packs/environments/environment_Cliffside_Ascent_LPpfdlNKqiZIl04w.json index 7cecabc7..ef367d67 100644 --- a/src/packs/environments/environment_Cliffside_Ascent_LPpfdlNKqiZIl04w.json +++ b/src/packs/environments/environment_Cliffside_Ascent_LPpfdlNKqiZIl04w.json @@ -157,7 +157,7 @@ "countdown": [ { "name": "The Climb", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/environment/wilderness/terrain-rocks-brown.webp", "progress": { diff --git a/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json b/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json index 04137b7f..1295db59 100644 --- a/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json +++ b/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json @@ -402,7 +402,7 @@ "countdown": [ { "name": "The Summoning", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/unholy/barrier-fire-pink.webp", "progress": { diff --git a/src/packs/environments/environment_Divine_Usurpation_4DLYez7VbMCFDAuZ.json b/src/packs/environments/environment_Divine_Usurpation_4DLYez7VbMCFDAuZ.json index 9522eb18..637cdd41 100644 --- a/src/packs/environments/environment_Divine_Usurpation_4DLYez7VbMCFDAuZ.json +++ b/src/packs/environments/environment_Divine_Usurpation_4DLYez7VbMCFDAuZ.json @@ -180,7 +180,7 @@ "countdown": [ { "name": "Final Preparations", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/unholy/hands-circle-light-green.webp", "progress": { @@ -543,7 +543,7 @@ "countdown": [ { "name": "Beginning of the End", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/unholy/silhouette-robe-evil-glow.webp", "progress": { diff --git a/src/packs/environments/environment_Haunted_City_OzYbizKraK92FDiI.json b/src/packs/environments/environment_Haunted_City_OzYbizKraK92FDiI.json index 4b2123ce..1bd07a57 100644 --- a/src/packs/environments/environment_Haunted_City_OzYbizKraK92FDiI.json +++ b/src/packs/environments/environment_Haunted_City_OzYbizKraK92FDiI.json @@ -313,7 +313,7 @@ "countdown": [ { "name": "Apocalypse Then", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/death/skull-weapon-staff-glow-pink.webp", "progress": { diff --git a/src/packs/environments/environment_Mountain_Pass_acMu9wJrMZZzLSTJ.json b/src/packs/environments/environment_Mountain_Pass_acMu9wJrMZZzLSTJ.json index 736eb158..eaad99f7 100644 --- a/src/packs/environments/environment_Mountain_Pass_acMu9wJrMZZzLSTJ.json +++ b/src/packs/environments/environment_Mountain_Pass_acMu9wJrMZZzLSTJ.json @@ -393,7 +393,7 @@ "countdown": [ { "name": "Icy Winds", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/water/snowflake-ice-blue-white.webp", "progress": { diff --git a/src/packs/environments/environment_Raging_River_t4cdqTfzcqP3H1vJ.json b/src/packs/environments/environment_Raging_River_t4cdqTfzcqP3H1vJ.json index fcde8d20..6c87c446 100644 --- a/src/packs/environments/environment_Raging_River_t4cdqTfzcqP3H1vJ.json +++ b/src/packs/environments/environment_Raging_River_t4cdqTfzcqP3H1vJ.json @@ -166,7 +166,7 @@ "countdown": [ { "name": "Dangerous Crossing", - "type": "shortterm", + "type": "encounter", "defaultOwnership": -1, "img": "icons/magic/water/wave-water-blue.webp", "progress": {