fix: extended-map-popup - TWMap.popup.loadVillage isn't called without premium
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dawid Wysokiński 2023-02-05 08:00:32 +01:00
parent 8a2990b248
commit 938142a298
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
3 changed files with 10 additions and 2 deletions

View File

@ -13,7 +13,7 @@ const preambles = {
// ==/UserScript==`,
'extended-map-popup': `// ==UserScript==
// @name Extended map popup
// @version 1.0.0
// @version 1.0.1
// @description Extends the map popup with additional info.
// @author Dawid Wysokiński - Kichiyaki - contact@dwysokinski.me
// @match https://*/game.php?*screen=map*

View File

@ -128,7 +128,10 @@ class Popup {
this.displayArrivalTimes(x, y);
this.displayCanSendNobleman(x, y);
await this.displayLatestEnnoblementAndLoyalty(parseInt(village.id), true);
await this.displayLatestEnnoblementAndLoyalty(
parseInt(village.id),
window.game_data.features.Premium.active
);
}
private displayArrivalTimes(x: number, y: number) {

5
src/global.d.ts vendored
View File

@ -18,6 +18,11 @@ declare global {
screen: string;
mode: string | null;
world: string;
features: {
Premium: {
active: boolean;
};
};
};
TribalWars: {
redirect: (queryParams: Record<string, string>) => void;