UNPKG

ggejs

Version:

A powerful JavaScript library for interacting with the server of Goodgame Empire: Four Kingdoms

70 lines (57 loc) 1.63 kB
const Localize = require("../../tools/Localize"); class CastlePremiumMarketShop { #client shopTypes = [] continuousPurchaseCount = 0; /** * @param {Client} client * @param {string} titleId * @param {string} shortInfoTextId * @param {string} buyQuestionTextId * @param {Good} costs * @param {number} minLevel */ constructor(client, titleId, shortInfoTextId, buyQuestionTextId, costs, minLevel = 0) { this.#client = client this.titleStringId = titleId; this.shortInfoTextId = shortInfoTextId; this.costs = costs; this.buyQuestionTextId = buyQuestionTextId; this.minLevel = minLevel; } get title() { return Localize.text(this.#client, this.titleStringId); } get shortInfoText() { return Localize.text(this.#client, this.shortInfoTextId); } get buyQuestionText() { if (!this.isActive) { return Localize.text(this.#client, this.buyQuestionTextId); } return this.renewText(); } renewText() { console.error(`missing renew text id for: ${this.titleStringId} shop type: ${this.shopTypes.toString()}`); return ""; } get isVisible() { return true } get isActive() { return false } get bonus() { return "+ 0%"; } get listSortPriority() { return 655 } get iconMcClass() { return "" } get effectIconId() { return "" } } module.exports = CastlePremiumMarketShop;