forked from OpenWF/SpaceNinjaServer
		
	feat: noKimCooldowns cheat (#1605)
Closes #1537 Reviewed-on: OpenWF/SpaceNinjaServer#1605 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									729ea0abff
								
							
						
					
					
						commit
						d281e929ae
					
				
							
								
								
									
										3
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -15,11 +15,12 @@ jobs:
 | 
			
		||||
            - run: npm run verify
 | 
			
		||||
            - run: npm run lint:ci
 | 
			
		||||
            - run: npm run prettier
 | 
			
		||||
            - run: npm run update-translations
 | 
			
		||||
            - name: Fail if there are uncommitted changes
 | 
			
		||||
              run: |
 | 
			
		||||
                  if [[ -n "$(git status --porcelain)" ]]; then
 | 
			
		||||
                    echo "Uncommitted changes detected:"
 | 
			
		||||
                    git status
 | 
			
		||||
                    git diff
 | 
			
		||||
                    git --no-pager diff
 | 
			
		||||
                    exit 1
 | 
			
		||||
                  fi
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,7 @@
 | 
			
		||||
  "noArgonCrystalDecay": false,
 | 
			
		||||
  "noMasteryRankUpCooldown": false,
 | 
			
		||||
  "noVendorPurchaseLimits": true,
 | 
			
		||||
  "noKimCooldowns": false,
 | 
			
		||||
  "instantResourceExtractorDrones": false,
 | 
			
		||||
  "noDojoRoomBuildStage": false,
 | 
			
		||||
  "noDecoBuildStage": false,
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,5 @@
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { addEmailItem, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { ICompletedDialogue, IDialogueDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
@ -24,7 +25,9 @@ export const saveDialogueController: RequestHandler = async (req, res) => {
 | 
			
		||||
            throw new Error("bad inventory state");
 | 
			
		||||
        }
 | 
			
		||||
        const inventoryChanges: IInventoryChanges = {};
 | 
			
		||||
        const tomorrowAt0Utc = (Math.trunc(Date.now() / 86400_000) + 1) * 86400_000;
 | 
			
		||||
        const tomorrowAt0Utc = config.noKimCooldowns
 | 
			
		||||
            ? Date.now()
 | 
			
		||||
            : (Math.trunc(Date.now() / 86400_000) + 1) * 86400_000;
 | 
			
		||||
        inventory.DialogueHistory.Dialogues ??= [];
 | 
			
		||||
        const dialogue = getDialogue(inventory, request.DialogueName);
 | 
			
		||||
        dialogue.Rank = request.Rank;
 | 
			
		||||
 | 
			
		||||
@ -38,6 +38,7 @@ interface IConfig {
 | 
			
		||||
    noArgonCrystalDecay?: boolean;
 | 
			
		||||
    noMasteryRankUpCooldown?: boolean;
 | 
			
		||||
    noVendorPurchaseLimits?: boolean;
 | 
			
		||||
    noKimCooldowns?: boolean;
 | 
			
		||||
    instantResourceExtractorDrones?: boolean;
 | 
			
		||||
    noDojoRoomBuildStage?: boolean;
 | 
			
		||||
    noDojoDecoBuildStage?: boolean;
 | 
			
		||||
 | 
			
		||||
@ -607,6 +607,10 @@
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="noVendorPurchaseLimits" />
 | 
			
		||||
                                        <label class="form-check-label" for="noVendorPurchaseLimits" data-loc="cheats_noVendorPurchaseLimits"></label>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                    <div class="form-check">
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="noKimCooldowns" />
 | 
			
		||||
                                        <label class="form-check-label" for="noKimCooldowns" data-loc="cheats_noKimCooldowns"></label>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                    <div class="form-check">
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="instantResourceExtractorDrones" />
 | 
			
		||||
                                        <label class="form-check-label" for="instantResourceExtractorDrones" data-loc="cheats_instantResourceExtractorDrones"></label>
 | 
			
		||||
 | 
			
		||||
@ -137,6 +137,7 @@ dict = {
 | 
			
		||||
    cheats_noArgonCrystalDecay: `Argon-Kristalle verschwinden niemals`,
 | 
			
		||||
    cheats_noMasteryRankUpCooldown: `Keine Wartezeit beim Meisterschaftsrangaufstieg`,
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`,
 | 
			
		||||
    cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
 | 
			
		||||
    cheats_noDojoRoomBuildStage: `Kein Dojo-Raum-Bauvorgang`,
 | 
			
		||||
    cheats_noDojoDecoBuildStage: `Kein Dojo-Deko-Bauvorgang`,
 | 
			
		||||
 | 
			
		||||
@ -136,6 +136,7 @@ dict = {
 | 
			
		||||
    cheats_noArgonCrystalDecay: `No Argon Crystal Decay`,
 | 
			
		||||
    cheats_noMasteryRankUpCooldown: `No Mastery Rank Up Cooldown`,
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`,
 | 
			
		||||
    cheats_noKimCooldowns: `No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`,
 | 
			
		||||
    cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
 | 
			
		||||
    cheats_noDojoDecoBuildStage: `No Dojo Deco Build Stage`,
 | 
			
		||||
 | 
			
		||||
@ -137,6 +137,7 @@ dict = {
 | 
			
		||||
    cheats_noArgonCrystalDecay: `Sin descomposición de cristal de Argón`,
 | 
			
		||||
    cheats_noMasteryRankUpCooldown: `Sin tiempo de espera para rango de maestría`,
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `Sin límite de compras de vendedores`,
 | 
			
		||||
    cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Drones de extracción de recursos instantáneos`,
 | 
			
		||||
    cheats_noDojoRoomBuildStage: `Sin etapa de construcción de sala del dojo`,
 | 
			
		||||
    cheats_noDojoDecoBuildStage: `Sin etapa de construcción de decoraciones del dojo`,
 | 
			
		||||
 | 
			
		||||
@ -137,6 +137,7 @@ dict = {
 | 
			
		||||
    cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
 | 
			
		||||
    cheats_noMasteryRankUpCooldown: `[UNTRANSLATED] No Mastery Rank Up Cooldown`,
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
 | 
			
		||||
    cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Ressources de drone d'extraction instantannées`,
 | 
			
		||||
    cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
 | 
			
		||||
    cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,
 | 
			
		||||
 | 
			
		||||
@ -137,6 +137,7 @@ dict = {
 | 
			
		||||
    cheats_noArgonCrystalDecay: `Без распада аргоновых кристаллов`,
 | 
			
		||||
    cheats_noMasteryRankUpCooldown: `Повышение ранга мастерства без кулдауна`,
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `Отсутствие лимитов на покупки у вендоров`,
 | 
			
		||||
    cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`,
 | 
			
		||||
    cheats_noDojoRoomBuildStage: `Мгновенное Строительтво Комнат Додзё`,
 | 
			
		||||
    cheats_noDojoDecoBuildStage: `Мгновенное Строительтво Декораций Додзё`,
 | 
			
		||||
 | 
			
		||||
@ -137,6 +137,7 @@ dict = {
 | 
			
		||||
    cheats_noArgonCrystalDecay: `[UNTRANSLATED] No Argon Crystal Decay`,
 | 
			
		||||
    cheats_noMasteryRankUpCooldown: `[UNTRANSLATED] No Mastery Rank Up Cooldown`,
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
 | 
			
		||||
    cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `即时资源采集无人机`,
 | 
			
		||||
    cheats_noDojoRoomBuildStage: `无视道场房间建造阶段`,
 | 
			
		||||
    cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user