返回提交历史
Modified
config.json.example
+1
-0
Modified
src/helpers/relicHelper.ts
+8
-1
Modified
src/services/configService.ts
+1
-0
Modified
static/webui/index.html
+10
-3
Modified
static/webui/script.js
+8
-10
Modified
static/webui/translations/de.js
+1
-0
Modified
static/webui/translations/en.js
+1
-0
Modified
static/webui/translations/es.js
+1
-0
Modified
static/webui/translations/fr.js
+1
-0
Modified
static/webui/translations/ru.js
+1
-0
Modified
static/webui/translations/zh.js
+1
-0
XFEstudio/SpaceNinjaServer
feat: relicRewardItemCountMultiplier cheat (#2369)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2369 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
75832afd
代码差异
11 个文件
+34
-14
@@ -60,6 +60,7 @@
60
60
"unlockAllSimarisResearchEntries": false,
61
61
"disableDailyTribute": false,
62
62
"spoofMasteryRank": -1,
63
"relicRewardItemCountMultiplier": 1,
63
64
"nightwaveStandingMultiplier": 1,
64
65
"unfaithfulBugFixes": {
65
66
"ignore1999LastRegionPlayed": false,
@@ -6,6 +6,7 @@ import { logger } from "@/src/utils/logger";
6
6
import { addMiscItems, combineInventoryChanges } from "@/src/services/inventoryService";
7
7
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
8
8
import { IInventoryChanges } from "../types/purchaseTypes";
9
import { config } from "../services/configService";
9
10
10
11
export const crackRelic = async (
11
12
inventory: TInventoryDatabaseDocument,
@@ -35,7 +36,13 @@ export const crackRelic = async (
35
36
// Give reward
36
37
combineInventoryChanges(
37
38
inventoryChanges,
38
(await handleStoreItemAcquisition(reward.type, inventory, reward.itemCount)).InventoryChanges
39
(
40
await handleStoreItemAcquisition(
41
reward.type,
42
inventory,
43
reward.itemCount * (config.relicRewardItemCountMultiplier ?? 1)
44
)
45
).InventoryChanges
39
46
);
40
47
41
48
return reward;
@@ -67,6 +67,7 @@ export interface IConfig {
67
67
unlockAllSimarisResearchEntries?: boolean;
68
68
disableDailyTribute?: boolean;
69
69
spoofMasteryRank?: number;
70
relicRewardItemCountMultiplier?: number;
70
71
nightwaveStandingMultiplier?: number;
71
72
unfaithfulBugFixes?: {
72
73
ignore1999LastRegionPlayed?: boolean;
@@ -788,14 +788,21 @@
788
788
<form class="form-group mt-2" onsubmit="doSaveConfigInt('spoofMasteryRank'); return false;">
789
789
<label class="form-label" for="spoofMasteryRank" data-loc="cheats_spoofMasteryRank"></label>
790
790
<div class="input-group">
791
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" max="65535" />
791
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" max="65535" data-default="-1" />
792
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
793
</div>
794
</form>
795
<form class="form-group mt-2" onsubmit="doSaveConfigInt('relicRewardItemCountMultiplier'); return false;">
796
<label class="form-label" for="relicRewardItemCountMultiplier" data-loc="cheats_relicRewardItemCountMultiplier"></label>
797
<div class="input-group">
798
<input class="form-control" id="relicRewardItemCountMultiplier" type="number" min="1" max="1000000" data-default="1" />
792
799
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
793
800
</div>
794
801
</form>
795
802
<form class="form-group mt-2" onsubmit="doSaveConfigInt('nightwaveStandingMultiplier'); return false;">
796
803
<label class="form-label" for="nightwaveStandingMultiplier" data-loc="cheats_nightwaveStandingMultiplier"></label>
797
804
<div class="input-group">
798
<input class="form-control" id="nightwaveStandingMultiplier" type="number" min="1" max="1000000" value="1" />
805
<input class="form-control" id="nightwaveStandingMultiplier" type="number" min="1" max="1000000" data-default="1" />
799
806
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
800
807
</div>
801
808
</form>
@@ -919,7 +926,7 @@
919
926
<form class="form-group mt-2" onsubmit="doSaveConfigFloat('worldState.darvoStockMultiplier'); return false;">
920
927
<label class="form-label" for="worldState.circuitGameModes" data-loc="worldState_darvoStockMultiplier"></label>
921
928
<div class="input-group">
922
<input id="worldState.darvoStockMultiplier" class="form-control" type="number" step="0.01" placeholder="1" />
929
<input id="worldState.darvoStockMultiplier" class="form-control" type="number" step="0.01" data-default="1" />
923
930
<button class="btn btn-primary" type="submit" data-loc="cheats_save"></button>
924
931
</div>
925
932
</form>
@@ -1984,16 +1984,14 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
1984
1984
$(".config-admin-show").removeClass("d-none");
1985
1985
Object.entries(json).forEach(entry => {
1986
1986
const [key, value] = entry;
1987
var x = document.getElementById(`${key}`);
1988
if (x != null) {
1989
if (x.type == "checkbox") {
1990
x.checked = value;
1991
} else if (x.classList.contains("tags-input")) {
1992
x.value = value.join(", ");
1993
x.oninput();
1994
} else {
1995
x.value = value;
1996
}
1987
const elm = document.getElementById(key);
1988
if (elm.type == "checkbox") {
1989
elm.checked = value;
1990
} else if (elm.classList.contains("tags-input")) {
1991
elm.value = value.join(", ");
1992
elm.oninput();
1993
} else {
1994
elm.value = value ?? elm.getAttribute("data-default");
1997
1995
}
1998
1996
});
1999
1997
})
@@ -185,6 +185,7 @@ dict = {
185
185
cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`,
186
186
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
187
187
cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
188
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
188
189
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
189
190
cheats_save: `[UNTRANSLATED] Save`,
190
191
cheats_account: `Account`,
@@ -184,6 +184,7 @@ dict = {
184
184
cheats_unlockAllSimarisResearchEntries: `Unlock All Simaris Research Entries`,
185
185
cheats_disableDailyTribute: `Disable Daily Tribute`,
186
186
cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
187
cheats_relicRewardItemCountMultiplier: `Relic Reward Item Count Multiplier`,
187
188
cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`,
188
189
cheats_save: `Save`,
189
190
cheats_account: `Account`,
@@ -185,6 +185,7 @@ dict = {
185
185
cheats_unlockAllSimarisResearchEntries: `Desbloquear todas las entradas de investigación de Simaris`,
186
186
cheats_disableDailyTribute: `Desactivar tributo diario`,
187
187
cheats_spoofMasteryRank: `Rango de maestría simulado (-1 para desactivar)`,
188
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
188
189
cheats_nightwaveStandingMultiplier: `Multiplicador de Reputación de Onda Nocturna`,
189
190
cheats_save: `Guardar`,
190
191
cheats_account: `Cuenta`,
@@ -185,6 +185,7 @@ dict = {
185
185
cheats_unlockAllSimarisResearchEntries: `Débloquer toute les recherches chez Simaris`,
186
186
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
187
187
cheats_spoofMasteryRank: `Rang de maîtrise personnalisé (-1 pour désactiver)`,
188
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
188
189
cheats_nightwaveStandingMultiplier: `Multiplicateur de réputation d'Ondes Nocturnes`,
189
190
cheats_save: `Sauvegarder`,
190
191
cheats_account: `Compte`,
@@ -185,6 +185,7 @@ dict = {
185
185
cheats_unlockAllSimarisResearchEntries: `[UNTRANSLATED] Unlock All Simaris Research Entries`,
186
186
cheats_disableDailyTribute: `[UNTRANSLATED] Disable Daily Tribute`,
187
187
cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,
188
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
188
189
cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
189
190
cheats_save: `[UNTRANSLATED] Save`,
190
191
cheats_account: `Аккаунт`,
@@ -185,6 +185,7 @@ dict = {
185
185
cheats_unlockAllSimarisResearchEntries: `解锁所有Simaris研究条目`,
186
186
cheats_disableDailyTribute: `禁用每日登录奖励`,
187
187
cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
188
cheats_relicRewardItemCountMultiplier: `[UNTRANSLATED] Relic Reward Item Count Multiplier`,
188
189
cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
189
190
cheats_save: `保存`,
190
191
cheats_account: `账户`,