返回提交历史
Modified
config.json.example
+3
-0
Modified
src/controllers/api/inventoryController.ts
+34
-1
Modified
src/services/configService.ts
+3
-0
Modified
static/webui/index.html
+18
-0
Modified
static/webui/script.js
+1
-20
XFEstudio/SpaceNinjaServer
feat: add potatoes, exilus, & arcanes everywhere cheats (#774)
d73d14bc
代码差异
5 个文件
+59
-21
@@ -25,5 +25,8 @@
25
25
"unlockAllSkins": true,
26
26
"unlockAllCapturaScenes": true,
27
27
"universalPolarityEverywhere": true,
28
"unlockDoubleCapacityPotatoesEverywhere": true,
29
"unlockExilusEverywhere": true,
30
"unlockArcanesEverywhere": true,
28
31
"spoofMasteryRank": -1
29
32
}
@@ -5,7 +5,7 @@ import { config } from "@/src/services/configService";
5
5
import allDialogue from "@/static/fixed_responses/allDialogue.json";
6
6
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
7
7
import { IInventoryResponse, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
8
import { IPolarity, ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
8
import { IPolarity, ArtifactPolarity, EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
9
9
import {
10
10
ExportCustoms,
11
11
ExportFlavour,
@@ -211,6 +211,39 @@ export const inventoryController: RequestHandler = async (request, response) =>
211
211
}
212
212
}
213
213
214
if (config.unlockDoubleCapacityPotatoesEverywhere) {
215
for (const key of equipmentKeys) {
216
if (key in inventoryResponse) {
217
for (const equipment of inventoryResponse[key]) {
218
equipment.Features ??= 0;
219
equipment.Features |= EquipmentFeatures.DOUBLE_CAPACITY;
220
}
221
}
222
}
223
}
224
225
if (config.unlockExilusEverywhere) {
226
for (const key of equipmentKeys) {
227
if (key in inventoryResponse) {
228
for (const equipment of inventoryResponse[key]) {
229
equipment.Features ??= 0;
230
equipment.Features |= EquipmentFeatures.UTILITY_SLOT;
231
}
232
}
233
}
234
}
235
236
if (config.unlockArcanesEverywhere) {
237
for (const key of equipmentKeys) {
238
if (key in inventoryResponse) {
239
for (const equipment of inventoryResponse[key]) {
240
equipment.Features ??= 0;
241
equipment.Features |= EquipmentFeatures.ARCANE_SLOT;
242
}
243
}
244
}
245
}
246
214
247
// Fix for #380
215
248
inventoryResponse.NextRefill = { $date: { $numberLong: "9999999999999" } };
216
249
@@ -51,6 +51,9 @@ interface IConfig {
51
51
unlockAllSkins?: boolean;
52
52
unlockAllCapturaScenes?: boolean;
53
53
universalPolarityEverywhere?: boolean;
54
unlockDoubleCapacityPotatoesEverywhere?: boolean;
55
unlockExilusEverywhere?: boolean;
56
unlockArcanesEverywhere?: boolean;
54
57
spoofMasteryRank?: number;
55
58
}
56
59
@@ -278,6 +278,24 @@
278
278
Universal Polarity Everywhere
279
279
</label>
280
280
</div>
281
<div class="form-check">
282
<input class="form-check-input" type="checkbox" id="unlockDoubleCapacityPotatoesEverywhere" />
283
<label class="form-check-label" for="unlockDoubleCapacityPotatoesEverywhere">
284
Potatoes Everywhere
285
</label>
286
</div>
287
<div class="form-check">
288
<input class="form-check-input" type="checkbox" id="unlockExilusEverywhere" />
289
<label class="form-check-label" for="unlockExilusEverywhere">
290
Exilus Adapters Everywhere
291
</label>
292
</div>
293
<div class="form-check">
294
<input class="form-check-input" type="checkbox" id="unlockArcanesEverywhere" />
295
<label class="form-check-label" for="unlockArcanesEverywhere">
296
Arcane Adapters Everywhere
297
</label>
298
</div>
281
299
<div class="form-group mt-2">
282
300
<label class="form-label" for="spoofMasteryRank">
283
301
Spoofed Mastery Rank (-1 to disable)
@@ -846,26 +846,7 @@ $("#mod-to-acquire").on("input", () => {
846
846
$("#mod-to-acquire").removeClass("is-invalid");
847
847
});
848
848
849
const uiConfigs = [
850
"autoCreateAccount",
851
"skipTutorial",
852
"skipAllDialogue",
853
"unlockAllScans",
854
"unlockAllMissions",
855
"unlockAllQuests",
856
"completeAllQuests",
857
"infiniteCredits",
858
"infinitePlatinum",
859
"infiniteEndo",
860
"infiniteRegalAya",
861
"unlockAllShipFeatures",
862
"unlockAllShipDecorations",
863
"unlockAllFlavourItems",
864
"unlockAllSkins",
865
"unlockAllCapturaScenes",
866
"universalPolarityEverywhere",
867
"spoofMasteryRank"
868
];
849
const uiConfigs = [...$("#server-settings input[id]")].map(x => x.id);
869
850
870
851
function doChangeSettings() {
871
852
fetch("/custom/config?" + window.authz)