XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

feat: infiniteEndo & infiniteRegalAya (#741)

172db233
Sainan <sainan@calamity.inc>
提交于

代码差异

7 个文件 +28 -3
Modified config.json.example +2 -0
@@ -17,6 +17,8 @@
17 17 "completeAllQuests": true,
18 18 "infiniteCredits": true,
19 19 "infinitePlatinum": true,
20 "infiniteEndo": true,
21 "infiniteRegalAya": true,
20 22 "unlockAllShipFeatures": true,
21 23 "unlockAllShipDecorations": true,
22 24 "unlockAllFlavourItems": true,
Modified src/controllers/api/inventoryController.ts +6 -0
@@ -74,6 +74,12 @@ export const inventoryController: RequestHandler = async (request, response) =>
74 74 inventoryResponse.PremiumCreditsFree = 999999999;
75 75 inventoryResponse.PremiumCredits = 999999999;
76 76 }
77 if (config.infiniteEndo) {
78 inventoryResponse.FusionPoints = 999999999;
79 }
80 if (config.infiniteRegalAya) {
81 inventoryResponse.PrimeTokens = 999999999;
82 }
77 83
78 84 if (config.skipAllDialogue) {
79 85 inventoryResponse.TauntHistory = [
Modified src/services/configService.ts +2 -0
@@ -43,6 +43,8 @@ interface IConfig {
43 43 completeAllQuests?: boolean;
44 44 infiniteCredits?: boolean;
45 45 infinitePlatinum?: boolean;
46 infiniteEndo?: boolean;
47 infiniteRegalAya?: boolean;
46 48 unlockAllShipFeatures?: boolean;
47 49 unlockAllShipDecorations?: boolean;
48 50 unlockAllFlavourItems?: boolean;
Modified src/services/inventoryService.ts +6 -2
@@ -908,8 +908,12 @@ export const upgradeMod = async (artifactsData: IArtifactsRequest, accountId: st
908 908 }
909 909 }
910 910
911 inventory.RegularCredits -= Cost;
912 inventory.FusionPoints -= FusionPointCost;
911 if (!config.infiniteCredits) {
912 inventory.RegularCredits -= Cost;
913 }
914 if (!config.infiniteEndo) {
915 inventory.FusionPoints -= FusionPointCost;
916 }
913 917
914 918 const changedInventory = await inventory.save();
915 919 const itemId = changedInventory.toJSON().Upgrades[itemIndex]?.ItemId?.$oid;
Modified src/services/purchaseService.ts +2 -1
@@ -24,6 +24,7 @@ import {
24 24 ExportVendors,
25 25 TRarity
26 26 } from "warframe-public-export-plus";
27 import { config } from "./configService";
27 28
28 29 export const getStoreItemCategory = (storeItem: string): string => {
29 30 const storeItemString = getSubstringFromKeyword(storeItem, "StoreItems/");
@@ -152,7 +153,7 @@ export const handlePurchase = async (
152 153
153 154 purchaseResponse.InventoryChanges.MiscItems ??= [];
154 155 (purchaseResponse.InventoryChanges.MiscItems as IMiscItem[]).push(invItem);
155 } else {
156 } else if (!config.infiniteRegalAya) {
156 157 inventory.PrimeTokens -= offer.PrimePrice! * purchaseRequest.PurchaseParams.Quantity;
157 158 }
158 159 await inventory.save();
Modified static/webui/index.html +8 -0
@@ -235,6 +235,14 @@
235 235 <input class="form-check-input" type="checkbox" id="infinitePlatinum" />
236 236 <label class="form-check-label" for="infinitePlatinum">Infinite Platinum</label>
237 237 </div>
238 <div class="form-check">
239 <input class="form-check-input" type="checkbox" id="infiniteEndo" />
240 <label class="form-check-label" for="infiniteEndo">Infinite Endo</label>
241 </div>
242 <div class="form-check">
243 <input class="form-check-input" type="checkbox" id="infiniteRegalAya" />
244 <label class="form-check-label" for="infiniteRegalAya">Infinite Regal Aya</label>
245 </div>
238 246 <div class="form-check">
239 247 <input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
240 248 <label class="form-check-label" for="unlockAllShipFeatures">Unlock All Ship Features</label>
Modified static/webui/script.js +2 -0
@@ -804,6 +804,8 @@ const uiConfigs = [
804 804 "completeAllQuests",
805 805 "infiniteCredits",
806 806 "infinitePlatinum",
807 "infiniteEndo",
808 "infiniteRegalAya",
807 809 "unlockAllShipFeatures",
808 810 "unlockAllShipDecorations",
809 811 "unlockAllFlavourItems",