Skip to content

Commit

Permalink
1.6.2
Browse files Browse the repository at this point in the history
Remove action and macro import, no need for macros now, while actions should be kept in compendia
  • Loading branch information
MrVauxs committed Jun 7, 2022
1 parent a627c91 commit 9db70c3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 96 deletions.
111 changes: 21 additions & 90 deletions autorec.json
Original file line number Diff line number Diff line change
Expand Up @@ -18067,7 +18067,7 @@
"macro": {
"enable": true,
"playWhen": "2",
"name": "Dancing Lights",
"name": "Compendium.pf2e-jb2a-macros.Macros.Dancing Lights",
"args": ""
},
"type": "source",
Expand Down Expand Up @@ -18314,7 +18314,7 @@
"macro": {
"enable": true,
"playWhen": "2",
"name": "Harm",
"name": "Compendium.pf2e-jb2a-macros.Macros.Harm",
"args": ""
},
"type": "",
Expand Down Expand Up @@ -18350,7 +18350,7 @@
"macro": {
"enable": true,
"playWhen": "2",
"name": "Heal",
"name": "Compendium.pf2e-jb2a-macros.Macros.Heal",
"args": ""
},
"type": "target",
Expand Down Expand Up @@ -19135,10 +19135,10 @@
"scaleY": 1,
"below": false,
"custom": false,
"opacity": 0.75,
"opacity": 0.5,
"removeTemplate": true,
"persist": true,
"persistType": "overheadtile",
"persistType": "attachtemplate",
"occlusionMode": "3",
"occlusionAlpha": 0.7,
"audio": {
Expand Down Expand Up @@ -19254,17 +19254,17 @@
"macro": {
"enable": true,
"playWhen": "2",
"name": "Grim Tendrils",
"name": "Compendium.pf2e-jb2a-macros.Macros.Grim Tendrils",
"args": ""
},
"type": "",
"animation": "",
"variant": "",
"color": "",
"custom": false,
"custom": true,
"repeat": null,
"delay": null,
"scaleX": null,
"scaleX": 1.1,
"scaleY": null,
"opacity": null,
"removeTemplate": false,
Expand All @@ -19274,8 +19274,9 @@
"enable": false
}
},
"menuType": "",
"menuSection": "4"
"menuType": "ray",
"menuSection": "4",
"customPath": "modules/jb2a_patreon/Library/Generic/Energy/EnergyStrand_Multiple01_Dark_Purple_30ft_1600x400.webm"
},
"6": {
"below": false,
Expand Down Expand Up @@ -19441,7 +19442,7 @@
"macro": {
"enable": true,
"playWhen": "2",
"name": "Bane_Animation",
"name": "Compendium.pf2e-jb2a-macros.Macros.Bane_Animation",
"args": ""
},
"menuType": "spell",
Expand Down Expand Up @@ -19472,7 +19473,7 @@
"macro": {
"enable": true,
"playWhen": "2",
"name": "Bless_Animation",
"name": "Compendium.pf2e-jb2a-macros.Macros.Bless_Animation",
"args": ""
},
"menuType": "spell",
Expand Down Expand Up @@ -20124,7 +20125,7 @@
},
"14": {
"below": false,
"hidden": true,
"hidden": false,
"name": "Effect Shillelagh",
"soundOnly": {
"enable": false
Expand All @@ -20134,10 +20135,10 @@
},
"aeType": "static",
"type": "source",
"menuType": "energy",
"animation": "strands",
"variant": "03",
"color": "green",
"menuType": "leaves",
"animation": "loop",
"variant": "01",
"color": "greenorange",
"custom": false,
"audio": {
"a01": {
Expand All @@ -20146,10 +20147,10 @@
},
"repeat": null,
"delay": null,
"scale": 1.2,
"scale": 2,
"opacity": null,
"aeDelay": null,
"persistent": false,
"persistent": true,
"unbindAlpha": false,
"unbindVisibility": false,
"explosion": {
Expand Down Expand Up @@ -20300,7 +20301,7 @@
"19": {
"below": false,
"hidden": true,
"name": "Stunned 1",
"name": "Stunned",
"soundOnly": {
"enable": false
},
Expand Down Expand Up @@ -20333,76 +20334,6 @@
"menuSection": "1"
},
"20": {
"below": false,
"hidden": true,
"name": "Stunned 2",
"soundOnly": {
"enable": false
},
"macro": {
"enable": false
},
"aeType": "static",
"type": "source",
"menuType": "conditions",
"animation": "stun",
"variant": "02",
"color": "random",
"custom": false,
"audio": {
"a01": {
"enable": false
}
},
"repeat": null,
"delay": null,
"scale": null,
"opacity": null,
"aeDelay": null,
"persistent": true,
"unbindAlpha": false,
"unbindVisibility": false,
"explosion": {
"enable": false
},
"menuSection": "2"
},
"21": {
"below": false,
"hidden": true,
"name": "Stunned 3",
"soundOnly": {
"enable": false
},
"macro": {
"enable": false
},
"aeType": "static",
"type": "source",
"menuType": "conditions",
"animation": "stun",
"variant": "03",
"color": "random",
"custom": false,
"audio": {
"a01": {
"enable": false
}
},
"repeat": null,
"delay": null,
"scale": null,
"opacity": null,
"aeDelay": null,
"persistent": true,
"unbindAlpha": false,
"unbindVisibility": false,
"explosion": {
"enable": false
},
"menuSection": "3"
},
"22": {
"below": false,
"hidden": true,
"name": "Wild Shape",
Expand Down
10 changes: 4 additions & 6 deletions module/auto-import.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let version = 160
let version = 162

Hooks.on("init", () => {
game.settings.register("pf2e-jb2a-macros", "imported", {
Expand All @@ -20,22 +20,20 @@ Hooks.on("renderSettings", () => {
if (!game.settings.get("pf2e-jb2a-macros", "imported")) {
Dialog.confirm({
title: "Macro Importer",
content: "<p>Welcome to the <strong>PF2e x JB2A</strong> module. Would you like to import all content to your World?",
yes: () => importAllMacros()
content: "<p>Welcome to the <strong>PF2e x JB2A</strong> module. Would you like to import all actors to your World?",
yes: () => importAll()
});
}
})

async function importAllMacros() {
async function importAll() {
const module = game.modules.get("pf2e-jb2a-macros");
let scenes = null;
let actors = null;
for (let p of module.packs) {
const pack = game.packs.get("pf2e-jb2a-macros." + p.name);
await pack.importAll();
if (p.entity === "Macro") macros = game.folders.getName(p.label);
if (p.entity === "Actor") actors = game.folders.getName(p.label);
if (p.entity === "Item") items = game.folders.getName(p.label);
}
game.settings.set("pf2e-jb2a-macros", "imported", true);
game.settings.set("pf2e-jb2a-macros", "version", version);
Expand Down

0 comments on commit 9db70c3

Please sign in to comment.