XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

feat: dontSubtractConsumables cheat (#1857)

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

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

代码差异

10 个文件 +20 -1
Modified config.json.example +1 -0
@@ -19,6 +19,7 @@
19 19 "infiniteEndo": false,
20 20 "infiniteRegalAya": false,
21 21 "infiniteHelminthMaterials": false,
22 "dontSubtractConsumables": false,
22 23 "unlockAllShipFeatures": false,
23 24 "unlockAllShipDecorations": false,
24 25 "unlockAllFlavourItems": false,
Modified src/services/configService.ts +1 -0
@@ -24,6 +24,7 @@ interface IConfig {
24 24 infiniteEndo?: boolean;
25 25 infiniteRegalAya?: boolean;
26 26 infiniteHelminthMaterials?: boolean;
27 dontSubtractConsumables?: boolean;
27 28 unlockAllShipFeatures?: boolean;
28 29 unlockAllShipDecorations?: boolean;
29 30 unlockAllFlavourItems?: boolean;
Modified src/services/missionInventoryUpdateService.ts +8 -1
@@ -266,7 +266,14 @@ export const addMissionInventoryUpdates = async (
266 266 addMiscItems(inventory, value);
267 267 break;
268 268 case "Consumables":
269 addConsumables(inventory, value);
269 if (config.dontSubtractConsumables) {
270 addConsumables(
271 inventory,
272 value.filter(x => x.ItemCount > 0)
273 );
274 } else {
275 addConsumables(inventory, value);
276 }
270 277 break;
271 278 case "Recipes":
272 279 addRecipes(inventory, value);
Modified static/webui/index.html +4 -0
@@ -593,6 +593,10 @@
593 593 <input class="form-check-input" type="checkbox" id="infiniteHelminthMaterials" />
594 594 <label class="form-check-label" for="infiniteHelminthMaterials" data-loc="cheats_infiniteHelminthMaterials"></label>
595 595 </div>
596 <div class="form-check">
597 <input class="form-check-input" type="checkbox" id="dontSubtractConsumables" />
598 <label class="form-check-label" for="dontSubtractConsumables" data-loc="cheats_dontSubtractConsumables"></label>
599 </div>
596 600 <div class="form-check">
597 601 <input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
598 602 <label class="form-check-label" for="unlockAllShipFeatures" data-loc="cheats_unlockAllShipFeatures"></label>
Modified static/webui/translations/de.js +1 -0
@@ -133,6 +133,7 @@ dict = {
133 133 cheats_infiniteEndo: `Unendlich Endo`,
134 134 cheats_infiniteRegalAya: `Unendlich Reines Aya`,
135 135 cheats_infiniteHelminthMaterials: `Unendlich Helminth-Materialien`,
136 cheats_dontSubtractConsumables: `[UNTRANSLATED] Don't Subtract Consumables`,
136 137 cheats_unlockAllShipFeatures: `Alle Schiffs-Funktionen freischalten`,
137 138 cheats_unlockAllShipDecorations: `Alle Schiffsdekorationen freischalten`,
138 139 cheats_unlockAllFlavourItems: `Alle <abbr title=\"Animationssets, Glyphen, Farbpaletten usw.\">Sammlerstücke</abbr> freischalten`,
Modified static/webui/translations/en.js +1 -0
@@ -132,6 +132,7 @@ dict = {
132 132 cheats_infiniteEndo: `Infinite Endo`,
133 133 cheats_infiniteRegalAya: `Infinite Regal Aya`,
134 134 cheats_infiniteHelminthMaterials: `Infinite Helminth Materials`,
135 cheats_dontSubtractConsumables: `Don't Subtract Consumables`,
135 136 cheats_unlockAllShipFeatures: `Unlock All Ship Features`,
136 137 cheats_unlockAllShipDecorations: `Unlock All Ship Decorations`,
137 138 cheats_unlockAllFlavourItems: `Unlock All <abbr title=\"Animation Sets, Glyphs, Palettes, etc.\">Flavor Items</abbr>`,
Modified static/webui/translations/es.js +1 -0
@@ -133,6 +133,7 @@ dict = {
133 133 cheats_infiniteEndo: `Endo infinito`,
134 134 cheats_infiniteRegalAya: `Aya Real infinita`,
135 135 cheats_infiniteHelminthMaterials: `Materiales Helminto infinitos`,
136 cheats_dontSubtractConsumables: `[UNTRANSLATED] Don't Subtract Consumables`,
136 137 cheats_unlockAllShipFeatures: `Desbloquear todas las funciones de nave`,
137 138 cheats_unlockAllShipDecorations: `Desbloquear todas las decoraciones de nave`,
138 139 cheats_unlockAllFlavourItems: `Desbloquear todos los <abbr title="Conjuntos de animaciones, glifos, paletas, etc.">ítems estéticos</abbr>`,
Modified static/webui/translations/fr.js +1 -0
@@ -133,6 +133,7 @@ dict = {
133 133 cheats_infiniteEndo: `Endo infini`,
134 134 cheats_infiniteRegalAya: `Aya Raffiné infini`,
135 135 cheats_infiniteHelminthMaterials: `Ressources d'Helminth infinies`,
136 cheats_dontSubtractConsumables: `[UNTRANSLATED] Don't Subtract Consumables`,
136 137 cheats_unlockAllShipFeatures: `Débloquer tous les segments du vaisseau`,
137 138 cheats_unlockAllShipDecorations: `Débloquer toutes les décorations du vaisseau`,
138 139 cheats_unlockAllFlavourItems: `Débloquer tous les <abbr title=\"Animations, Glyphes, Palettes, etc.\">Flavor Items</abbr>`,
Modified static/webui/translations/ru.js +1 -0
@@ -133,6 +133,7 @@ dict = {
133 133 cheats_infiniteEndo: `Бесконечное эндо`,
134 134 cheats_infiniteRegalAya: `Бесконечная Королевская Айя`,
135 135 cheats_infiniteHelminthMaterials: `Бесконечные Выделения Гельминта`,
136 cheats_dontSubtractConsumables: `[UNTRANSLATED] Don't Subtract Consumables`,
136 137 cheats_unlockAllShipFeatures: `Разблокировать все функции корабля`,
137 138 cheats_unlockAllShipDecorations: `Разблокировать все украшения корабля`,
138 139 cheats_unlockAllFlavourItems: `Разблокировать все <abbr title=\"Наборы анимаций, глифы, палитры и т. д.\">уникальные предметы</abbr>`,
Modified static/webui/translations/zh.js +1 -0
@@ -133,6 +133,7 @@ dict = {
133 133 cheats_infiniteEndo: `无限内融核心`,
134 134 cheats_infiniteRegalAya: `无限御品阿耶`,
135 135 cheats_infiniteHelminthMaterials: `无限Helminth材料`,
136 cheats_dontSubtractConsumables: `[UNTRANSLATED] Don't Subtract Consumables`,
136 137 cheats_unlockAllShipFeatures: `解锁所有飞船功能`,
137 138 cheats_unlockAllShipDecorations: `解锁所有飞船装饰`,
138 139 cheats_unlockAllFlavourItems: `解锁所有<abbr title=\"动画组合、图标、调色板等\">装饰物品</abbr>`,