forked from OpenWF/SpaceNinjaServer
		
	feat: instantFinishRivenChallenge cheat (#2087)
Closes #1952 Reviewed-on: OpenWF/SpaceNinjaServer#2087 Co-authored-by: Animan8000 <animan8000@noreply.localhost> Co-committed-by: Animan8000 <animan8000@noreply.localhost>
This commit is contained in:
		
							parent
							
								
									77a3b64f49
								
							
						
					
					
						commit
						727f6837ba
					
				@ -32,6 +32,7 @@ ENV APP_NO_MASTERY_RANK_UP_COOLDOWN=false
 | 
			
		||||
ENV APP_NO_VENDOR_PURCHASE_LIMITS=true
 | 
			
		||||
ENV APP_NO_DEATH_MARKS=false
 | 
			
		||||
ENV APP_NO_KIM_COOLDOWNS=false
 | 
			
		||||
ENV APP_INSTANT_FINISH_RIVEN_CHALLENGE=false
 | 
			
		||||
ENV APP_INSTANT_RESOURCE_EXTRACTOR_DRONES=false
 | 
			
		||||
ENV APP_NO_RESOURCE_EXTRACTOR_DRONES_DAMAGE=false
 | 
			
		||||
ENV APP_SKIP_CLAN_KEY_CRAFTING=false
 | 
			
		||||
 | 
			
		||||
@ -38,6 +38,7 @@
 | 
			
		||||
  "noVendorPurchaseLimits": true,
 | 
			
		||||
  "noDeathMarks": false,
 | 
			
		||||
  "noKimCooldowns": false,
 | 
			
		||||
  "instantFinishRivenChallenge": false,
 | 
			
		||||
  "instantResourceExtractorDrones": false,
 | 
			
		||||
  "noResourceExtractorDronesDamage": false,
 | 
			
		||||
  "skipClanKeyCrafting": false,
 | 
			
		||||
 | 
			
		||||
@ -39,6 +39,7 @@ services:
 | 
			
		||||
            # APP_NO_VENDOR_PURCHASE_LIMITS: true
 | 
			
		||||
            # APP_NO_DEATH_MARKS: false
 | 
			
		||||
            # APP_NO_KIM_COOLDOWNS: false
 | 
			
		||||
            # APP_INSTANT_FINISH_RIVEN_CHALLENGE: false
 | 
			
		||||
            # APP_INSTANT_RESOURCE_EXTRACTOR_DRONES: false
 | 
			
		||||
            # APP_NO_RESOURCE_EXTRACTOR_DRONES_DAMAGE: false
 | 
			
		||||
            # APP_SKIP_CLAN_KEY_CRAFTING: false
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,16 @@
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/helpers/rivenHelper";
 | 
			
		||||
import {
 | 
			
		||||
    createVeiledRivenFingerprint,
 | 
			
		||||
    createUnveiledRivenFingerprint,
 | 
			
		||||
    rivenRawToRealWeighted
 | 
			
		||||
} from "@/src/helpers/rivenHelper";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMods, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getRandomElement } from "@/src/services/rngService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportUpgrades } from "warframe-public-export-plus";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
 | 
			
		||||
export const activateRandomModController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
@ -18,7 +23,9 @@ export const activateRandomModController: RequestHandler = async (req, res) => {
 | 
			
		||||
        }
 | 
			
		||||
    ]);
 | 
			
		||||
    const rivenType = getRandomElement(rivenRawToRealWeighted[request.ItemType])!;
 | 
			
		||||
    const fingerprint = createVeiledRivenFingerprint(ExportUpgrades[rivenType]);
 | 
			
		||||
    const fingerprint = config.instantFinishRivenChallenge
 | 
			
		||||
        ? createUnveiledRivenFingerprint(ExportUpgrades[rivenType])
 | 
			
		||||
        : createVeiledRivenFingerprint(ExportUpgrades[rivenType]);
 | 
			
		||||
    const upgradeIndex =
 | 
			
		||||
        inventory.Upgrades.push({
 | 
			
		||||
            ItemType: rivenType,
 | 
			
		||||
 | 
			
		||||
@ -44,6 +44,7 @@ interface IConfig {
 | 
			
		||||
    noVendorPurchaseLimits?: boolean;
 | 
			
		||||
    noDeathMarks?: boolean;
 | 
			
		||||
    noKimCooldowns?: boolean;
 | 
			
		||||
    instantFinishRivenChallenge?: boolean;
 | 
			
		||||
    instantResourceExtractorDrones?: boolean;
 | 
			
		||||
    noResourceExtractorDronesDamage?: boolean;
 | 
			
		||||
    skipClanKeyCrafting?: boolean;
 | 
			
		||||
 | 
			
		||||
@ -674,6 +674,10 @@
 | 
			
		||||
                                        <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="instantFinishRivenChallenge" />
 | 
			
		||||
                                        <label class="form-check-label" for="instantFinishRivenChallenge" data-loc="cheats_instantFinishRivenChallenge"></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>
 | 
			
		||||
 | 
			
		||||
@ -151,6 +151,7 @@ dict = {
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`,
 | 
			
		||||
    cheats_noDeathMarks: `Keine Todesmarkierungen`,
 | 
			
		||||
    cheats_noKimCooldowns: `Keine Wartezeit bei KIM`,
 | 
			
		||||
    cheats_instantFinishRivenChallenge: `Riven-Mod Herausforderung sofort abschließen`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
 | 
			
		||||
    cheats_noResourceExtractorDronesDamage: `Kein Schaden für Ressourcen-Extraktor-Drohnen`,
 | 
			
		||||
    cheats_skipClanKeyCrafting: `Clan-Schlüsselherstellung überspringen`,
 | 
			
		||||
 | 
			
		||||
@ -150,6 +150,7 @@ dict = {
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`,
 | 
			
		||||
    cheats_noDeathMarks: `No Death Marks`,
 | 
			
		||||
    cheats_noKimCooldowns: `No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantFinishRivenChallenge: `Instant Finish Riven Challenge`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`,
 | 
			
		||||
    cheats_noResourceExtractorDronesDamage: `No Resource Extractor Drones Damage`,
 | 
			
		||||
    cheats_skipClanKeyCrafting: `Skip Clan Key Crafting`,
 | 
			
		||||
 | 
			
		||||
@ -151,6 +151,7 @@ dict = {
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `Sin límite de compras de vendedores`,
 | 
			
		||||
    cheats_noDeathMarks: `Sin marcas de muerte`,
 | 
			
		||||
    cheats_noKimCooldowns: `Sin tiempo de espera para conversaciones KIM`,
 | 
			
		||||
    cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Drones de extracción de recursos instantáneos`,
 | 
			
		||||
    cheats_noResourceExtractorDronesDamage: `Sin daño a los drones extractores de recursos`,
 | 
			
		||||
    cheats_skipClanKeyCrafting: `Saltar la fabricación de la llave de clan`,
 | 
			
		||||
 | 
			
		||||
@ -151,6 +151,7 @@ dict = {
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `Aucune limite d'achat chez les PNJ`,
 | 
			
		||||
    cheats_noDeathMarks: `Aucune marque d'assassin`,
 | 
			
		||||
    cheats_noKimCooldowns: `Aucun cooldown sur le KIM`,
 | 
			
		||||
    cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Ressources de drones d'extraction instantannées`,
 | 
			
		||||
    cheats_noResourceExtractorDronesDamage: `Aucun dégâts aux drones d'extraction de resources`,
 | 
			
		||||
    cheats_skipClanKeyCrafting: `[UNTRANSLATED] Skip Clan Key Crafting`,
 | 
			
		||||
 | 
			
		||||
@ -151,6 +151,7 @@ dict = {
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `Отсутствие лимитов на покупки у вендоров`,
 | 
			
		||||
    cheats_noDeathMarks: `Без меток сметри`,
 | 
			
		||||
    cheats_noKimCooldowns: `Чаты KIM без кулдауна`,
 | 
			
		||||
    cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`,
 | 
			
		||||
    cheats_noResourceExtractorDronesDamage: `Без урона по дронам-сборщикам`,
 | 
			
		||||
    cheats_skipClanKeyCrafting: `Пропустить крафт кланового ключа`,
 | 
			
		||||
 | 
			
		||||
@ -151,6 +151,7 @@ dict = {
 | 
			
		||||
    cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
 | 
			
		||||
    cheats_noDeathMarks: `[UNTRANSLATED] No Death Marks`,
 | 
			
		||||
    cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`,
 | 
			
		||||
    cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`,
 | 
			
		||||
    cheats_instantResourceExtractorDrones: `即时资源采集无人机`,
 | 
			
		||||
    cheats_noResourceExtractorDronesDamage: `[UNTRANSLATED] No Resource Extractor Drones Damage`,
 | 
			
		||||
    cheats_skipClanKeyCrafting: `[UNTRANSLATED] Skip Clan Key Crafting`,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user