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: noHubDiscrimination (#3303)

With this, players won't join language, region, or platform specific hub instances. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3303 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

9d5528fe
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

11 个文件 +21 -12
Modified config-vanilla.json +1 -0
@@ -12,6 +12,7 @@
12 12 "ircAddress": null,
13 13 "hubExecutable": null,
14 14 "hubAddress": null,
15 "noHubDiscrimination": false,
15 16 "nrsAddress": null,
16 17 "dtls": null,
17 18 "administratorNames": [],
Modified src/controllers/arbiter/hubController.ts +8 -1
@@ -2,5 +2,12 @@ import type { RequestHandler } from "express";
2 2 import { config, getReflexiveAddress } from "../../services/configService.ts";
3 3
4 4 export const hubController: RequestHandler = (req, res) => {
5 res.json(`hub ${config.hubAddress ?? getReflexiveAddress(req).myAddress}:6952`);
5 if (config.noHubDiscrimination) {
6 const arr = (req.query.level as string).split("_");
7 const instanceId = arr.pop();
8 const level = arr[0];
9 res.json(`hub ${config.hubAddress ?? getReflexiveAddress(req).myAddress}:6952 ${instanceId} ${level}`);
10 } else {
11 res.json(`hub ${config.hubAddress ?? getReflexiveAddress(req).myAddress}:6952`);
12 }
6 13 };
Modified src/services/configService.ts +1 -0
@@ -20,6 +20,7 @@ export interface IConfig {
20 20 ircAddress?: string;
21 21 hubExecutable?: string;
22 22 hubAddress?: string;
23 noHubDiscrimination?: boolean;
23 24 nrsAddress?: string;
24 25 dtls?: number;
25 26 administratorNames?: string[];
Modified static/webui/index.html +4 -4
@@ -1205,10 +1205,6 @@
1205 1205 <input class="form-check-input" type="checkbox" id="skipTutorial" />
1206 1206 <label class="form-check-label" for="skipTutorial" data-loc="cheats_skipTutorial"></label>
1207 1207 </div>
1208 <div class="form-check">
1209 <input class="form-check-input" type="checkbox" id="unlockAllSkins" />
1210 <label class="form-check-label" for="unlockAllSkins" data-loc="cheats_unlockAllSkins"></label>
1211 </div>
1212 1208 <div class="form-check">
1213 1209 <input class="form-check-input" type="checkbox" id="fullyStockedVendors" />
1214 1210 <label class="form-check-label" for="fullyStockedVendors" data-loc="cheats_fullyStockedVendors"></label>
@@ -1217,6 +1213,10 @@
1217 1213 <input class="form-check-input" type="checkbox" id="skipClanKeyCrafting" />
1218 1214 <label class="form-check-label" for="skipClanKeyCrafting" data-loc="cheats_skipClanKeyCrafting"></label>
1219 1215 </div>
1216 <div class="form-check">
1217 <input class="form-check-input" type="checkbox" id="noHubDiscrimination" />
1218 <label class="form-check-label" for="noHubDiscrimination" data-loc="cheats_noHubDiscrimination"></label>
1219 </div>
1220 1220 </div>
1221 1221 </div>
1222 1222 </div>
Modified static/webui/translations/de.js +1 -1
@@ -232,7 +232,6 @@ dict = {
232 232 cheats_dontSubtractVoidTraces: `Void-Spuren nicht verbrauchen`,
233 233 cheats_dontSubtractConsumables: `Verbrauchsgüter (Ausrüstung) nicht verbrauchen`,
234 234 cheats_unlockAllShipFeatures: `Alle Schiffs-Funktionen freischalten`,
235 cheats_unlockAllSkins: `Alle Skins freischalten`,
236 235 cheats_unlockAllCapturaScenes: `Alle Photora-Szenen freischalten`,
237 236 cheats_universalPolarityEverywhere: `Universelle Polarität überall`,
238 237 cheats_unlockDoubleCapacityPotatoesEverywhere: `Orokin Reaktor & Beschleuniger überall`,
@@ -290,6 +289,7 @@ dict = {
290 289 cheats_nemesisHintProgressMultiplierGrineer: `Hinweis-Fortschrittsmultiplikator (Grineer)`,
291 290 cheats_nemesisHintProgressMultiplierCorpus: `Hinweis-Fortschrittsmultiplikator (Corpus)`,
292 291 cheats_nemesisExtraWeapon: `Zusätzliche Nemesis-Waffe/-Symbol bei Besiegung (0 zum deaktivieren)`,
292 cheats_noHubDiscrimination: `[UNTRANSLATED] No Hub Discrimination`,
293 293
294 294 worldState: `Weltstatus`,
295 295 worldState_creditBoost: `Event Booster: Credit`,
Modified static/webui/translations/en.js +1 -1
@@ -231,7 +231,6 @@ dict = {
231 231 cheats_dontSubtractVoidTraces: `Don't Subtract Void Traces`,
232 232 cheats_dontSubtractConsumables: `Don't Subtract Consumables`,
233 233 cheats_unlockAllShipFeatures: `Unlock All Ship Features`,
234 cheats_unlockAllSkins: `Unlock All Skins`,
235 234 cheats_unlockAllCapturaScenes: `Unlock All Captura Scenes`,
236 235 cheats_universalPolarityEverywhere: `Universal Polarity Everywhere`,
237 236 cheats_unlockDoubleCapacityPotatoesEverywhere: `Potatoes Everywhere`,
@@ -289,6 +288,7 @@ dict = {
289 288 cheats_nemesisHintProgressMultiplierGrineer: `Hint Progress Multiplier (Grineer)`,
290 289 cheats_nemesisHintProgressMultiplierCorpus: `Hint Progress Multiplier (Corpus)`,
291 290 cheats_nemesisExtraWeapon: `Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
291 cheats_noHubDiscrimination: `No Hub Discrimination`,
292 292
293 293 worldState: `World State`,
294 294 worldState_creditBoost: `Credit Boost`,
Modified static/webui/translations/es.js +1 -1
@@ -232,7 +232,6 @@ dict = {
232 232 cheats_dontSubtractVoidTraces: `No descontar vestigios del Vacío`,
233 233 cheats_dontSubtractConsumables: `No restar consumibles`,
234 234 cheats_unlockAllShipFeatures: `Desbloquear todas las funciones de nave`,
235 cheats_unlockAllSkins: `Desbloquear todas las skins`,
236 235 cheats_unlockAllCapturaScenes: `Desbloquear todas las escenas de Captura`,
237 236 cheats_universalPolarityEverywhere: `Polaridad universal en todas partes`,
238 237 cheats_unlockDoubleCapacityPotatoesEverywhere: `Patatas en todas partes`,
@@ -290,6 +289,7 @@ dict = {
290 289 cheats_nemesisHintProgressMultiplierGrineer: `[UNTRANSLATED] Hint Progress Multiplier (Grineer)`,
291 290 cheats_nemesisHintProgressMultiplierCorpus: `[UNTRANSLATED] Hint Progress Multiplier (Corpus)`,
292 291 cheats_nemesisExtraWeapon: `[UNTRANSLATED] Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
292 cheats_noHubDiscrimination: `[UNTRANSLATED] No Hub Discrimination`,
293 293
294 294 worldState: `Estado del mundo`,
295 295 worldState_creditBoost: `Potenciador de Créditos`,
Modified static/webui/translations/fr.js +1 -1
@@ -232,7 +232,6 @@ dict = {
232 232 cheats_dontSubtractVoidTraces: `Ne pas consommer de Void Traces`,
233 233 cheats_dontSubtractConsumables: `Ne pas retirer de consommables`,
234 234 cheats_unlockAllShipFeatures: `Débloquer tous les segments du vaisseau`,
235 cheats_unlockAllSkins: `Débloquer tous les skins`,
236 235 cheats_unlockAllCapturaScenes: `Débloquer toutes les scènes captura`,
237 236 cheats_universalPolarityEverywhere: `Polarités universelles partout`,
238 237 cheats_unlockDoubleCapacityPotatoesEverywhere: `Réacteurs et Catalyseurs partout`,
@@ -290,6 +289,7 @@ dict = {
290 289 cheats_nemesisHintProgressMultiplierGrineer: `Multiplicateur d'indices (Grineer)`,
291 290 cheats_nemesisHintProgressMultiplierCorpus: `Multiplicateur d'indices (Corpus)`,
292 291 cheats_nemesisExtraWeapon: `Arme de Nemesis/jeton supplémentaire sur exécution (0 pour désactiver)`,
292 cheats_noHubDiscrimination: `[UNTRANSLATED] No Hub Discrimination`,
293 293
294 294 worldState: `Carte Solaire`,
295 295 worldState_creditBoost: `Booster de Crédit`,
Modified static/webui/translations/ru.js +1 -1
@@ -232,7 +232,6 @@ dict = {
232 232 cheats_dontSubtractVoidTraces: `Не вычитать количество Отголосков Бездны`,
233 233 cheats_dontSubtractConsumables: `Не вычитать количество расходников`,
234 234 cheats_unlockAllShipFeatures: `Разблокировать все функции корабля`,
235 cheats_unlockAllSkins: `Разблокировать все скины`,
236 235 cheats_unlockAllCapturaScenes: `Разблокировать все сцены Каптуры`,
237 236 cheats_universalPolarityEverywhere: `Универсальная полярность везде`,
238 237 cheats_unlockDoubleCapacityPotatoesEverywhere: `Реакторы/Катализаторы орокин везде`,
@@ -290,6 +289,7 @@ dict = {
290 289 cheats_nemesisHintProgressMultiplierGrineer: `Мультипликатор прогресса подсказки (Гринир)`,
291 290 cheats_nemesisHintProgressMultiplierCorpus: `Мультипликатор прогресса подсказки (Корпус)`,
292 291 cheats_nemesisExtraWeapon: `Дополнительное оружие/активный Кардиомиоцит за победу над Противником (0 для отключения)`,
292 cheats_noHubDiscrimination: `[UNTRANSLATED] No Hub Discrimination`,
293 293
294 294 worldState: `Состояние мира`,
295 295 worldState_creditBoost: `Глобальный бустер Кредитов`,
Modified static/webui/translations/uk.js +1 -1
@@ -232,7 +232,6 @@ dict = {
232 232 cheats_dontSubtractVoidTraces: `Не вираховувати кількість Відлуння`,
233 233 cheats_dontSubtractConsumables: `Не вираховувати кількість витратних матеріалів`,
234 234 cheats_unlockAllShipFeatures: `Розблокувати всі функції судна`,
235 cheats_unlockAllSkins: `Розблокувати всі скіни`,
236 235 cheats_unlockAllCapturaScenes: `Розблокувати всі сцени Світлописця`,
237 236 cheats_universalPolarityEverywhere: `Будь-яка полярність скрізь`,
238 237 cheats_unlockDoubleCapacityPotatoesEverywhere: `Орокінські Реактори/Каталізатори скрізь`,
@@ -290,6 +289,7 @@ dict = {
290 289 cheats_nemesisHintProgressMultiplierGrineer: `Множник прогресу підсказки (Ґрінери)`,
291 290 cheats_nemesisHintProgressMultiplierCorpus: `Множник прогресу підсказки (Корпус)`,
292 291 cheats_nemesisExtraWeapon: `Додаткова зброя/Жива сердцевина за перемогу над Недругом (0 для вимкнення)`,
292 cheats_noHubDiscrimination: `[UNTRANSLATED] No Hub Discrimination`,
293 293
294 294 worldState: `Стан світу`,
295 295 worldState_creditBoost: `Глобальне посилення Кредитів`,
Modified static/webui/translations/zh.js +1 -1
@@ -232,7 +232,6 @@ dict = {
232 232 cheats_dontSubtractVoidTraces: `虚空光体无消耗`,
233 233 cheats_dontSubtractConsumables: `消耗物品使用时无损耗`,
234 234 cheats_unlockAllShipFeatures: `解锁所有飞船功能`,
235 cheats_unlockAllSkins: `解锁所有外观`,
236 235 cheats_unlockAllCapturaScenes: `解锁所有Captura场景`,
237 236 cheats_universalPolarityEverywhere: `全局万用极性`,
238 237 cheats_unlockDoubleCapacityPotatoesEverywhere: `全物品自带Orokin反应堆`,
@@ -290,6 +289,7 @@ dict = {
290 289 cheats_nemesisHintProgressMultiplierGrineer: `解密进度倍率 (Grineer)`,
291 290 cheats_nemesisHintProgressMultiplierCorpus: `解密进度倍率 (Corpus)`,
292 291 cheats_nemesisExtraWeapon: `额外玄骸武器/代币 (0为禁用)`,
292 cheats_noHubDiscrimination: `[UNTRANSLATED] No Hub Discrimination`,
293 293
294 294 worldState: `世界状态配置`,
295 295 worldState_creditBoost: `现金加成`,