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: noKimCooldowns cheat (#1605)

Closes #1537 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1605 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

d281e929
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

11 个文件 +18 -2
Modified .github/workflows/build.yml +2 -1
@@ -15,11 +15,12 @@ jobs:
15 15 - run: npm run verify
16 16 - run: npm run lint:ci
17 17 - run: npm run prettier
18 - run: npm run update-translations
18 19 - name: Fail if there are uncommitted changes
19 20 run: |
20 21 if [[ -n "$(git status --porcelain)" ]]; then
21 22 echo "Uncommitted changes detected:"
22 23 git status
23 git diff
24 git --no-pager diff
24 25 exit 1
25 26 fi
Modified config.json.example +1 -0
@@ -32,6 +32,7 @@
32 32 "noArgonCrystalDecay": false,
33 33 "noMasteryRankUpCooldown": false,
34 34 "noVendorPurchaseLimits": true,
35 "noKimCooldowns": false,
35 36 "instantResourceExtractorDrones": false,
36 37 "noDojoRoomBuildStage": false,
37 38 "noDecoBuildStage": false,
Modified src/controllers/api/saveDialogueController.ts +4 -1
@@ -1,4 +1,5 @@
1 1 import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
2 import { config } from "@/src/services/configService";
2 3 import { addEmailItem, getInventory, updateCurrency } from "@/src/services/inventoryService";
3 4 import { getAccountIdForRequest } from "@/src/services/loginService";
4 5 import { ICompletedDialogue, IDialogueDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
@@ -24,7 +25,9 @@ export const saveDialogueController: RequestHandler = async (req, res) => {
24 25 throw new Error("bad inventory state");
25 26 }
26 27 const inventoryChanges: IInventoryChanges = {};
27 const tomorrowAt0Utc = (Math.trunc(Date.now() / 86400_000) + 1) * 86400_000;
28 const tomorrowAt0Utc = config.noKimCooldowns
29 ? Date.now()
30 : (Math.trunc(Date.now() / 86400_000) + 1) * 86400_000;
28 31 inventory.DialogueHistory.Dialogues ??= [];
29 32 const dialogue = getDialogue(inventory, request.DialogueName);
30 33 dialogue.Rank = request.Rank;
Modified src/services/configService.ts +1 -0
@@ -38,6 +38,7 @@ interface IConfig {
38 38 noArgonCrystalDecay?: boolean;
39 39 noMasteryRankUpCooldown?: boolean;
40 40 noVendorPurchaseLimits?: boolean;
41 noKimCooldowns?: boolean;
41 42 instantResourceExtractorDrones?: boolean;
42 43 noDojoRoomBuildStage?: boolean;
43 44 noDojoDecoBuildStage?: boolean;
Modified static/webui/index.html +4 -0
@@ -607,6 +607,10 @@
607 607 <input class="form-check-input" type="checkbox" id="noVendorPurchaseLimits" />
608 608 <label class="form-check-label" for="noVendorPurchaseLimits" data-loc="cheats_noVendorPurchaseLimits"></label>
609 609 </div>
610 <div class="form-check">
611 <input class="form-check-input" type="checkbox" id="noKimCooldowns" />
612 <label class="form-check-label" for="noKimCooldowns" data-loc="cheats_noKimCooldowns"></label>
613 </div>
610 614 <div class="form-check">
611 615 <input class="form-check-input" type="checkbox" id="instantResourceExtractorDrones" />
612 616 <label class="form-check-label" for="instantResourceExtractorDrones" data-loc="cheats_instantResourceExtractorDrones"></label>
Modified static/webui/translations/de.js +1 -0
@@ -137,6 +137,7 @@ dict = {
137 137 cheats_noArgonCrystalDecay: `Argon-Kristalle verschwinden niemals`,
138 138 cheats_noMasteryRankUpCooldown: `Keine Wartezeit beim Meisterschaftsrangaufstieg`,
139 139 cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`,
140 cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
140 141 cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
141 142 cheats_noDojoRoomBuildStage: `Kein Dojo-Raum-Bauvorgang`,
142 143 cheats_noDojoDecoBuildStage: `Kein Dojo-Deko-Bauvorgang`,
Modified static/webui/translations/en.js +1 -0
@@ -136,6 +136,7 @@ dict = {
136 136 cheats_noArgonCrystalDecay: `No Argon Crystal Decay`,
137 137 cheats_noMasteryRankUpCooldown: `No Mastery Rank Up Cooldown`,
138 138 cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`,
139 cheats_noKimCooldowns: `No KIM Cooldowns`,
139 140 cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`,
140 141 cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
141 142 cheats_noDojoDecoBuildStage: `No Dojo Deco Build Stage`,
Modified static/webui/translations/es.js +1 -0
@@ -137,6 +137,7 @@ dict = {
137 137 cheats_noArgonCrystalDecay: `Sin descomposición de cristal de Argón`,
138 138 cheats_noMasteryRankUpCooldown: `Sin tiempo de espera para rango de maestría`,
139 139 cheats_noVendorPurchaseLimits: `Sin límite de compras de vendedores`,
140 cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
140 141 cheats_instantResourceExtractorDrones: `Drones de extracción de recursos instantáneos`,
141 142 cheats_noDojoRoomBuildStage: `Sin etapa de construcción de sala del dojo`,
142 143 cheats_noDojoDecoBuildStage: `Sin etapa de construcción de decoraciones del dojo`,
Modified static/webui/translations/fr.js +1 -0
@@ -137,6 +137,7 @@ dict = {
137 137 cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
138 138 cheats_noMasteryRankUpCooldown: `[UNTRANSLATED] No Mastery Rank Up Cooldown`,
139 139 cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
140 cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
140 141 cheats_instantResourceExtractorDrones: `Ressources de drone d'extraction instantannées`,
141 142 cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
142 143 cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,
Modified static/webui/translations/ru.js +1 -0
@@ -137,6 +137,7 @@ dict = {
137 137 cheats_noArgonCrystalDecay: `Без распада аргоновых кристаллов`,
138 138 cheats_noMasteryRankUpCooldown: `Повышение ранга мастерства без кулдауна`,
139 139 cheats_noVendorPurchaseLimits: `Отсутствие лимитов на покупки у вендоров`,
140 cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
140 141 cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`,
141 142 cheats_noDojoRoomBuildStage: `Мгновенное Строительтво Комнат Додзё`,
142 143 cheats_noDojoDecoBuildStage: `Мгновенное Строительтво Декораций Додзё`,
Modified static/webui/translations/zh.js +1 -0
@@ -137,6 +137,7 @@ dict = {
137 137 cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
138 138 cheats_noMasteryRankUpCooldown: `[UNTRANSLATED] No Mastery Rank Up Cooldown`,
139 139 cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
140 cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
140 141 cheats_instantResourceExtractorDrones: `即时资源采集无人机`,
141 142 cheats_noDojoRoomBuildStage: `无视道场房间建造阶段`,
142 143 cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,