Skip to content

Commit

Permalink
Merge pull request #805 from Muttley/develop
Browse files Browse the repository at this point in the history
Release 2.2.2
  • Loading branch information
Muttley authored May 27, 2024
2 parents 42c4a7e + 1951fe8 commit e23a370
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 47 deletions.
11 changes: 11 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
84 changes: 42 additions & 42 deletions i18n/fi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions system/src/apps/CharacterGeneratorSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
7 changes: 7 additions & 0 deletions system/src/apps/LightSourceTrackerSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion system/src/apps/RealTimeSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
24 changes: 24 additions & 0 deletions system/src/utils/UtilitySD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
2 changes: 1 addition & 1 deletion system/system.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e23a370

Please sign in to comment.