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: missionsCanGiveAllRelics cheat (#2217)

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

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

代码差异

10 个文件 +30 -0
Modified config.json.example +1 -0
@@ -54,6 +54,7 @@
54 54 "noDojoResearchCosts": false,
55 55 "noDojoResearchTime": false,
56 56 "fastClanAscension": false,
57 "missionsCanGiveAllRelics": false,
57 58 "spoofMasteryRank": -1,
58 59 "nightwaveStandingMultiplier": 1,
59 60 "worldState": {
Modified src/services/configService.ts +1 -0
@@ -60,6 +60,7 @@ export interface IConfig {
60 60 noDojoResearchCosts?: boolean;
61 61 noDojoResearchTime?: boolean;
62 62 fastClanAscension?: boolean;
63 missionsCanGiveAllRelics?: boolean;
63 64 spoofMasteryRank?: number;
64 65 nightwaveStandingMultiplier?: number;
65 66 worldState?: {
Modified src/services/missionInventoryUpdateService.ts +18 -0
@@ -2,6 +2,7 @@ import {
2 2 ExportEnemies,
3 3 ExportFusionBundles,
4 4 ExportRegions,
5 ExportRelics,
5 6 ExportRewards,
6 7 IMissionReward as IMissionRewardExternal,
7 8 IRegion,
@@ -1805,6 +1806,23 @@ function getRandomMissionDrops(
1805 1806 drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
1806 1807 }
1807 1808 }
1809
1810 if (config.missionsCanGiveAllRelics) {
1811 for (const drop of drops) {
1812 const itemType = fromStoreItem(drop.StoreItem);
1813 if (itemType in ExportRelics) {
1814 const relic = ExportRelics[itemType];
1815 const replacement = getRandomElement(
1816 Object.entries(ExportRelics).filter(
1817 arr => arr[1].era == relic.era && arr[1].quality == relic.quality
1818 )
1819 )!;
1820 logger.debug(`replacing ${relic.era} ${relic.category} with ${replacement[1].category}`);
1821 drop.StoreItem = toStoreItem(replacement[0]);
1822 }
1823 }
1824 }
1825
1808 1826 return drops;
1809 1827 }
1810 1828
Modified static/webui/index.html +4 -0
@@ -752,6 +752,10 @@
752 752 <input class="form-check-input" type="checkbox" id="fastClanAscension" />
753 753 <label class="form-check-label" for="fastClanAscension" data-loc="cheats_fastClanAscension"></label>
754 754 </div>
755 <div class="form-check">
756 <input class="form-check-input" type="checkbox" id="missionsCanGiveAllRelics" />
757 <label class="form-check-label" for="missionsCanGiveAllRelics" data-loc="cheats_missionsCanGiveAllRelics"></label>
758 </div>
755 759 <form class="form-group mt-2" onsubmit="doSaveConfig('spoofMasteryRank'); return false;">
756 760 <label class="form-label" for="spoofMasteryRank" data-loc="cheats_spoofMasteryRank"></label>
757 761 <div class="input-group">
Modified static/webui/translations/de.js +1 -0
@@ -170,6 +170,7 @@ dict = {
170 170 cheats_noDojoResearchCosts: `Keine Dojo-Forschungskosten`,
171 171 cheats_noDojoResearchTime: `Keine Dojo-Forschungszeit`,
172 172 cheats_fastClanAscension: `Schneller Clan-Aufstieg`,
173 cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
173 174 cheats_spoofMasteryRank: `Gefälschter Meisterschaftsrang (-1 zum deaktivieren)`,
174 175 cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
175 176 cheats_save: `[UNTRANSLATED] Save`,
Modified static/webui/translations/en.js +1 -0
@@ -169,6 +169,7 @@ dict = {
169 169 cheats_noDojoResearchCosts: `No Dojo Research Costs`,
170 170 cheats_noDojoResearchTime: `No Dojo Research Time`,
171 171 cheats_fastClanAscension: `Fast Clan Ascension`,
172 cheats_missionsCanGiveAllRelics: `Missions Can Give All Relics`,
172 173 cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`,
173 174 cheats_nightwaveStandingMultiplier: `Nightwave Standing Multiplier`,
174 175 cheats_save: `Save`,
Modified static/webui/translations/es.js +1 -0
@@ -170,6 +170,7 @@ dict = {
170 170 cheats_noDojoResearchCosts: `Sin costo de investigación del dojo`,
171 171 cheats_noDojoResearchTime: `Sin tiempo de investigación del dojo`,
172 172 cheats_fastClanAscension: `Ascenso rápido del clan`,
173 cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
173 174 cheats_spoofMasteryRank: `Rango de maestría simulado (-1 para desactivar)`,
174 175 cheats_nightwaveStandingMultiplier: `Multiplicador de Reputación de Onda Nocturna`,
175 176 cheats_save: `Guardar`,
Modified static/webui/translations/fr.js +1 -0
@@ -170,6 +170,7 @@ dict = {
170 170 cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`,
171 171 cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`,
172 172 cheats_fastClanAscension: `Ascension de clan rapide`,
173 cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
173 174 cheats_spoofMasteryRank: `Rang de maîtrise personnalisé (-1 pour désactiver)`,
174 175 cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
175 176 cheats_save: `[UNTRANSLATED] Save`,
Modified static/webui/translations/ru.js +1 -0
@@ -170,6 +170,7 @@ dict = {
170 170 cheats_noDojoResearchCosts: `Бесплатные Исследование Додзё`,
171 171 cheats_noDojoResearchTime: `Мгновенные Исследование Додзё`,
172 172 cheats_fastClanAscension: `Мгновенное Вознесение Клана`,
173 cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
173 174 cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,
174 175 cheats_nightwaveStandingMultiplier: `[UNTRANSLATED] Nightwave Standing Multiplier`,
175 176 cheats_save: `[UNTRANSLATED] Save`,
Modified static/webui/translations/zh.js +1 -0
@@ -170,6 +170,7 @@ dict = {
170 170 cheats_noDojoResearchCosts: `无视道场研究消耗`,
171 171 cheats_noDojoResearchTime: `无视道场研究时间`,
172 172 cheats_fastClanAscension: `快速升级氏族`,
173 cheats_missionsCanGiveAllRelics: `[UNTRANSLATED] Missions Can Give All Relics`,
173 174 cheats_spoofMasteryRank: `伪造精通段位(-1为禁用)`,
174 175 cheats_nightwaveStandingMultiplier: `午夜电波声望倍率`,
175 176 cheats_save: `[UNTRANSLATED] Save`,