Skip to content

Commit

Permalink
Merge pull request #91 from PwQt/173-branch
Browse files Browse the repository at this point in the history
1.7.3
  • Loading branch information
PwQt authored Mar 21, 2024
2 parents c532c6e + 58557a4 commit ed619a8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ Hooks.once("init", () => {
config: true,
});

game.settings.register(CONSTANTS.MODULE_ID, "counter", {
name: "counter",
hint: "",
scope: "client",
type: Boolean,
default: false,
config: false,
});

if (typeof Babele !== "undefined") {
Babele.get().register({
module: CONSTANTS.MODULE_ID,
Expand All @@ -60,6 +69,29 @@ Hooks.once("ready", () => {
.forEach((actor) => {
MagicItemActor.bind(actor);
});
if (game.settings.get(CONSTANTS.MODULE_ID, "counter") === false && game.user.isGM) {
let x = new Dialog({
title: "Magic Items Migration",
content:
"The module Magic Items 2 is being moved in the place of the old one - Magic Items.<br><br>Magic Items 2 module id will no longer be updated, so please check the Foundry module listing or github page for Magic Items version 4.0.<br><br>",
buttons: {
use: {
icon: '<i class="fas fa-check"></i>',
label: "I have read this message, please don't show it again.",
callback: () => {
game.settings.set(CONSTANTS.MODULE_ID, "counter", true);
},
},
close: {
icon: '<i class="fas fa-times"></i>',
label: "Ignore this message for now",
callback: () => x.close(),
},
},
default: "use",
});
x.render(true);
}
});

Hooks.once("createActor", (actor) => {
Expand Down

0 comments on commit ed619a8

Please sign in to comment.