Skip to content

Commit

Permalink
Merge pull request #111 from mattd/feature/107-v11-compat
Browse files Browse the repository at this point in the history
Changes from @mattd
  • Loading branch information
UranusBytes authored Jul 29, 2023
2 parents d811a76 + 5bd8893 commit 8ec0fc4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/classes/MaskLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ export default class MaskLayer extends InteractionLayer {
activate() {
simplefogLogDebug("MaskLayer.activate");
super.activate();
this.interactive = true;
this.eventMode = "static";
}

/**
Expand All @@ -564,7 +564,7 @@ export default class MaskLayer extends InteractionLayer {
deactivate() {
simplefogLogDebug("MaskLayer.deactivate");
super.deactivate();
this.interactive = false;
this.eventMode = "passive";
}

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/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"styles": ["css/brush-controls.css"],
"compatibility": {
"minimum": 10,
"verified": 11.301,
"verified": 11.305,
"maximum": 11
},
"manifestPlusVersion": "1.2.1",
Expand Down

0 comments on commit 8ec0fc4

Please sign in to comment.