forked from OpenWF/SpaceNinjaServer
feat: relicRewardItemCountMultiplier cheat (#2369)
Reviewed-on: OpenWF/SpaceNinjaServer#2369 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
aa916d2820
commit
75832afdbe
@ -60,6 +60,7 @@
|
|||||||
"unlockAllSimarisResearchEntries": false,
|
"unlockAllSimarisResearchEntries": false,
|
||||||
"disableDailyTribute": false,
|
"disableDailyTribute": false,
|
||||||
"spoofMasteryRank": -1,
|
"spoofMasteryRank": -1,
|
||||||
|
"relicRewardItemCountMultiplier": 1,
|
||||||
"nightwaveStandingMultiplier": 1,
|
"nightwaveStandingMultiplier": 1,
|
||||||
"unfaithfulBugFixes": {
|
"unfaithfulBugFixes": {
|
||||||
"ignore1999LastRegionPlayed": false,
|
"ignore1999LastRegionPlayed": false,
|
||||||
|
@ -6,6 +6,7 @@ import { logger } from "@/src/utils/logger";
|
|||||||
import { addMiscItems, combineInventoryChanges } from "@/src/services/inventoryService";
|
import { addMiscItems, combineInventoryChanges } from "@/src/services/inventoryService";
|
||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
||||||
import { IInventoryChanges } from "../types/purchaseTypes";
|
import { IInventoryChanges } from "../types/purchaseTypes";
|
||||||
|
import { config } from "../services/configService";
|
||||||
|
|
||||||
export const crackRelic = async (
|
export const crackRelic = async (
|
||||||
inventory: TInventoryDatabaseDocument,
|
inventory: TInventoryDatabaseDocument,
|
||||||
@ -35,7 +36,13 @@ export const crackRelic = async (
|
|||||||
// Give reward
|
// Give reward
|
||||||
combineInventoryChanges(
|
combineInventoryChanges(
|
||||||
inventoryChanges,
|
inventoryChanges,
|
||||||
(await handleStoreItemAcquisition(reward.type, inventory, reward.itemCount)).InventoryChanges
|
(
|
||||||
|
await handleStoreItemAcquisition(
|
||||||
|
reward.type,
|
||||||
|
inventory,
|
||||||
|
reward.itemCount * (config.relicRewardItemCountMultiplier ?? 1)
|
||||||
|
)
|
||||||
|
).InventoryChanges
|
||||||
);
|
);
|
||||||
|
|
||||||
return reward;
|
return reward;
|
||||||
|
@ -67,6 +67,7 @@ export interface IConfig {
|
|||||||
unlockAllSimarisResearchEntries?: boolean;
|
unlockAllSimarisResearchEntries?: boolean;
|
||||||
disableDailyTribute?: boolean;
|
disableDailyTribute?: boolean;
|
||||||
spoofMasteryRank?: number;
|
spoofMasteryRank?: number;
|
||||||
|
relicRewardItemCountMultiplier?: number;
|
||||||
nightwaveStandingMultiplier?: number;
|
nightwaveStandingMultiplier?: number;
|
||||||
unfaithfulBugFixes?: {
|
unfaithfulBugFixes?: {
|
||||||
ignore1999LastRegionPlayed?: boolean;
|
ignore1999LastRegionPlayed?: boolean;
|
||||||
|
@ -788,14 +788,21 @@
|
|||||||
<form class="form-group mt-2" onsubmit="doSaveConfigInt('spoofMasteryRank'); return false;">
|
<form class="form-group mt-2" onsubmit="doSaveConfigInt('spoofMasteryRank'); return false;">
|
||||||
<label class="form-label" for="spoofMasteryRank" data-loc="cheats_spoofMasteryRank"></label>
|
<label class="form-label" for="spoofMasteryRank" data-loc="cheats_spoofMasteryRank"></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" max="65535" />
|
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" max="65535" data-default="-1" />
|
||||||
|
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<form class="form-group mt-2" onsubmit="doSaveConfigInt('relicRewardItemCountMultiplier'); return false;">
|
||||||
|
<label class="form-label" for="relicRewardItemCountMultiplier" data-loc="cheats_relicRewardItemCountMultiplier"></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input class="form-control" id="relicRewardItemCountMultiplier" type="number" min="1" max="1000000" data-default="1" />
|
||||||
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
|
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<form class="form-group mt-2" onsubmit="doSaveConfigInt('nightwaveStandingMultiplier'); return false;">
|
<form class="form-group mt-2" onsubmit="doSaveConfigInt('nightwaveStandingMultiplier'); return false;">
|
||||||
<label class="form-label" for="nightwaveStandingMultiplier" data-loc="cheats_nightwaveStandingMultiplier"></label>
|
<label class="form-label" for="nightwaveStandingMultiplier" data-loc="cheats_nightwaveStandingMultiplier"></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="form-control" id="nightwaveStandingMultiplier" type="number" min="1" max="1000000" value="1" />
|
<input class="form-control" id="nightwaveStandingMultiplier" type="number" min="1" max="1000000" data-default="1" />
|
||||||
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
|
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -919,7 +926,7 @@
|
|||||||
<form class="form-group mt-2" onsubmit="doSaveConfigFloat('worldState.darvoStockMultiplier'); return false;">
|
<form class="form-group mt-2" onsubmit="doSaveConfigFloat('worldState.darvoStockMultiplier'); return false;">
|
||||||
<label class="form-label" for="worldState.circuitGameModes" data-loc="worldState_darvoStockMultiplier"></label>
|
<label class="form-label" for="worldState.circuitGameModes" data-loc="worldState_darvoStockMultiplier"></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="worldState.darvoStockMultiplier" class="form-control" type="number" step="0.01" placeholder="1" />
|
<input id="worldState.darvoStockMultiplier" class="form-control" type="number" step="0.01" data-default="1" />
|
||||||
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
|
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1984,16 +1984,14 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
|
|||||||
$(".config-admin-show").removeClass("d-none");
|
$(".config-admin-show").removeClass("d-none");
|
||||||
Object.entries(json).forEach(entry => {
|
Object.entries(json).forEach(entry => {
|
||||||
const [key, value] = entry;
|
const [key, value] = entry;
|
||||||
var x = document.getElementById(`${key}`);
|
const elm = document.getElementById(key);
|
||||||
if (x != null) {
|
if (elm.type == "checkbox") {
|
||||||
if (x.type == "checkbox") {
|
elm.checked = value;
|
||||||
x.checked = value;
|
} else if (elm.classList.contains("tags-input")) {
|
||||||
} else if (x.classList.contains("tags-input")) {
|
elm.value = value.join(", ");
|
||||||
x.value = value.join(", ");
|
elm.oninput();
|
||||||
x.oninput();
|
} else {
|
||||||
} else {
|
elm.value = value ?? elm.getAttribute("data-default");
|
||||||
x.value = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -185,6 +185,7 @@ dict = {
|
|||||||
cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`,
|
cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`,
|
||||||
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
|
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
|
||||||
cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
|
cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
|
||||||
|
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
|
||||||
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
|
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
|
||||||
cheats_save: `[UNTRANSLATED] Save`,
|
cheats_save: `[UNTRANSLATED] Save`,
|
||||||
cheats_account: `Account`,
|
cheats_account: `Account`,
|
||||||
|
@ -184,6 +184,7 @@ dict = {
|
|||||||
cheats_unlockAllSimarisResearchEntries: `Unlock All Simaris Research Entries`,
|
cheats_unlockAllSimarisResearchEntries: `Unlock All Simaris Research Entries`,
|
||||||
cheats_disableDailyTribute: `Disable Daily Tribute`,
|
cheats_disableDailyTribute: `Disable Daily Tribute`,
|
||||||
cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
|
cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
|
||||||
|
cheats_relicRewardItemCountMultiplier: `Relic Reward Item Count Multiplier`,
|
||||||
cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`,
|
cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`,
|
||||||
cheats_save: `Save`,
|
cheats_save: `Save`,
|
||||||
cheats_account: `Account`,
|
cheats_account: `Account`,
|
||||||
|
@ -185,6 +185,7 @@ dict = {
|
|||||||
cheats_unlockAllSimarisResearchEntries: `Desbloquear todas las entradas de investigación de Simaris`,
|
cheats_unlockAllSimarisResearchEntries: `Desbloquear todas las entradas de investigación de Simaris`,
|
||||||
cheats_disableDailyTribute: `Desactivar tributo diario`,
|
cheats_disableDailyTribute: `Desactivar tributo diario`,
|
||||||
cheats_spoofMasteryRank: `Rango de maestría simulado (-1 para desactivar)`,
|
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_nightwaveStandingMultiplier: `Multiplicador de Reputación de Onda Nocturna`,
|
||||||
cheats_save: `Guardar`,
|
cheats_save: `Guardar`,
|
||||||
cheats_account: `Cuenta`,
|
cheats_account: `Cuenta`,
|
||||||
|
@ -185,6 +185,7 @@ dict = {
|
|||||||
cheats_unlockAllSimarisResearchEntries: `Débloquer toute les recherches chez Simaris`,
|
cheats_unlockAllSimarisResearchEntries: `Débloquer toute les recherches chez Simaris`,
|
||||||
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
|
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
|
||||||
cheats_spoofMasteryRank: `Rang de maîtrise personnalisé (-1 pour désactiver)`,
|
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_nightwaveStandingMultiplier: `Multiplicateur de réputation d'Ondes Nocturnes`,
|
||||||
cheats_save: `Sauvegarder`,
|
cheats_save: `Sauvegarder`,
|
||||||
cheats_account: `Compte`,
|
cheats_account: `Compte`,
|
||||||
|
@ -185,6 +185,7 @@ dict = {
|
|||||||
cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`,
|
cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`,
|
||||||
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
|
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
|
||||||
cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,
|
cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,
|
||||||
|
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
|
||||||
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
|
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
|
||||||
cheats_save: `[UNTRANSLATED] Save`,
|
cheats_save: `[UNTRANSLATED] Save`,
|
||||||
cheats_account: `Аккаунт`,
|
cheats_account: `Аккаунт`,
|
||||||
|
@ -185,6 +185,7 @@ dict = {
|
|||||||
cheats_unlockAllSimarisResearchEntries: `解锁所有Simaris研究条目`,
|
cheats_unlockAllSimarisResearchEntries: `解锁所有Simaris研究条目`,
|
||||||
cheats_disableDailyTribute: `禁用每日登录奖励`,
|
cheats_disableDailyTribute: `禁用每日登录奖励`,
|
||||||
cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
|
cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
|
||||||
|
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
|
||||||
cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
|
cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
|
||||||
cheats_save: `保存`,
|
cheats_save: `保存`,
|
||||||
cheats_account: `账户`,
|
cheats_account: `账户`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user