diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b83e15ed..f0ef3f5b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,14 @@ +# v2.2.2 + +## Bugfixes +* [#799] Character Generator incorrectly generating character stats +* [#802] Light sources counting down too quickly with multiple GMs logged in + +## Chores +* [#797] Merged Finnish language updates from Crowdin + +--- + # v2.2.1 ## Bugfixes diff --git a/i18n/fi.yaml b/i18n/fi.yaml index 38cb432d..0b38018f 100644 --- a/i18n/fi.yaml +++ b/i18n/fi.yaml @@ -13,14 +13,14 @@ SHADOWDARK.ability_wisdom: Viisaus SHADOWDARK.alignment.chaotic: Kaoottinen SHADOWDARK.alignment.lawful: Lainkuuliainen SHADOWDARK.alignment.neutral: Neutraali -SHADOWDARK.ancestry.languages.label: Ancestry Languages -SHADOWDARK.ancestry.languages.prompt: Select Language... +SHADOWDARK.ancestry.languages.label: Lajin osaamat kielet +SHADOWDARK.ancestry.languages.prompt: Valitse kieli... SHADOWDARK.ancestry.nametable.label: Satunnainen nimilista -SHADOWDARK.ancestry.nametable.placeholder: Drag Roll Table Here -SHADOWDARK.ancestry.talents.count.label: Choice Count -SHADOWDARK.ancestry.talents.label: Ancestry Talents -SHADOWDARK.ancestry.talents.prompt: Select Talent... -SHADOWDARK.ancestry.tooltip.weight: Affects the chance of rolling when using the Character Generator. Higher values increase chance. Default value is 1. +SHADOWDARK.ancestry.nametable.placeholder: Vedä kielitaulu tähän +SHADOWDARK.ancestry.talents.count.label: Valintojen määrä +SHADOWDARK.ancestry.talents.label: Lajin lahjakkuudet +SHADOWDARK.ancestry.talents.prompt: Valitse lahjakkuus... +SHADOWDARK.ancestry.tooltip.weight: Vaikuttaa noppaheittoihin kun käytetään hahmogeneraattoria. Korkeammat arvot lisäävät todennäköisyyttä. Oletusarvo on 1. SHADOWDARK.app.active_effects.title: Aktiiviset Efektit SHADOWDARK.app.gem_bag.sell_all: Myy kaikki jalokivet SHADOWDARK.app.gem_bag.title: Jalokivipussi @@ -40,21 +40,21 @@ SHADOWDARK.app.light-tracker.douse-light: Sammuta valonlähde SHADOWDARK.app.light-tracker.hide-inactive: Piilota hahmot/esineet joita ei ole valaistu SHADOWDARK.app.light-tracker.show-all-actors: Näytä kaikki hahmot/esineet SHADOWDARK.app.light-tracker.turn-out-the-lights: Sammuta kaikki valonlähteet -SHADOWDARK.app.loading.body: Searching Distant Lands... -SHADOWDARK.app.loading.title: Loading +SHADOWDARK.app.loading.body: Etsitään kaukaisia maita... +SHADOWDARK.app.loading.title: Ladataan SHADOWDARK.app.npc_attack_ranges.title: Kantamat -SHADOWDARK.apps.character-generator.create_character: Create Character -SHADOWDARK.apps.character-generator.error.create: Failed to create player character {error} -SHADOWDARK.apps.character-generator.error.name: Character name cannot be blank -SHADOWDARK.apps.character-generator.error.no_ancestry_for_name: Unable to roll a random name without a selected Ancestry -SHADOWDARK.apps.character-generator.name: Character Name -SHADOWDARK.apps.character-generator.starting_gear: Starting Gear -SHADOWDARK.apps.character-generator.starting_gold: Starting Gold -SHADOWDARK.apps.character-generator.stats: Stats -SHADOWDARK.apps.character-generator.success: Character created -SHADOWDARK.apps.character-generator.title: Character Generator -SHADOWDARK.apps.character-generator.type: Type -SHADOWDARK.apps.character-generator.update_character: Update Character +SHADOWDARK.apps.character-generator.create_character: Luo uusi hahmo +SHADOWDARK.apps.character-generator.error.create: Pelaajahahmon luonti epäonnistui {error} +SHADOWDARK.apps.character-generator.error.name: Hahmon nimi ei voi olla tyhjä +SHADOWDARK.apps.character-generator.error.no_ancestry_for_name: Ei pystytä arpomaan nimeä ilman valittua lajia +SHADOWDARK.apps.character-generator.name: Hahmon nimi +SHADOWDARK.apps.character-generator.starting_gear: Aloitustarvikkeet +SHADOWDARK.apps.character-generator.starting_gold: Aloitusraha +SHADOWDARK.apps.character-generator.stats: Kyvyt +SHADOWDARK.apps.character-generator.success: Hahmo luotu +SHADOWDARK.apps.character-generator.title: Hahmogeneraattori +SHADOWDARK.apps.character-generator.type: Tyyppi +SHADOWDARK.apps.character-generator.update_character: Päivitä hahmoa SHADOWDARK.apps.effect_panel.dialog.delete_effect.content: Haluatko poistaa {effectName} efektin? SHADOWDARK.apps.effect_panel.dialog.delete_effect.title: Poista efekti? SHADOWDARK.apps.effect_panel.duration_label.expired: Vanhentunut @@ -74,26 +74,26 @@ SHADOWDARK.apps.effect_panel.duration_label.x_seconds: "{seconds} sekuntia jälj SHADOWDARK.apps.effect_panel.duration_label.x_weeks: "{weeks} viikkoa jäljellä" SHADOWDARK.apps.effect_panel.duration_label.x_years: "{years} vuotta jäljellä" SHADOWDARK.apps.effect_panel.right_click_to_remove: "[Oikea klikkaus] Poista efekti" -SHADOWDARK.apps.item-importer.import_button: Import Item -SHADOWDARK.apps.item-importer.instruction1: 1. Copy item text from source material. -SHADOWDARK.apps.item-importer.instruction2a: 2. Paste text into this box following the item format shown in the core rules. -SHADOWDARK.apps.item-importer.instruction2b: Item Name -SHADOWDARK.apps.item-importer.instruction2c: Flavor text -SHADOWDARK.apps.item-importer.instruction2d: Features -SHADOWDARK.apps.item-importer.instruction3: 3. Click Import Item. -SHADOWDARK.apps.item-importer.title: Import Item -SHADOWDARK.apps.level-up.dragdrop: Drag and Drop Here -SHADOWDARK.apps.level-up.hit_points: Hit Points -SHADOWDARK.apps.level-up.level_up: Level Up! -SHADOWDARK.apps.level-up.leveling_to: Leveling up to level -SHADOWDARK.apps.level-up.notalent: No talents gained at this level -SHADOWDARK.apps.level-up.roll_talent: Roll Talent -SHADOWDARK.apps.level-up.title: Leveling Up -SHADOWDARK.apps.monster-importer.import_button: Import Monster -SHADOWDARK.apps.monster-importer.instruction1: 1. Copy monster text from source material. -SHADOWDARK.apps.monster-importer.instruction2a: 2. Paste text into the text box following the monster format shown in the core rules. Add a blank line between each ability. -SHADOWDARK.apps.monster-importer.instruction2b: Monster Name -SHADOWDARK.apps.monster-importer.instruction2c: Flavor text +SHADOWDARK.apps.item-importer.import_button: Tuo esine +SHADOWDARK.apps.item-importer.instruction1: 1. Kopioi esineen teksti lähdemateriaalista. +SHADOWDARK.apps.item-importer.instruction2a: 2. Liitä teksti tähän. +SHADOWDARK.apps.item-importer.instruction2b: Esineen nimi +SHADOWDARK.apps.item-importer.instruction2c: Kuvausteksti +SHADOWDARK.apps.item-importer.instruction2d: Ominaisuudet +SHADOWDARK.apps.item-importer.instruction3: 3. Paina "Tuo esine"-nappia. +SHADOWDARK.apps.item-importer.title: Tuo esine +SHADOWDARK.apps.level-up.dragdrop: Vedä ja tiputa tähän +SHADOWDARK.apps.level-up.hit_points: Osumapisteet +SHADOWDARK.apps.level-up.level_up: Hahmosi kehittyi seuraavalle tasolle! +SHADOWDARK.apps.level-up.leveling_to: Kehitetään hahmoa tasolle +SHADOWDARK.apps.level-up.notalent: Ei uusia lahjakkuuksia tällä tasolla +SHADOWDARK.apps.level-up.roll_talent: Arvo uusi lahjakkuus +SHADOWDARK.apps.level-up.title: Hahmon kehitys +SHADOWDARK.apps.monster-importer.import_button: Tuo hirviö +SHADOWDARK.apps.monster-importer.instruction1: 1. Kopioi hirviön teksti lähdemateriaalista. +SHADOWDARK.apps.monster-importer.instruction2a: 2. Liitä hirviön teksti tähän. Lisää jokaisen kyvyn väliin tyhjä rivi. +SHADOWDARK.apps.monster-importer.instruction2b: Hirviön nimi +SHADOWDARK.apps.monster-importer.instruction2c: Kuvausteksti SHADOWDARK.apps.monster-importer.instruction2d: Main stat block SHADOWDARK.apps.monster-importer.instruction2e: Feature SHADOWDARK.apps.monster-importer.instruction3: 3. Click Import Monster. @@ -505,7 +505,7 @@ SHADOWDARK.light-source.dropped: Pudotettiin {name} SHADOWDARK.light-source.pick-up-lightsource.tooltip: Poimi valonlähde SHADOWDARK.light-tracker.active: Aktiivinen SHADOWDARK.light-tracker.paused: Pausetettu -SHADOWDARK.light-tracker.status.label: Statut +SHADOWDARK.light-tracker.status.label: Status SHADOWDARK.light-tracker.title.prefix: Valonlähteiden SHADOWDARK.light-tracker.title.suffix: seuranta SHADOWDARK.light-tracker.user_warning: Yksi tai useampi käyttäjä ei ole valinnut hahmoa diff --git a/system/src/apps/CharacterGeneratorSD.mjs b/system/src/apps/CharacterGeneratorSD.mjs index 02fa82c6..74b2be1d 100644 --- a/system/src/apps/CharacterGeneratorSD.mjs +++ b/system/src/apps/CharacterGeneratorSD.mjs @@ -360,9 +360,9 @@ export default class CharacterGeneratorSD extends FormApplication { // randomize stats if (eventStr === "randomize-stats" || eventStr === "randomize-all") { - CONFIG.SHADOWDARK.ABILITY_KEYS.forEach(async x => { - this.formData.actor.system.abilities[x].base = await this._roll("3d6"); - }); + for (const key of CONFIG.SHADOWDARK.ABILITY_KEYS) { + this.formData.actor.system.abilities[key].base = await this._roll("3d6"); + } this._calculateModifiers(); } diff --git a/system/src/apps/LightSourceTrackerSD.mjs b/system/src/apps/LightSourceTrackerSD.mjs index df05b462..581385ef 100644 --- a/system/src/apps/LightSourceTrackerSD.mjs +++ b/system/src/apps/LightSourceTrackerSD.mjs @@ -293,6 +293,9 @@ export default class LightSourceTrackerSD extends Application { // we only run the timer on the GM instance if (!game.user.isGM) return; + // set default state for flag + await game.user.setFlag("shadowdark", "primaryGM", false); + // Now we can actually start properly shadowdark.log("Light Tracker starting"); @@ -505,6 +508,10 @@ export default class LightSourceTrackerSD extends Application { this.lastUpdate = worldTime; + if (!shadowdark.utils.isPrimaryGM()) { + this.render(false); + return; + } shadowdark.log("Updating light sources"); try { diff --git a/system/src/apps/RealTimeSD.mjs b/system/src/apps/RealTimeSD.mjs index 3eb57eac..9d112351 100644 --- a/system/src/apps/RealTimeSD.mjs +++ b/system/src/apps/RealTimeSD.mjs @@ -42,6 +42,8 @@ export default class RealTimeSD { return; } if (this.isPaused()) return; - game.time.advance(this.updateIntervalMs / 1000); + if (shadowdark.utils.isPrimaryGM()) { + game.time.advance(this.updateIntervalMs / 1000); + } } } diff --git a/system/src/utils/UtilitySD.mjs b/system/src/utils/UtilitySD.mjs index f599c1a9..1d1302fd 100644 --- a/system/src/utils/UtilitySD.mjs +++ b/system/src/utils/UtilitySD.mjs @@ -234,4 +234,28 @@ export default class UtilitySD { } return itemObj; } + + static isPrimaryGM() { + if (!game.user.isGM) return false; + + // if primaryGM flag is true, return + if (game.user.getFlag("shadowdark", "primaryGM")) { + return true; + } + else { + // locate the primary GM + const primaryGMs = game.users.filter(x => + x.active === true && x.flags.shadowdark.primaryGM === true + ); + if (primaryGMs.length === 0) { + // if no primary GM, set current user as primary GM + game.user.setFlag("shadowdark", "primaryGM", true); + shadowdark.log("Promoted to Primary GM"); + return true; + } + else { + return false; + } + } + } } diff --git a/system/system.json b/system/system.json index bd0d6a95..7aeae130 100644 --- a/system/system.json +++ b/system/system.json @@ -2,7 +2,7 @@ "id": "shadowdark", "title": "Shadowdark RPG", "desciption": "A system for playing the Shadowdark RPG from Arcane Library", - "version": "2.2.1", + "version": "2.2.2", "compatibility": { "minimum": "11", "verified": "12"