Skip to content

Commit

Permalink
Merge pull request #113 from League-of-Foundry-Developers/dev-0.3.4
Browse files Browse the repository at this point in the history
Dev 0.3.4
  • Loading branch information
UranusBytes authored Jul 30, 2023
2 parents a8cb81d + 665c610 commit 9be0d91
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 14 deletions.
11 changes: 11 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Simplefog Change Log

### 0.3.4: Bug Fixes
Jul 29, 2023
* Fixes for v11 by @macskay in #110
* Fixes for v11 by @mattd in #111

### 0.3.3: Bug Fixes
Jun 4, 2023
* Prettier format by @cirrahn in #104
* Avoid crash on initial load of history-less scene by @cirrahn in #105
* Handle v10 changes in tooling by @cirrahn in #106

### 0.3.1: Bug Fixes
Dec 17, 2022
* Fix Grid tool misaligned with the map's grid (Thanks cirrahn!) #95
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "simplefog",
"title": "Simplefog - Manual Fog of War",
"description": "Simplefog allows you to draw fog of war manually, optionally automatically hiding and revealing tokens underneath based on opacity. It provides a number of tools to quickly draw and erase fog in various shapes - brush, rectangles, ellipses, polygons or to reveal tiles you click/drag on the grid.",
"version": "0.3.1",
"version": "0.3.4",
"main": "main.js",
"scripts": {
"publish": "gulp publish --update",
Expand Down
25 changes: 22 additions & 3 deletions src/classes/MaskLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,18 @@ export default class MaskLayer extends InteractionLayer {
* @param data {Object} PIXI Object to be used as brush
*/
composite(brush) {
canvas.app.renderer.render(brush, this.maskTexture, false, null, false);
if (isNewerVersion(game.version, "10.999")) {
const opt = {
renderTexture: this.maskTexture,
clear: false,
transform: null,
skipUpdateTransform: false
}
canvas.app.renderer.render(brush, opt);
}
else {
canvas.app.renderer.render(brush, this.maskTexture, false, null, false);
}
}

/**
Expand Down Expand Up @@ -544,7 +555,11 @@ export default class MaskLayer extends InteractionLayer {
activate() {
simplefogLogDebug("MaskLayer.activate");
super.activate();
this.interactive = true;
if (isNewerVersion(game.version, "10.999")) {
this.eventMode = "static";
} else {
this.interactive = true;
}
}

/**
Expand All @@ -553,7 +568,11 @@ export default class MaskLayer extends InteractionLayer {
deactivate() {
simplefogLogDebug("MaskLayer.deactivate");
super.deactivate();
this.interactive = false;
if (isNewerVersion(game.version, "10.999")) {
this.eventMode = "passive";
} else {
this.interactive = false;
}
}

async draw() {
Expand Down
13 changes: 11 additions & 2 deletions src/classes/SimplefogNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@ import { dmToGM } from "../js/helpers.js";
export default class SimplefogNotification {
constructor() {}
static checkVersion() {
let packageVersion;

if (isNewerVersion(game.version, "9")) {
packageVersion = game.modules.get("simplefog").version;
}
else {
packageVersion = game.modules.get("simplefog").data.version;
}

if (
game.user.isGM &&
game.user.getFlag("simplefog", "versionNotification") !== game.modules.get("simplefog").data.version
game.user.getFlag("simplefog", "versionNotification") !== packageVersion
) {
// GM has never seen current version message

dmToGM(game.i18n.localize("SIMPLEFOG.versionNotification"), undefined);

// Update the saved version
game.user.setFlag("simplefog", "versionNotification", game.modules.get("simplefog").data.version);
game.user.setFlag("simplefog", "versionNotification", packageVersion);
}
}
}
2 changes: 1 addition & 1 deletion src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

"SIMPLEFOG.autoVisNotes": "When enabled, Automatic Visibility will show/hide tokens based on fog opacity level at their location based on the threshold setting. Brush color changes to green/red to indicate whether a token would be visible.",

"SIMPLEFOG.versionNotification": "<b>Simple Fog 0.3.1</b><p>This release includes:</p><ul><li>Fix Grid tool misaligned with the map's grid (Thanks cirrahn!) <a href='https://github.com/League-of-Foundry-Developers/simplefog/issues/95'>#95</a></li><li>Fog auto-enabling on all scenes repeatedly <a href='https://github.com/League-of-Foundry-Developers/simplefog/issues/92'>#92</a></li></ul><p>To report problems:<ul><li>open a GitHub issue <a href='https://github.com/League-of-Foundry-Developers/simplefog/issues' target='_blank'>here</a></li><li>send a message on Discord to <a href='https://discordapp.com/users/530108795796455437' target='_blank'>Glutious#7241</a></li></ul></p>",
"SIMPLEFOG.versionNotification": "<b>Simple Fog 0.3.4</b><p>This release includes:</p><ul><li>Fixes for v11 by macskay <a href='https://github.com/League-of-Foundry-Developers/simplefog/pull/110'>#110</a></li><li>Fixes for v11 by mattd <a href='https://github.com/League-of-Foundry-Developers/simplefog/pull/111'>#111</a></li></ul></p>",

"SIMPLEFOG.migration2Notification": "<b>Simple Fog Data Migration</b><p>The Simple Fog data has been migrated to a format supporting v3. It is <b>HIGHLY</b> recommended to review all scenes and fog visibility, both from a GM and a Player view before showing the scene to players."
}
2 changes: 1 addition & 1 deletion src/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

"SIMPLEFOG.autoVisNotes": "Cuando se activa, la visibilidad automática mostrará/ocultará los iconos en base al nivel de opacidad de la niebla en su localización y el umbral que se especifique. El color del pincel cambia a verde/rojo para indicar si el token es visible",

"SIMPLEFOG.versionNotification": "<b>Simple Fog 0.3.1</b><p>Esta versión incluye:</p><ul><li>Corregir herramienta de cuadrícula desalineada con la cuadrícula del mapa (¡Gracias, cirrahn!) <a href='https:/ /github.com/League-of-Foundry-Developers/simplefog/issues/95'>#95</a></li><li>Habilitación automática de niebla en todas las escenas repetidamente <a href='https:// github.com/League-of-Foundry-Developers/simplefog/issues/92'>#92</a></li></ul><p>Para informar problemas:<ul><li>abra un problema de GitHub <a href='https://github.com/League-of-Foundry-Developers/simplefog/issues' target='_blank'>aquí</a></li><li>envía un mensaje en Discord a < a href='https://discordapp.com/users/530108795796455437' target='_blank'>Glutious#7241</a></li></ul></p>",
"SIMPLEFOG.versionNotification": "<b>Simple Fog 0.3.4</b><p>Esta versión incluye:</p><ul><li>Arreglos para v11 de macskay <a href='https://github.com/League-of-Foundry-Developers/simplefog/pull/110'>#110</a></li><li>Arreglos para v11 por mattd <a href='https://github.com/League-of-Foundry-Developers/simplefog/pull/111'>#111</a></li></ul></p>",

"SIMPLEFOG.migration2Notification": "<b>Migración de datos de Simple Fog</b><p>Los datos de Simple Fog se han migrado a un formato compatible con v3. Se recomienda <b>MUY</b> revisar todas las escenas y la visibilidad de la niebla, tanto desde la vista del DJ como del jugador, antes de mostrar la escena a los jugadores."
}
2 changes: 1 addition & 1 deletion src/languages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

"SIMPLEFOG.autoVisNotes": "自動可視化を有効にすると、その場所のトークンの表示/非表示が、閾値として設定した霧の濃度に基づいて決定されるようになります。非表示となる濃度では、ブラシの色が緑から赤に変化してそれを知らせます。",

"SIMPLEFOG.versionNotification": "<b>Simple Fog 0.3.1</b><p>このリリースには以下が含まれます:</p><ul><li>マップのグリッドとのずれを修正するグリッド ツール (Thanks cirrahn!) <a href='https:/ /github.com/League-of-Foundry-Developers/simplefog/issues/95'>#95</a></li><li>すべてのシーンで繰り返しフォグの自動有効化 <a href='https:// github.com/League-of-Foundry-Developers/simplefog/issues/92'>#92</a></li></ul><p>問題を報告するには:<ul><li>GitHub の問題を開く <a href='https://github.com/League-of-Foundry-Developers/simplefog/issues' target='_blank'>こちら</a></li><li>Discord で < a href='https://discordapp.com/users/530108795796455437' target='_blank'>Glutious#7241</a></li></ul></p>",
"SIMPLEFOG.versionNotification": "<b>Simple Fog 0.3.4</b><p>このリリースには以下が含まれます:</p><ul><li>macskay による v11 の修正 <a href='https://github.com/League-of-Foundry-Developers/simplefog/pull/110'>#110</a></li><li>mattd による v11 の修正 <a href='https://github.com/League-of-Foundry-Developers/simplefog/pull/111'>#111</a></li></ul></p>",

"SIMPLEFOG.migration2Notification": "<b>Simple Fog データの移行</b><p>Simple Fog データは、v3 をサポートする形式に移行されました。 プレーヤーにシーンを表示する前に、GM ビューとプレーヤー ビューの両方から、すべてのシーンと霧の可視性を確認することを<b>強く</b>お勧めします。"
}
32 changes: 27 additions & 5 deletions src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "simplefog",
"title": "Simplefog - Manual Fog of War",
"description": "Simplefog allows you to draw fog of war manually, optionally automatically hiding and revealing tokens underneath based on opacity. It provides a number of tools to quickly draw and erase fog in various shapes - brush, rectangles, ellipses, polygons or to reveal tiles you click/drag on the grid.",
"version": "0.3.1",
"version": "0.3.4",
"authors": [
{
"name": "Vance Cole",
Expand Down Expand Up @@ -58,6 +58,28 @@
"ko-fi": "",
"reddit": "",
"email": ""
},
{
"name": "macskay",
"url": "https://github.com/macskay",
"discord": "",
"twitter": "",
"patreon": "",
"github": "macskay",
"ko-fi": "",
"reddit": "",
"email": ""
},
{
"name": "mattd",
"url": "https://github.com/mattd",
"discord": "",
"twitter": "",
"patreon": "",
"github": "mattd",
"ko-fi": "",
"reddit": "",
"email": ""
}
],
"type": "module",
Expand Down Expand Up @@ -112,15 +134,15 @@
"styles": ["css/brush-controls.css"],
"compatibility": {
"minimum": 10,
"verified": 10.291,
"maximum": 10
"verified": 11.306,
"maximum": 11
},
"manifestPlusVersion": "1.2.1",
"url": "https://github.com/League-of-Foundry-Developers/simplefog",
"manifest": "https://github.com/League-of-Foundry-Developers/simplefog/releases/latest/download/module.json",
"download": "https://github.com/League-of-Foundry-Developers/simplefog/releases/latest/download/module.zip",
"readme": "https://github.com/League-of-Foundry-Developers/simplefog/blob/v0.3.1/README.md",
"changelog": "https://github.com/League-of-Foundry-Developers/simplefog/blob/v0.3.1/CHANGELOG.md",
"readme": "https://github.com/League-of-Foundry-Developers/simplefog/blob/v0.3.4/README.md",
"changelog": "https://github.com/League-of-Foundry-Developers/simplefog/blob/v0.3.4/CHANGELOG.md",
"bugs": "https://github.com/League-of-Foundry-Developers/simplefog/issues",
"allowBugReporter": true,
"relationships": {
Expand Down

0 comments on commit 9be0d91

Please sign in to comment.