Skip to content

Commit 204fd05

Browse files
committed
bugfixes & deprecations
1 parent fe44aca commit 204fd05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+543
-390
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ If you want to discuss TDE for foundry or need some assistance you can also join
201201
<a href="https://www.f-shop.de/virtual-tabletops/das-schwarze-auge-vtt/abenteuer-module/4041/dsa5-die-winterwacht-bundle-fuer-foundry-vtt" target="_blank" title="Die Winterwacht">
202202
<img src="https://www.f-shop.de/media/image/94/cf/f2/ESD046_0_0999.jpg" alt="Die Winterwacht" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
203203
</a>
204+
<a href="https://www.f-shop.de/virtual-tabletops/das-schwarze-auge-vtt/abenteuer-module/4186/dsa5-die-flusslande-bundle-fuer-foundry-vtt" target="_blank" title="Die Flusslande">
205+
<img src="https://www.f-shop.de/media/image/95/6b/29/ESD049_0_0999.jpg" alt="Die Flusslande" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
206+
</a>
204207
</div>
205208
<br>
206209
<h2>English Modules</h2>

bundle/modules/dsa5.js

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lang/de.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@
911911
"hard": "Wenn du eine bestimmte Szene für die Helden schwerer machen möchtest, dann kannst du die Vorschläge dieses Abschnittes übernehmen.",
912912
"Description": "Willkommen im Journal Browser. Dieses Tool soll dich bei der Verwendung von Quellen-, Regel- und Abenteuermodulen unterstützen und einen Überblick über alle enthaltenen Inhalte liefern, wie z.B. die Szenen, Kapitel und Beschreibungen. Außerdem werden Hinweise zur Anwendung und gegebenenfalls automatische Funktionen zur Initialisierung der Module bereitgestellt.",
913913
"macroHint": "Folgende Macros sind teil dieses Moduls und erlauben besondere Funktionen. Du kannst sie nun in die Macroleiste ziehen oder später über das Macro Kompendium dieses Moduls finden.",
914-
"availableModules": "Installierte Abenteuermodule",
914+
"availableModules": "Verfügbare Abenteuermodule",
915915
"availableRules": "Verfügbare Regelwerke",
916916
"availableRSHs": "Verfügbare Regionalspielhilfen",
917917
"preparation": "Vorbereitung",
@@ -1742,6 +1742,8 @@
17421742
"2": "2 Aktionen zielen"
17431743
},
17441744
"DSASETTINGS": {
1745+
"libraryModulsFilter": "Module permanent filtern",
1746+
"libraryModulsFilterHint": "Konfigure alle Module die in der Bibliothek nicht angezeigt werden sollen. Du kannst so z.B. Module ausblenden, die nicht für deine Spielrunde relevant sind oder das Laden der Bibliothek beschleunigen.</p><p>Änderungen werden erst nach einem Neuladen wirksam.",
17451747
"moneyHasWeight": "Geld hat Gewicht",
17461748
"moneyHasWeightHint": "Lass deine Dagobert Ducks das Gewicht ihrer Gier spüren.",
17471749
"moneyKompendium": "Währungskompendium",

lang/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@
16351635
"easy": "If you want to make a certain scene easier for the heroes, you can adopt the suggestions of this section.",
16361636
"hard": "If you want to make a certain scene harder for the heroes, you can adopt the suggestions of this section.",
16371637
"Description": "Welcome to the journal browser. This tool is supposed to assist in the usage of source, rule and adventure modules by giving an overview on all included contents like scenes, chapters and descriptions. Moreover hints for the usage are provided and functions for the initialisation of the modules.",
1638-
"availableModules": "Installed adventure modules",
1638+
"availableModules": "Available adventure modules",
16391639
"availableRules": "Available rulebooks",
16401640
"availableRSHs": "Available regional supplements",
16411641
"preparation": "Preparation",
@@ -1675,6 +1675,8 @@
16751675
"gear": "Update icons, effects and effectformula of all gear, weapons and armors. THIS WILL OVERRIDE MANUAL MODIFICATIONS!"
16761676
},
16771677
"DSASETTINGS": {
1678+
"libraryModulsFilter": "Filter modules permanent",
1679+
"libraryModulsFilterHint": "Configure all modules that should not be displayed in the library. For example, you can hide modules that are not relevant to your game or speed up the loading of the library.</p><p>Changes will only take effect after a reload.",
16781680
"moneyHasWeight": "Money has weight",
16791681
"moneyHasWeightHint": "Let your Dagobert Ducks feel the weight of their greed.",
16801682
"moneyKompendium": "Currency Compendium",

lazy/patchhtml/modules_de.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,8 @@ <h2>Regionalspielhilfen</h2>
147147
<a href="https://www.f-shop.de/virtual-tabletops/das-schwarze-auge-vtt/abenteuer-module/4041/dsa5-die-winterwacht-bundle-fuer-foundry-vtt" target="_blank" data-tooltip="Die Winterwacht">
148148
<img src="https://www.f-shop.de/media/image/94/cf/f2/ESD046_0_0999.jpg" alt="Die Winterwacht" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
149149
</a>
150+
<a href="https://www.f-shop.de/virtual-tabletops/das-schwarze-auge-vtt/abenteuer-module/4186/dsa5-die-flusslande-bundle-fuer-foundry-vtt" target="_blank" data-tooltip="Die Flusslande">
151+
<img src="https://www.f-shop.de/media/image/95/6b/29/ESD049_0_0999.jpg" alt="Die Flusslande" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
152+
</a>
150153
</div>
151154
</div>

modules/actor/actor-sheet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,12 @@ export default class ActorSheetDsa5 extends ActorSheet {
385385
return await this.actor.checkEnoughXP(cost)
386386
}
387387

388-
async advanceWrapper(ev, funct, param) {
388+
async advanceWrapper(ev, funct, ...params) {
389389
if(this.wrapperLocked) return
390390

391391
this.wrapperLocked = true
392392
$(ev.currentTarget).find('i').addClass("fa-spin fa-spinner")
393-
const res = await this[funct](param)
393+
const res = await this[funct](...params)
394394
if(res) return
395395

396396
this.wrapperLocked = false

modules/hooks/actor.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,15 @@ export default function() {
302302
Hooks.on("updateToken", (token, data, options) => {
303303
if ( !token.rendered ) return;
304304

305+
const prePosition = { center: token.object.center, elevation: token.elevation }
305306
Riding.updateTokenHook(token, data, options);
306-
307+
307308
const animationName = options.animation?.name || token.object.animationName;
308309
const animationPromise = token.object.animationContexts.get(animationName)?.promise;
309310

310311
(animationPromise || Promise.resolve()).then(() => {
311-
token.object?.drawAuras();
312+
token.object?.drawAuras();
313+
if (game.dsa5.apps.LightDialog) game.dsa5.apps.LightDialog.onTokenMove(token, data, options, prePosition)
312314
})
313315
})
314316

modules/hooks/configuration.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,14 @@ export function setupConfiguration() {
414414
}
415415
});
416416

417+
game.settings.register("dsa5", "libraryModulsFilter", {
418+
name: "libraryModulsFilter",
419+
scope: "client",
420+
config: false,
421+
default: {},
422+
type: Object
423+
});
424+
417425
game.settings.register("dsa5", "tokenhotbarPosition", {
418426
name: "tokenhotbarPosition",
419427
scope: "client",

modules/hooks/handlebars.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ const modifierTypes = {
1717
}
1818

1919
function clickableAbilities(a, b){
20-
return `<span class=\"searchableAbility\" data-category="${b}">` + a.split(",").map(x => {
21-
return `<a>${x}</a>`
22-
}).join(", ") + "<span>"
20+
return a.split(/\n/g).map(sec => {
21+
const data = sec.split(":")
22+
const isSubsection = data.length > 1
23+
24+
return data.map((elems, index) => {
25+
if(index == 0 && isSubsection) return `<b>${elems}</b>`
26+
27+
return `<span class=\"searchableAbility\" data-category="${b}">` + elems.split(",").map(x => `<a>${x}</a>`).join(", ") + "<span>"
28+
}).join(":")
29+
}).join("<br/>")
2330
}
2431

2532
function clickableActorItems(actor, list, rankPath, maxPath) {

modules/hooks/token.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export default function() {
2727

2828
const promises = [];
2929
for ( const effect of activeEffects ) {
30-
if ( !effect.img ) continue;
31-
if ( effect.getFlag("core", "overlay") && !hasOverlay ) {
32-
promises.push(this._drawOverlay(effect.img, effect.tint));
33-
hasOverlay = true;
34-
}
35-
else promises.push(this._drawEffect(effect.img, effect.tint, getProperty(effect, "flags.dsa5.value")));
30+
if ( !effect.img ) continue;
31+
if ( effect.getFlag("core", "overlay") && !hasOverlay ) {
32+
promises.push(this._drawOverlay(effect.img, effect.tint));
33+
hasOverlay = true;
34+
}
35+
else promises.push(this._drawEffect(effect.img, effect.tint, getProperty(effect, "flags.dsa5.value")));
3636
}
3737
await Promise.allSettled(promises);
3838

@@ -78,7 +78,7 @@ export default function() {
7878
i++;
7979
}
8080
}
81-
}
81+
}
8282

8383
Token.prototype._drawEffect = async function(src, tint, value) {
8484
if ( !src ) return;
@@ -87,7 +87,7 @@ export default function() {
8787
icon.tint = tint ?? 0xFFFFFF;
8888
icon.counter = value
8989
return this.effects.addChild(icon);
90-
}
90+
}
9191

9292
Token.prototype.drawAuras = async function(force = false) {
9393
await DSAAura.drawAuras(this, force)

0 commit comments

Comments
 (0)