Working on Compatibility for FVTT v10

Updated compendium for content-link (added an uuid)
Journal activateListeners -> _activatePageListeners
This commit is contained in:
Vlyan
2022-07-23 19:04:33 +02:00
parent c7476a42c2
commit 096429d2f8
8 changed files with 282 additions and 281 deletions

View File

@@ -313,12 +313,12 @@ export class TwentyQuestions {
const newItemsData = [];
Object.values(itemsCache).forEach((types) => {
types.forEach((item) => {
const itemData = foundry.utils.duplicate(item.data);
if (itemData.data?.bought_at_rank) {
itemData.data.bought_at_rank = 0;
const itemData = foundry.utils.duplicate(item);
if (itemData.system?.bought_at_rank) {
itemData.system.bought_at_rank = 0;
}
if (itemData.data?.xp_spent) {
itemData.data.xp_spent = 0;
if (itemData.system?.xp_spent) {
itemData.system.xp_spent = 0;
}
newItemsData.push(itemData);
});

View File

@@ -54,11 +54,12 @@ export class BaseJournalSheetL5r5e extends JournalSheet {
}
/**
* Subscribe to events from the sheet.
* @param {jQuery} html HTML content of the sheet.
* Activate listeners after page content has been injected.
* @protected
*/
activateListeners(html) {
super.activateListeners(html);
_activatePageListeners() {
super._activatePageListeners();
const html = this.element;
// Commons
game.l5r5e.HelpersL5r5e.commonListeners(html);