返回提交历史
Modified
src/controllers/api/giftingController.ts
+6
-4
Modified
src/controllers/api/inventoryController.ts
+3
-0
Modified
src/controllers/custom/setAccountCheatController.ts
+1
-0
Modified
src/models/inventoryModels/inventoryModel.ts
+6
-5
Modified
src/types/inventoryTypes/inventoryTypes.ts
+1
-0
Modified
static/webui/index.html
+4
-0
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/uk.js
+1
-0
Modified
static/webui/translations/zh.js
+1
-0
XFEstudio/XFESpaceNinjaServer
feat: infiniteGifts cheat (#3700)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3700 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: Animan8000 <187183497+Veniman8000@users.noreply.github.com> Co-committed-by: Animan8000 <187183497+Veniman8000@users.noreply.github.com>
987a81ec
代码差异
13 个文件
+28
-9
@@ -77,11 +77,13 @@ export const giftingController: RequestHandler = async (req, res) => {
77
77
78
78
const senderInventory = await getInventory(senderAccount._id);
79
79
80
if (senderInventory.GiftsRemaining == 0) {
81
res.status(400).send("10").end();
82
return;
80
if (!senderInventory.infiniteGifts) {
81
if (senderInventory.GiftsRemaining == 0) {
82
res.status(400).send("10").end();
83
return;
84
}
85
senderInventory.GiftsRemaining -= 1;
83
86
}
84
senderInventory.GiftsRemaining -= 1;
85
87
86
88
const response: IPurchaseResponse = {
87
89
InventoryChanges: {}
@@ -374,6 +374,9 @@ export const getInventoryResponse = async (
374
374
if (inventory.infiniteTrades) {
375
375
inventoryResponse.TradesRemaining = 9999;
376
376
}
377
if (inventory.infiniteGifts) {
378
inventoryResponse.GiftsRemaining = 9999;
379
}
377
380
378
381
if (inventory.skipAllDialogue) {
379
382
inventoryResponse.TauntHistory ??= [];
@@ -55,6 +55,7 @@ export const setAccountCheatController: RequestHandler = async (req, res) => {
55
55
"infiniteEndo",
56
56
"infiniteRegalAya",
57
57
"infiniteTrades",
58
"infiniteGifts",
58
59
"skipAllDialogue",
59
60
"skipAllPopups"
60
61
].indexOf(payload.key) != -1
@@ -1566,6 +1566,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
1566
1566
infiniteEndo: Boolean,
1567
1567
infiniteRegalAya: Boolean,
1568
1568
infiniteTrades: Boolean,
1569
infiniteGifts: Boolean,
1569
1570
infiniteHelminthMaterials: Boolean,
1570
1571
universalPolarityEverywhere: Boolean,
1571
1572
unlockDoubleCapacityPotatoesEverywhere: Boolean,
@@ -1645,18 +1646,18 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
1645
1646
1646
1647
//How many trades do you have left
1647
1648
TradesRemaining: { type: Number, default: 0 },
1648
//How many Gift do you have left*(gift spends the trade)
1649
//How many gifts do you have left
1649
1650
GiftsRemaining: { type: Number, default: 8 },
1650
//Curent trade info Giving or Getting items
1651
//Current trade info Giving or Getting items
1651
1652
//PendingTrades: [Schema.Types.Mixed],
1652
1653
1653
1654
//Syndicate currently being pledged to.
1654
1655
SupportedSyndicate: String,
1655
//Curent Syndicates rank\exp
1656
//Current Syndicates rank\exp
1656
1657
Affiliations: [affiliationsSchema],
1657
//Syndicates Missions complate(Navigation->Syndicate)
1658
//Syndicates Missions completed(Navigation->Syndicate)
1658
1659
CompletedSyndicates: [String],
1659
//Daily Syndicates Exp
1660
//Daily Syndicates exp
1660
1661
DailyAffiliation: { type: Number, default: 16000 },
1661
1662
DailyAffiliationPvp: { type: Number, default: 16000 },
1662
1663
DailyAffiliationLibrary: { type: Number, default: 16000 },
@@ -51,6 +51,7 @@ export const accountCheatBooleans = [
51
51
"infiniteEndo",
52
52
"infiniteRegalAya",
53
53
"infiniteTrades",
54
"infiniteGifts",
54
55
"infiniteHelminthMaterials",
55
56
"universalPolarityEverywhere",
56
57
"unlockDoubleCapacityPotatoesEverywhere",
@@ -985,6 +985,10 @@
985
985
<input class="form-check-input" type="checkbox" id="infiniteTrades" />
986
986
<label class="form-check-label" for="infiniteTrades" data-loc="cheats_infiniteTrades"></label>
987
987
</div>
988
<div class="form-check">
989
<input class="form-check-input" type="checkbox" id="infiniteGifts" />
990
<label class="form-check-label" for="infiniteGifts" data-loc="cheats_infiniteGifts"></label>
991
</div>
988
992
<div class="form-check">
989
993
<input class="form-check-input" type="checkbox" id="infiniteHelminthMaterials" />
990
994
<label class="form-check-label" for="infiniteHelminthMaterials" data-loc="cheats_infiniteHelminthMaterials"></label>
@@ -242,6 +242,7 @@ dict = {
242
242
cheats_infiniteEndo: `Unendlich Endo`,
243
243
cheats_infiniteRegalAya: `Unendlich Reines Aya`,
244
244
cheats_infiniteTrades: `Unendlich handeln`,
245
cheats_infiniteGifts: `Unendlich schenken`,
245
246
cheats_infiniteHelminthMaterials: `Unendlich Helminth-Materialien`,
246
247
cheats_claimingBlueprintRefundsIngredients: `Fertige Blaupausen erstatten Ressourcen zurück`,
247
248
cheats_dontSubtractPurchaseCreditCost: `Credits beim Kauf nicht verbrauchen`,
@@ -241,6 +241,7 @@ dict = {
241
241
cheats_infiniteEndo: `Infinite Endo`,
242
242
cheats_infiniteRegalAya: `Infinite Regal Aya`,
243
243
cheats_infiniteTrades: `Infinite Trades`,
244
cheats_infiniteGifts: `Infinite Gifts`,
244
245
cheats_infiniteHelminthMaterials: `Infinite Helminth Materials`,
245
246
cheats_claimingBlueprintRefundsIngredients: `Claiming Blueprint Refunds Ingredients`,
246
247
cheats_dontSubtractPurchaseCreditCost: `Don't Subtract Purchase Credit Cost`,
@@ -242,6 +242,7 @@ dict = {
242
242
cheats_infiniteEndo: `Endo infinito`,
243
243
cheats_infiniteRegalAya: `Aya Real infinita`,
244
244
cheats_infiniteTrades: `[UNTRANSLATED] Infinite Trades`,
245
cheats_infiniteGifts: `[UNTRANSLATED] Infinite Gifts`,
245
246
cheats_infiniteHelminthMaterials: `Materiales Helminto infinitos`,
246
247
cheats_claimingBlueprintRefundsIngredients: `Reclamar planos devuelve los ingredientes`,
247
248
cheats_dontSubtractPurchaseCreditCost: `No restar costo en créditos al comprar`,
@@ -242,6 +242,7 @@ dict = {
242
242
cheats_infiniteEndo: `Endo infini`,
243
243
cheats_infiniteRegalAya: `Aya Raffiné infini`,
244
244
cheats_infiniteTrades: `Échanges infinis`,
245
cheats_infiniteGifts: `[UNTRANSLATED] Infinite Gifts`,
245
246
cheats_infiniteHelminthMaterials: `Ressources d'Helminth infinies`,
246
247
cheats_claimingBlueprintRefundsIngredients: `Récupérer les items rend les ressources`,
247
248
cheats_dontSubtractPurchaseCreditCost: `Ne pas retirer le coût en crédits`,
@@ -242,6 +242,7 @@ dict = {
242
242
cheats_infiniteEndo: `Бесконечное Эндо`,
243
243
cheats_infiniteRegalAya: `Бесконечная Королевская Айя`,
244
244
cheats_infiniteTrades: `[UNTRANSLATED] Infinite Trades`,
245
cheats_infiniteGifts: `[UNTRANSLATED] Infinite Gifts`,
245
246
cheats_infiniteHelminthMaterials: `Бесконечные секреции Гельминта`,
246
247
cheats_claimingBlueprintRefundsIngredients: `Возврат ингредиентов чертежей`,
247
248
cheats_dontSubtractPurchaseCreditCost: `Не вычитать стоимость Кредитов при покупке`,
@@ -242,6 +242,7 @@ dict = {
242
242
cheats_infiniteEndo: `Бескінечне Ендо`,
243
243
cheats_infiniteRegalAya: `Бескінечна Королівська Ая`,
244
244
cheats_infiniteTrades: `[UNTRANSLATED] Infinite Trades`,
245
cheats_infiniteGifts: `[UNTRANSLATED] Infinite Gifts`,
245
246
cheats_infiniteHelminthMaterials: `Бескінечні секреції Гельмінта`,
246
247
cheats_claimingBlueprintRefundsIngredients: `Повернення інгредієнтів креслеників`,
247
248
cheats_dontSubtractPurchaseCreditCost: `Не вираховувати вартість Кредитів при купівлі`,