+ + +
+ +diff --git a/configService.ts b/configService.ts new file mode 100644 index 00000000..0e39203a --- /dev/null +++ b/configService.ts @@ -0,0 +1,144 @@ +import fs from "fs"; +import path from "path"; +import { repoDir } from "@/src/helpers/pathHelper"; +import { args } from "@/src/helpers/commandLineArguments"; +import { Inbox } from "@/src/models/inboxModel"; + +export interface IConfig { + mongodbUrl: string; + logger: { + files: boolean; + level: string; // "fatal" | "error" | "warn" | "info" | "http" | "debug" | "trace"; + }; + myAddress: string; + httpPort?: number; + httpsPort?: number; + myIrcAddresses?: string[]; + NRS?: string[]; + administratorNames?: string[]; + autoCreateAccount?: boolean; + skipTutorial?: boolean; + skipAllDialogue?: boolean; + unlockAllScans?: boolean; + infiniteCredits?: boolean; + infinitePlatinum?: boolean; + infiniteEndo?: boolean; + infiniteRegalAya?: boolean; + infiniteHelminthMaterials?: boolean; + claimingBlueprintRefundsIngredients?: boolean; + dontSubtractPurchaseCreditCost?: boolean; + dontSubtractPurchasePlatinumCost?: boolean; + dontSubtractPurchaseItemCost?: boolean; + dontSubtractPurchaseStandingCost?: boolean; + dontSubtractVoidTraces?: boolean; + dontSubtractConsumables?: boolean; + unlockAllShipFeatures?: boolean; + unlockAllShipDecorations?: boolean; + unlockAllFlavourItems?: boolean; + unlockAllSkins?: boolean; + unlockAllCapturaScenes?: boolean; + unlockAllDecoRecipes?: boolean; + universalPolarityEverywhere?: boolean; + unlockDoubleCapacityPotatoesEverywhere?: boolean; + unlockExilusEverywhere?: boolean; + unlockArcanesEverywhere?: boolean; + noDailyStandingLimits?: boolean; + noDailyFocusLimit?: boolean; + noArgonCrystalDecay?: boolean; + noMasteryRankUpCooldown?: boolean; + noVendorPurchaseLimits?: boolean; + noDeathMarks?: boolean; + noKimCooldowns?: boolean; + fullyStockedVendors?: boolean; + baroAlwaysAvailable?: boolean; + baroFullyStocked?: boolean; + syndicateMissionsRepeatable?: boolean; + unlockAllProfitTakerStages?: boolean; + instantFinishRivenChallenge?: boolean; + instantResourceExtractorDrones?: boolean; + noResourceExtractorDronesDamage?: boolean; + skipClanKeyCrafting?: boolean; + noDojoRoomBuildStage?: boolean; + noDojoDecoBuildStage?: boolean; + fastDojoRoomDestruction?: boolean; + noDojoResearchCosts?: boolean; + noDojoResearchTime?: boolean; + fastClanAscension?: boolean; + missionsCanGiveAllRelics?: boolean; + exceptionalRelicsAlwaysGiveBronzeReward?: boolean; + flawlessRelicsAlwaysGiveSilverReward?: boolean; + radiantRelicsAlwaysGiveGoldReward?: boolean; + unlockAllSimarisResearchEntries?: boolean; + disableDailyTribute?: boolean; + spoofMasteryRank?: number; + relicRewardItemCountMultiplier?: number; + nightwaveStandingMultiplier?: number; + unfaithfulBugFixes?: { + ignore1999LastRegionPlayed?: boolean; + fixXtraCheeseTimer?: boolean; + }; + worldState?: { + creditBoost?: boolean; + affinityBoost?: boolean; + resourceBoost?: boolean; + starDays?: boolean; + galleonOfGhouls?: number; + eidolonOverride?: string; + vallisOverride?: string; + duviriOverride?: string; + nightwaveOverride?: string; + allTheFissures?: string; + circuitGameModes?: string[]; + darvoStockMultiplier?: number; + varziaOverride?: string; + varziaFullyStocked?: boolean; + TennoCon?: boolean; + Fomorian?: boolean; + BellyoftheBeast?: boolean; + RecurringGhoul?: boolean; + HeatFissures?:boolean; + }; + dev?: { + keepVendorsExpired?: boolean; + }; +} + +export const configPath = path.join(repoDir, args.configPath ?? "config.json"); + +export const config: IConfig = { + mongodbUrl: "mongodb://127.0.0.1:27017/openWF", + logger: { + files: true, + level: "trace" + }, + myAddress: "localhost" +}; + +export const loadConfig = (): void => { + const newConfig = JSON.parse(fs.readFileSync(configPath, "utf-8")) as IConfig; + + // Set all values to undefined now so if the new config.json omits some fields that were previously present, it's correct in-memory. + for (const key of Object.keys(config)) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + (config as any)[key] = undefined; + } + + Object.assign(config, newConfig); +}; + +export const syncConfigWithDatabase = (): void => { + // Event messages are deleted after endDate. Since we don't use beginDate/endDate and instead have config toggles, we need to delete the messages once those bools are false. + // Also, for some reason, I can't just do `Inbox.deleteMany(...)`; - it needs this whole circus. + if (!config.worldState?.creditBoost) { + void Inbox.deleteMany({ globaUpgradeId: "5b23106f283a555109666672" }).then(() => {}); + } + if (!config.worldState?.affinityBoost) { + void Inbox.deleteMany({ globaUpgradeId: "5b23106f283a555109666673" }).then(() => {}); + } + if (!config.worldState?.resourceBoost) { + void Inbox.deleteMany({ globaUpgradeId: "5b23106f283a555109666674" }).then(() => {}); + } + if (!config.worldState?.galleonOfGhouls) { + void Inbox.deleteMany({ goalTag: "GalleonRobbery" }).then(() => {}); + } +}; diff --git a/index.html b/index.html new file mode 100644 index 00000000..597649a7 --- /dev/null +++ b/index.html @@ -0,0 +1,1119 @@ + + +
++ + +
+ +|DISPLAYNAME|
添加到 config.json 的 administratorNames
中.`,
+ cheats_server: `服务器`,
+ cheats_skipTutorial: `跳过教程`,
+ cheats_skipAllDialogue: `跳过所有对话`,
+ cheats_unlockAllScans: `解锁所有扫描`,
+ cheats_unlockAllMissions: `解锁所有任务`,
+ cheats_unlockAllMissions_ok: `操作成功.请注意,您需要进入道场/中继站或重新登录客户端以刷新星图数据。`,
+ cheats_infiniteCredits: `无限现金`,
+ cheats_infinitePlatinum: `无限白金`,
+ cheats_infiniteEndo: `无限内融核心`,
+ cheats_infiniteRegalAya: `无限御品阿耶`,
+ cheats_infiniteHelminthMaterials: `无限Helminth材料`,
+ cheats_claimingBlueprintRefundsIngredients: `取消蓝图制造时返还材料`,
+ cheats_dontSubtractPurchaseCreditCost: `购物时不减少现金花费`,
+ cheats_dontSubtractPurchasePlatinumCost: `购物时不减少白金花费`,
+ cheats_dontSubtractPurchaseItemCost: `购物时不减少物品花费`,
+ cheats_dontSubtractPurchaseStandingCost: `购物时不减少声望花费`,
+ cheats_dontSubtractVoidTraces: `虚空光体无消耗`,
+ cheats_dontSubtractConsumables: `消耗物品使用时无损耗`,
+ cheats_unlockAllShipFeatures: `解锁所有飞船功能`,
+ cheats_unlockAllShipDecorations: `解锁所有飞船装饰`,
+ cheats_unlockAllFlavourItems: `解锁所有装饰物品`,
+ cheats_unlockAllSkins: `解锁所有外观`,
+ cheats_unlockAllCapturaScenes: `解锁所有Captura场景`,
+ cheats_unlockAllDecoRecipes: `解锁所有道场配方`,
+ cheats_universalPolarityEverywhere: `全局万用极性`,
+ cheats_unlockDoubleCapacityPotatoesEverywhere: `全物品自带Orokin反应堆`,
+ cheats_unlockExilusEverywhere: `全物品自带适配器`,
+ cheats_unlockArcanesEverywhere: `全物品自带赋能适配器`,
+ cheats_noDailyStandingLimits: `无每日声望限制`,
+ cheats_noDailyFocusLimit: `指挥官专精无每日获取上限`,
+ cheats_noArgonCrystalDecay: `氩结晶无衰变`,
+ cheats_noMasteryRankUpCooldown: `段位考核无冷却时间`,
+ cheats_noVendorPurchaseLimits: `商城或商人无购买限制`,
+ cheats_noDeathMarks: `无死亡标记(不会被 Stalker/Grustrag 三霸/Zanuka 猎人等标记)`,
+ cheats_noKimCooldowns: `即时通无冷却时间`,
+ cheats_fullyStockedVendors: `商人贩卖所有商品`,
+ cheats_baroAlwaysAvailable: `虚空商人可永久访问`,
+ cheats_baroFullyStocked: `虚空商人贩卖所有商品`,
+ cheats_syndicateMissionsRepeatable: `集团任务可重复完成`,
+ cheats_unlockAllProfitTakerStages: `解锁利润收割者圆蛛所有阶段`,
+ cheats_instantFinishRivenChallenge: `立即完成裂罅挑战`,
+ cheats_instantResourceExtractorDrones: `资源无人机即时完成`,
+ cheats_noResourceExtractorDronesDamage: `资源无人机不会损毁`,
+ cheats_skipClanKeyCrafting: `跳过氏族钥匙制作, 进入道场无需氏族钥匙`,
+ cheats_noDojoRoomBuildStage: `无视道场房间建造阶段`,
+ cheats_noDojoDecoBuildStage: `道场装饰建造立即完成`,
+ cheats_fastDojoRoomDestruction: `快速拆除道场房间`,
+ cheats_noDojoResearchCosts: `无视道场研究消耗`,
+ cheats_noDojoResearchTime: `无视道场研究时间`,
+ cheats_fastClanAscension: `快速升级氏族`,
+ cheats_missionsCanGiveAllRelics: `任务可获取所有遗物`,
+ cheats_exceptionalRelicsAlwaysGiveBronzeReward: `优良遗物必定掉落青铜奖励`,
+ cheats_flawlessRelicsAlwaysGiveSilverReward: `无瑕遗物必定掉落白银奖励`,
+ cheats_radiantRelicsAlwaysGiveGoldReward: `光辉遗物必定掉落黄金奖励`,
+ cheats_unlockAllSimarisResearchEntries: `解锁所有Simaris研究条目`,
+ cheats_disableDailyTribute: `禁用每日登录奖励`,
+ cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
+ cheats_relicRewardItemCountMultiplier: `虚空遗物奖励物品数量倍率`,
+ cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
+ cheats_save: `保存`,
+ cheats_account: `账户`,
+ cheats_unlockAllFocusSchools: `解锁所有专精学派`,
+ cheats_helminthUnlockAll: `完全升级Helminth`,
+ cheats_addMissingSubsumedAbilities: `添加Helminth未汲取的战甲技能`,
+ cheats_intrinsicsUnlockAll: `所有内源之力最大等级`,
+ cheats_changeSupportedSyndicate: `支持的集团`,
+ cheats_changeButton: `更改`,
+ cheats_markAllAsRead: `收件箱全部标记为已读`,
+
+ worldState: `世界状态配置`,
+ worldState_creditBoost: `现金加成`,
+ worldState_affinityBoost: `经验加成`,
+ worldState_resourceBoost: `资源加成`,
+ worldState_starDays: `活动:星日`,
+ worldState_TennoCon: `TennoCon中继站`,
+ worldState_Fomorian: `破坏巨人战舰`,
+ worldState_BellyoftheBeast: `行动代号: 兽之腹`,
+ worldState_galleonOfGhouls: `战术警报:尸鬼的帆船战舰`,
+ worldState_RecurringGhoul: `尸鬼净化`,
+ worldState_HeatFissures: `热美亚裂缝`,
+ disabled: `关闭/取消配置`,
+ worldState_we1: `活动阶段:第一周`,
+ worldState_we2: `活动阶段:第二周`,
+ worldState_we3: `活动阶段:第三周`,
+ worldState_eidolonOverride: `夜灵平原/魔胎之境状态`,
+ worldState_day: `白昼/FASS`,
+ worldState_night: `黑夜/VOME`,
+ worldState_vallisOverride: `奥布山谷状态`,
+ worldState_warm: `温暖`,
+ worldState_cold: `寒冷`,
+ worldState_duviriOverride: `双衍王镜状态`,
+ worldState_joy: `喜悦`,
+ worldState_anger: `愤怒`,
+ worldState_envy: `嫉妒`,
+ worldState_sorrow: `悲伤`,
+ worldState_fear: `恐惧`,
+ worldState_nightwaveOverride: `午夜电波系列`,
+ worldState_RadioLegionIntermission13Syndicate: `诺拉的混选VOL.9`,
+ worldState_RadioLegionIntermission12Syndicate: `诺拉的混选VOL.8`,
+ worldState_RadioLegionIntermission11Syndicate: `诺拉的混选VOL.7`,
+ worldState_RadioLegionIntermission10Syndicate: `诺拉的混选VOL.6`,
+ worldState_RadioLegionIntermission9Syndicate: `诺拉的混选VOL.5`,
+ worldState_RadioLegionIntermission8Syndicate: `诺拉的混选VOL.4`,
+ worldState_RadioLegionIntermission7Syndicate: `诺拉的混选VOL.3`,
+ worldState_RadioLegionIntermission6Syndicate: `诺拉的混选VOL.2`,
+ worldState_RadioLegionIntermission5Syndicate: `诺拉的混选VOL.1`,
+ worldState_RadioLegionIntermission4Syndicate: `诺拉的精选`,
+ worldState_RadioLegionIntermission3Syndicate: `间歇III`,
+ worldState_RadioLegion3Syndicate: `系列3 — 玻璃匠`,
+ worldState_RadioLegionIntermission2Syndicate: `间歇II`,
+ worldState_RadioLegion2Syndicate: `系列2 — 使徒`,
+ worldState_RadioLegionIntermissionSyndicate: `间歇I`,
+ worldState_RadioLegionSyndicate: `系列1 — 土星六号之狼`,
+ worldState_fissures: `虚空裂缝难度设定`,
+ normal: `正常`,
+ worldState_allAtOnceNormal: `全部开启(普通)`,
+ worldState_allAtOnceSteelPath: `全部开启(钢铁之路)`,
+ worldState_theCircuitOverride: `无尽回廊任务循环配置:`,
+ worldState_darvoStockMultiplier: `Darvo特惠库存倍率`,
+ worldState_varziaFullyStocked: `瓦奇娅开启全部库存商品`,
+ worldState_varziaOverride: `瓦奇娅(Prime重生)轮换状态`,
+
+ import_importNote: `您可以在此处提供完整或部分库存响应(客户端表示).支持的所有字段将被覆盖到您的账户中.`,
+ import_submit: `提交`,
+ import_samples: `示例:`,
+ import_samples_maxFocus: `所有专精学派完全精通`,
+
+ upgrade_Equilibrium: `拾取生命球+|VAL|%能量,拾取能量球+|VAL|%生命`,
+ upgrade_MeleeCritDamage: `+|VAL|%近战暴击伤害`,
+ upgrade_PrimaryStatusChance: `+|VAL|%主要武器触发几率`,
+ upgrade_SecondaryCritChance: `+|VAL|%次要武器暴击几率`,
+ upgrade_WarframeAbilityDuration: `+|VAL|%技能持续时间`,
+ upgrade_WarframeAbilityStrength: `+|VAL|%技能强度`,
+ upgrade_WarframeArmorMax: `+|VAL|护甲`,
+ upgrade_WarframeBlastProc: `使用爆炸伤害击杀敌人时恢复+|VAL|护盾`,
+ upgrade_WarframeCastingSpeed: `+|VAL|%施放速度`,
+ upgrade_WarframeCorrosiveDamageBoost: `对受腐蚀异常影响的敌人+|VAL|%额外技能伤害`,
+ upgrade_WarframeCorrosiveStack: `腐蚀异常最大堆叠层数+|VAL|`,
+ upgrade_WarframeCritDamageBoost: `+|VAL|%近战暴击伤害(最大能量超过500时伤害翻倍)`,
+ upgrade_WarframeElectricDamage: `主要武器获得+|VAL1|%电击伤害(每装备一颗深红,蔚蓝,紫晶源力石+|VAL2|%额外电击伤害)`,
+ upgrade_WarframeElectricDamageBoost: `对受电击异常影响的敌人+|VAL|%额外技能伤害`,
+ upgrade_WarframeEnergyMax: `+|VAL|最大能量`,
+ upgrade_WarframeGlobeEffectEnergy: `+|VAL|%能量球效果`,
+ upgrade_WarframeGlobeEffectHealth: `+|VAL|%生命球效果`,
+ upgrade_WarframeHealthMax: `+|VAL|生命值`,
+ upgrade_WarframeHPBoostFromImpact: `通过爆炸伤害击杀的每个敌人可增加|VAL1|生命上限(最大|VAL2|生命上限)`,
+ upgrade_WarframeParkourVelocity: `+|VAL|%跑酷速度`,
+ upgrade_WarframeRadiationDamageBoost: `对受辐射状态影响的敌人+|VAL|%技能伤害`,
+ upgrade_WarframeHealthRegen: `+|VAL|/秒生命再生`,
+ upgrade_WarframeShieldMax: `+|VAL|护盾值`,
+ upgrade_WarframeStartingEnergy: `进任务时+|VAL|%初始能量`,
+ upgrade_WarframeToxinDamage: `毒素伤害额外+|VAL|%伤害`,
+ upgrade_WarframeToxinHeal: `每当敌人受到毒素伤害时回复|VAL|生命值`,
+ upgrade_WeaponCritBoostFromHeat: `每个被火焰伤害杀死的敌人,增加|VAL1|%次要武器暴击几率(最大|VAL2|%)`,
+ upgrade_AvatarAbilityRange: `+7.5%技能范围`,
+ upgrade_AvatarAbilityEfficiency: `+5%技能效率`,
+ upgrade_AvatarEnergyRegen: `+0.5/秒能量再生`,
+ upgrade_AvatarEnemyRadar: `+5米侦敌雷达`,
+ upgrade_AvatarLootRadar: `+7米寻物雷达`,
+ upgrade_WeaponAmmoMax: `+15%弹药最大容量`,
+ upgrade_EnemyArmorReductionAura: `-3%敌方护甲`,
+ upgrade_OnExecutionAmmo: `怜悯之击可装填100%主要武器和次要武器弹匣容量`,
+ upgrade_OnExecutionHealthDrop: `怜悯之击有100%几率掉落生命球`,
+ upgrade_OnExecutionEnergyDrop: `怜悯之击有50%几率掉落能量球`,
+ upgrade_OnFailHackReset: `入侵失败后有50%几率重新尝试`,
+ upgrade_DamageReductionOnHack: `入侵时,+75%伤害减免`,
+ upgrade_OnExecutionReviveCompanion: `怜悯之击减少15秒同伴复苏时间`,
+ upgrade_OnExecutionParkourSpeed: `怜悯之击后+60%跑酷速度,持续15秒`,
+ upgrade_AvatarTimeLimitIncrease: `+8秒入侵时间`,
+ upgrade_ElectrifyOnHack: `入侵时震慑20米之内的敌人`,
+ upgrade_OnExecutionTerrify: `怜悯之击有50%几率让15米以内的敌人进入恐惧状态8秒`,
+ upgrade_OnHackLockers: `入侵后解锁20米内的5个储物柜`,
+ upgrade_OnExecutionBlind: `怜悯之击致盲18米范围内的敌人`,
+ upgrade_OnExecutionDrainPower: `怜悯之击有100%机率使下一个技能获得50%技能强度`,
+ upgrade_OnHackSprintSpeed: `入侵后+75%冲刺速度,持续15秒`,
+ upgrade_SwiftExecute: `怜悯之击施放速度+50%`,
+ upgrade_OnHackInvis: `入侵后隐身15秒`,
+
+ damageType_Electricity: `电击`,
+ damageType_Fire: `火焰`,
+ damageType_Freeze: `冰冻`,
+ damageType_Impact: `冲击`,
+ damageType_Magnetic: `磁力`,
+ damageType_Poison: `毒素`,
+ damageType_Radiation: `辐射`,
+
+ theme_dark: `暗色主题`,
+ theme_light: `亮色主题`,
+
+ prettier_sucks_ass: ``
+};