mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Restored encounter/narrative
This commit is contained in:
parent
ec56e1812c
commit
cf47385d83
30 changed files with 42 additions and 56 deletions
|
|
@ -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" },
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Hallucinatory Breath",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/air/fog-gas-smoke-purple.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Circle of Defilement",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/unholy/barrier-fire-pink.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Petrifying Gaze",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/earth/strike-body-stone-crumble.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -611,7 +611,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Hallucinatory Breath",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/air/fog-gas-smoke-purple.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -688,7 +688,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Rampage",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/movement/trail-streak-zigzag-yellow.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Summoning Ritual",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/unholy/silhouette-light-fire-blue.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Avalanche Roar",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/sonic/projectile-sound-rings-wave.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -840,7 +840,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Apocalyptic Thrasing",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/creatures/abilities/mouth-teeth-fire-orange.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Mass Disguise",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/time/hourglass-brown-orange.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Choking Ash",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/air/fog-gas-smoke-brown.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Chase Thief",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/skills/movement/feet-winged-boots-brown.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Siege Weapons (Environment Change)",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/weapons/artillery/catapult-simple.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "The Climb",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/environment/wilderness/terrain-rocks-brown.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "The Summoning",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/unholy/barrier-fire-pink.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Icy Winds",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/water/snowflake-ice-blue-white.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@
|
|||
"countdown": [
|
||||
{
|
||||
"name": "Dangerous Crossing",
|
||||
"type": "shortterm",
|
||||
"type": "encounter",
|
||||
"defaultOwnership": -1,
|
||||
"img": "icons/magic/water/wave-water-blue.webp",
|
||||
"progress": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue