Skip to content

Commit 79012fe

Browse files
authored
v0.2.2 (#5)
* Allowed to change quest giver to existing quest by draggin new actor onto preview * Widened and squished Tasks and Rewards boxes respectively to allow better space management * Added word wrapping for tasks * Fixed distorted Quest Giver's images * Moved window initialization to 'ready' hook to fix translation
1 parent a54287f commit 79012fe

8 files changed

+65
-27
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# FoundryVTT - Forien's Quest Log
2-
**[Current version]**: v0.2.1
2+
**[Current version]**: v0.2.2
33
**[Compatibility]**: *FoundryVTT* 0.6.0+
44

5-
This module provides Quest Log system for players and Game Masters to use with Foundry Virtual Table Top
5+
This module provides comprehensive Quest Log system for players and Game Masters to use with Foundry Virtual Table Top
66

77
***If something doesn't work, make sure you have the NEWEST version. If you do, [submit an issue](https://github.com/Forien/foundryvtt-forien-quest-log/issues) or write me a [Direct Message on Discord](#Contact)!***
88

@@ -19,6 +19,7 @@ This module provides Quest Log system for players and Game Masters to use with F
1919
* Quest creator with WYSIWYG editors for description and GM notes
2020
* Subtasks
2121
* Draggable Item rewards
22+
* Fully editable Quest Details window
2223

2324
## Future plans (current ideas)
2425

changelog.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
## v0.X.X
44
### v0.2.X
55

6+
#### v0.2.2
7+
* Allowed to change quest giver to existing quest by draggin new actor onto preview
8+
* Widened and squished Tasks and Rewards boxes respectively to allow better space management
9+
* Added word wrapping for tasks
10+
* Fixed distorted Quest Giver's images
11+
* Moved window initialization to 'ready' hook to fix translation
12+
13+
614
#### v0.2.1
715
* Fully prepared module for translation - all strings should be translatable
816
* Added scroll for overflowing quest's description

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.2.1",
12+
"version": "0.2.2",
1313
"minimumCoreVersion": "0.6.0",
1414
"compatibleCoreVersion": "0.6.2",
1515
"url": "https://github.com/Forien/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/archive/v0.2.1.zip",
18-
"readme": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.2.1/README.md",
19-
"changelog": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.2.1/changelog.md",
17+
"download": "https://github.com/Forien/foundryvtt-forien-quest-log/archive/v0.2.2.zip",
18+
"readme": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.2.2/README.md",
19+
"changelog": "https://github.com/Forien/foundryvtt-forien-quest-log/blob/v0.2.2/changelog.md",
2020
"bugs": "https://github.com/Forien/foundryvtt-forien-quest-log/issues",
2121
"languages": [
2222
{

modules/quest-preview.mjs

+9
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ export default class QuestPreview extends FormApplication {
106106
}
107107
});
108108

109+
html.on("drop", ".quest-giver-gc", (event) => {
110+
event.preventDefault();
111+
let data = JSON.parse(event.originalEvent.dataTransfer.getData('text/plain'));
112+
if (data.type === 'Actor') {
113+
this.quest.actor = data.id;
114+
this.saveQuest();
115+
}
116+
});
117+
109118
html.on('dragstart', '.item-reward', (event) => {
110119
let dataTransfer = {
111120
type: "Item",

scripts/init.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ import Utils from "../modules/utils.mjs";
44
import Socket from "../modules/socket.mjs";
55
import ModuleSettings from "../modules/config.mjs";
66

7-
Hooks.on('init', () => {
7+
Hooks.once('init', () => {
88
ModuleSettings.register();
99

10-
if (!game.questlog) {
11-
game.questlog = new QuestLog();
12-
}
13-
1410
Utils.preloadTemplates();
1511

1612
// Allow and process incoming socket data
1713
Socket.listen();
1814
});
1915

20-
Hooks.on("ready", () => {
16+
Hooks.once("ready", () => {
17+
if (!game.questlog)
18+
game.questlog = new QuestLog();
19+
2120
if (game.questlog)
2221
QuestFolder.initializeJournals();
2322
});

styles/quest-log.css

+19-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/quest-log.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/quest-log.scss

+16-5
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ $footer-size: 32px + 2*$footer-padding;
8686
width: 55px;
8787
height: 55px;
8888
border: none;
89+
object-fit: cover;
90+
border-radius: 4px;
8991
}
9092
}
9193

@@ -245,7 +247,7 @@ $footer-size: 32px + 2*$footer-padding;
245247
.grid-container {
246248
height: 100%;
247249
display: grid;
248-
grid-template-columns: 1fr 1fr 1fr 1fr;
250+
grid-template-columns: 1fr 1.3fr 0.8fr 1fr;
249251
grid-template-rows: auto 1fr;
250252
gap: 1px 1px;
251253
grid-template-areas: "quest-giver-gc description-gc description-gc description-gc" "tasks-gc tasks-gc rewards-gc rewards-gc";
@@ -254,7 +256,7 @@ $footer-size: 32px + 2*$footer-padding;
254256
grid-area: quest-giver-gc;
255257
display: grid;
256258
grid-template-columns: 1fr;
257-
grid-template-rows: 1fr 1fr;
259+
grid-template-rows: auto 1fr;
258260
gap: 1px 1px;
259261
grid-template-areas: "." ".";
260262
}
@@ -280,18 +282,26 @@ $footer-size: 32px + 2*$footer-padding;
280282
.quest-giver-gc {
281283
div {
282284
text-align: center;
285+
position: relative;
283286

284287
span {
285288
font-weight: bold;
286289
text-align: center;
287290
}
288291

289292
img {
290-
width: 82px;
291-
height: 82px;
293+
width: 120px;
294+
height: 120px;
292295
border: none;
296+
object-fit: cover;
297+
border-radius: 6px;
293298
}
294299

300+
.toggleImage {
301+
position: absolute;
302+
bottom: 5px;
303+
right: 5px;
304+
}
295305

296306
span, img, .toggleImage {
297307
cursor: pointer;
@@ -332,10 +342,11 @@ $footer-size: 32px + 2*$footer-padding;
332342
.tasks-box {
333343
.task {
334344
display: grid;
335-
grid-template-columns: 26px max-content 18px;
345+
grid-template-columns: 26px auto 18px;
336346
grid-template-rows: 1fr;
337347
gap: 1px 1px;
338348
grid-template-areas: ". . .";
349+
margin-right: 15px;
339350

340351
i.state {
341352
&.fa-check, &.fa-times {

0 commit comments

Comments
 (0)