Skip to content

Commit 62e8dfd

Browse files
committed
v0.5.1
* [BUG] "_fql_quests" folder not being created on fresh installs
1 parent ac3dc28 commit 62e8dfd

File tree

4 files changed

+8
-57
lines changed

4 files changed

+8
-57
lines changed

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
### v0.5.1
4+
* [BUG] "_fql_quests" folder not being created on fresh installs
5+
36
## v0.5.0
47
* Quest Log UI Overhaul, big thanks to sdenec for designing new UI and for help implementing it!
58
* Quests can now have Quest Source that consists of custom image and name, without relying on any existing Entity

module.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
"url": "https://www.patreon.com/forien"
1010
}
1111
],
12-
"version": "0.5.0",
12+
"version": "0.5.1",
1313
"minimumCoreVersion": "0.6.0",
1414
"compatibleCoreVersion": "0.7.1",
1515
"url": "https://github.com/Forien/foundryvtt-forien-quest-log",
1616
"manifest": "https://raw.githubusercontent.com/Forien/foundryvtt-forien-quest-log/master/module.json",
17-
"download": "https://github.com/Forien/foundryvtt-forien-quest-log/releases/download/v0.5.0/v0.5.0.zip",
18-
"readme": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.5.0/README.md",
19-
"changelog": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.5.0/changelog.md",
17+
"download": "https://github.com/Forien/foundryvtt-forien-quest-log/releases/download/v0.5.1/v0.5.1.zip",
18+
"readme": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.5.1/README.md",
19+
"changelog": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.5.1/changelog.md",
2020
"bugs": "https://github.com/Forien/foundryvtt-forien-quest-log/issues",
2121
"wiki": "https://github.com/Forien/foundryvtt-forien-quest-log/wiki",
2222
"languages": [

modules/init.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Hooks.once('setup', () => {
3535
});
3636

3737
Hooks.once("ready", () => {
38+
QuestFolder.initializeJournals();
3839
registerApiHooks();
3940

4041
// Allow and process incoming socket data

modules/utility/utils.mjs

-53
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import QuestFolder from "../entities/quest-folder.mjs";
2-
31
export default class Utils {
42
static findActor(actorId) {
53
let actor = game.actors.get(actorId);
@@ -40,55 +38,4 @@ export default class Utils {
4038
return game.i18n.format(stringId, objData);
4139
});
4240
}
43-
44-
/**
45-
* Update Quests to use newer, flexible data format
46-
*/
47-
static updateQuests() {
48-
if (!game.user.isGM) return;
49-
const rootFolder = QuestFolder.get('root');
50-
let questDirs = {
51-
active: '_fql_active',
52-
completed: '_fql_completed',
53-
failed: '_fql_failed',
54-
hidden: '_fql_hidden'
55-
};
56-
57-
for (let key in questDirs) {
58-
const value = questDirs[key];
59-
let folder = game.journal.directory.folders.find(f => f.name === value);
60-
if (folder === undefined) continue;
61-
62-
folder.content.forEach(entry => {
63-
let content = entry.data.content;
64-
content = JSON.parse(content);
65-
66-
let isAvailable = false;
67-
if (key === 'hidden') {
68-
isAvailable = (entry.data.permission.default === 2 || content.personal);
69-
}
70-
content.id = entry._id;
71-
content.status = key;
72-
content.giver = null;
73-
74-
if (isAvailable) {
75-
content.status = 'available';
76-
}
77-
78-
let actor = content.actor || null;
79-
if (actor !== null) {
80-
let actorE = game.actors.get(actor);
81-
if (actorE) {
82-
content.giver = actorE.uuid;
83-
}
84-
}
85-
delete content.actor;
86-
87-
content = JSON.stringify(content);
88-
entry.update({content: content, folder: rootFolder}, {diff: false});
89-
});
90-
91-
folder.delete();
92-
}
93-
}
9441
};

0 commit comments

Comments
 (0)