diff --git a/config.json.example b/config.json.example index 70044e43..bb0c1cf2 100644 --- a/config.json.example +++ b/config.json.example @@ -60,6 +60,7 @@ "unlockAllSimarisResearchEntries": false, "disableDailyTribute": false, "spoofMasteryRank": -1, + "relicRewardItemCountMultiplier": 1, "nightwaveStandingMultiplier": 1, "unfaithfulBugFixes": { "ignore1999LastRegionPlayed": false, diff --git a/src/helpers/relicHelper.ts b/src/helpers/relicHelper.ts index 13d7d7d4..03b0e9c9 100644 --- a/src/helpers/relicHelper.ts +++ b/src/helpers/relicHelper.ts @@ -6,6 +6,7 @@ import { logger } from "@/src/utils/logger"; import { addMiscItems, combineInventoryChanges } from "@/src/services/inventoryService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; import { IInventoryChanges } from "../types/purchaseTypes"; +import { config } from "../services/configService"; export const crackRelic = async ( inventory: TInventoryDatabaseDocument, @@ -35,7 +36,13 @@ export const crackRelic = async ( // Give reward combineInventoryChanges( inventoryChanges, - (await handleStoreItemAcquisition(reward.type, inventory, reward.itemCount)).InventoryChanges + ( + await handleStoreItemAcquisition( + reward.type, + inventory, + reward.itemCount * (config.relicRewardItemCountMultiplier ?? 1) + ) + ).InventoryChanges ); return reward; diff --git a/src/services/configService.ts b/src/services/configService.ts index e96ace26..aa649dd5 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -67,6 +67,7 @@ export interface IConfig { unlockAllSimarisResearchEntries?: boolean; disableDailyTribute?: boolean; spoofMasteryRank?: number; + relicRewardItemCountMultiplier?: number; nightwaveStandingMultiplier?: number; unfaithfulBugFixes?: { ignore1999LastRegionPlayed?: boolean; diff --git a/static/webui/index.html b/static/webui/index.html index c228a9ef..2f81fb39 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -788,14 +788,21 @@
- + + +
+
+
+ +
+
- +
@@ -919,7 +926,7 @@
- +
diff --git a/static/webui/script.js b/static/webui/script.js index f648809c..34b39060 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -1984,16 +1984,14 @@ single.getRoute("/webui/cheats").on("beforeload", function () { $(".config-admin-show").removeClass("d-none"); Object.entries(json).forEach(entry => { const [key, value] = entry; - var x = document.getElementById(`${key}`); - if (x != null) { - if (x.type == "checkbox") { - x.checked = value; - } else if (x.classList.contains("tags-input")) { - x.value = value.join(", "); - x.oninput(); - } else { - x.value = value; - } + const elm = document.getElementById(key); + if (elm.type == "checkbox") { + elm.checked = value; + } else if (elm.classList.contains("tags-input")) { + elm.value = value.join(", "); + elm.oninput(); + } else { + elm.value = value ?? elm.getAttribute("data-default"); } }); }) diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index e6b12f57..73d78a66 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -185,6 +185,7 @@ dict = { cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`, cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`, cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`, + cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`, cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`, cheats_save: `[UNTRANSLATED] Save`, cheats_account: `Account`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index c18e34d3..65594d49 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -184,6 +184,7 @@ dict = { cheats_unlockAllSimarisResearchEntries: `Unlock All Simaris Research Entries`, cheats_disableDailyTribute: `Disable Daily Tribute`, cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`, + cheats_relicRewardItemCountMultiplier: `Relic Reward Item Count Multiplier`, cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`, cheats_save: `Save`, cheats_account: `Account`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index 86d8c6be..7b480e61 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -185,6 +185,7 @@ dict = { cheats_unlockAllSimarisResearchEntries: `Desbloquear todas las entradas de investigación de Simaris`, cheats_disableDailyTribute: `Desactivar tributo diario`, cheats_spoofMasteryRank: `Rango de maestría simulado (-1 para desactivar)`, + cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`, cheats_nightwaveStandingMultiplier: `Multiplicador de Reputación de Onda Nocturna`, cheats_save: `Guardar`, cheats_account: `Cuenta`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index e35bc9ac..ef70cd6e 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -185,6 +185,7 @@ dict = { cheats_unlockAllSimarisResearchEntries: `Débloquer toute les recherches chez Simaris`, cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`, cheats_spoofMasteryRank: `Rang de maîtrise personnalisé (-1 pour désactiver)`, + cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`, cheats_nightwaveStandingMultiplier: `Multiplicateur de réputation d'Ondes Nocturnes`, cheats_save: `Sauvegarder`, cheats_account: `Compte`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 0666c75c..7f594867 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -185,6 +185,7 @@ dict = { cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`, cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`, cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`, + cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`, cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`, cheats_save: `[UNTRANSLATED] Save`, cheats_account: `Аккаунт`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index a15bc3a8..d62614ca 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -185,6 +185,7 @@ dict = { cheats_unlockAllSimarisResearchEntries: `解锁所有Simaris研究条目`, cheats_disableDailyTribute: `禁用每日登录奖励`, cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`, + cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`, cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`, cheats_save: `保存`, cheats_account: `账户`,