diff --git a/assets/database/locales/global/ch.json b/assets/database/locales/global/ch.json index 15ac3bf3..592a89f7 100644 --- a/assets/database/locales/global/ch.json +++ b/assets/database/locales/global/ch.json @@ -26,8 +26,8 @@ "F_Client_SavedProfile": "个人资料 {0} 已保存到 {1}", "F_Client_UnknownError": "出现了一个未知异常,请检查您的日志文件", "F_Client_HostCannotExtract": "在所有客户端断开连接之前,您不能退出游戏", - "F_Client_HostCannotExtractMenu": "您不能现在断开连接,仍然有连接中的客戶端!剩余: {0}", - "F_Client_Wait5Seconds": "请在最后一个客戶端断开后至少5秒才退出", + "F_Client_HostCannotExtractMenu": "您不能现在断开连接,仍然有连接中的客户端!剩余: {0}", + "F_Client_Wait5Seconds": "请在最后一个客户端断开后至少5秒才退出", "F_Client_StartingRaid": "正在开始行动,请稍候...", "F_Client_LostConnection": "与主机失去连接。", "F_Client_StartingRaidOnDedicated": "正在使用专用客户端开始行动... 请稍等", @@ -37,7 +37,7 @@ "F_MMUI_HostRaidButton": "主持一个行动", "F_MMUI_JoinButton": "加入", "F_MMUI_SelectAmountHeader": "选择一个数量", - "F_MMUI_SessionSettingsHeader": "SESSION SETTINGS", + "F_MMUI_SessionSettingsHeader": "会话设置", "F_MMUI_SelectAmountDescription": "将有多少人(包括您) 在玩?", "F_MMUI_UseDedicatedHost": "使用专用主机", "F_MMUI_StartButton": "开始", @@ -53,25 +53,26 @@ "F_UI_HostStillLoading": "主机仍在加载中。", "F_UI_RaidInProgress": "游戏已经开始了!", "F_UI_ReJoinRaid": "点击以重新加入", - "F_UI_CannotReJoinRaidDied": "不能重新加入你已經陣亡的行動", - "F_UI_JoinRaid": "點擊以加入行動", + "F_UI_CannotReJoinRaidDied": "不能重新加入你已经阵亡的行动", + "F_UI_JoinRaid": "点击以加入行动", "F_UI_ErrorConnecting": "连接错误", "F_UI_UnableToConnect": "无法连接到服务器。请确保所有端口已打开,所有设置配置正确。", "F_UI_FikaPingerFailStart": "无法启动 FikaPinger !", - "F_UI_RefreshRaids": "刷新進行中的行動列表。", + "F_UI_RefreshRaids": "刷新进行中的行动列表。", "F_UI_DedicatedError": "FIKA专用服务器错误", - "F_UI_ErrorForceIPHeader": "強制使用IP错误", - "F_UI_ErrorForceIP": "{0} 不是一个有效的連結IP地址!请检查“强制IP”设置", + "F_UI_ErrorForceIPHeader": "强制使用IP错误", + "F_UI_ErrorForceIP": "{0} 不是一个有效的可以连接的IP地址!请检查“强制IP”设置", "F_UI_ErrorBindIPHeader": "错误绑定", - "F_UI_ErrorBindIP": "{0} 不是一个有效的綁定IP地址!请检查“强制IP”设置", - "F_UI_NoDedicatedClients": "現在没有可用的专用客户端。", + "F_UI_ErrorBindIP": "{0} 不是一个有效的绑定IP地址!请检查“强制IP”设置", + "F_UI_NoDedicatedClients": "现在没有可用的专用客户端。", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "正在等待主机完成战局初始化", "F_UI_WaitForOtherPlayers": "正在等待其他玩家完成加载", "F_UI_RetrieveSpawnInfo": "正在从服务器获取生成信息...", "F_UI_RetrieveLoot": "正在从服务器获取战利品信息...", "F_UI_WaitForHostInit": "正在等待主机初始化战局...", "F_UI_Reconnecting": "重新连接中...", - "F_UI_RetrieveExfilData": "正在从服务器获取撤離點数据...", + "F_UI_RetrieveExfilData": "正在从服务器获取撤离点数据...", "F_UI_RetrieveInteractables": "正在从服务器获取可交互对象...", "F_UI_InitCoopGame": "正在初始化合作游戏...", "F_UI_AllPlayersJoined": "所有玩家已加入,正在开始游戏...", @@ -82,10 +83,10 @@ "F_UI_SyncInteractables": "正在同步可交互物件...", "F_UI_SyncLampStates": "正在同步灯具状态...", "F_UI_SyncWindows": "同步窗具中...", - "F_UI_ReceiveOwnPlayer": "正在接收自己的玩家數據...", + "F_UI_ReceiveOwnPlayer": "正在接收自己的玩家数据...", "F_UI_FinishReconnect": "正在完成重新连接...", "F_Client_FreeCamInputDisabled": "自由视角输入已禁用", - "F_Client_FreeCamInputEnabled": "自由视角输入已啟用", + "F_Client_FreeCamInputEnabled": "自由视角输入已启用", "F_UI_WaitForPlayer": "正在等待 {0} 位玩家", "F_UI_WaitForPlayers": "正在等待 {0} 位玩家", "F_UI_ToSLong": "欢迎来到Fika!\n\nFika 是一个SPT的合作模组,允许您与朋友一起玩。 如果您为此付了钱,说明你被骗了,Fika是免费的。 您也不允许建立付费或需要捐赠的公共服务器。\n\n等待此消息自动消失来接受我们的服务条款。\n\n您可以在这里加入我们的Discord: https://discord.gg/project-fika", @@ -244,6 +245,6 @@ "F_MMUI_InHideout": "在藏身处中", "F_MMUI_InFlea": "在跳蚤市场中", "F_MMUI_RaidDetails": "作为 {0} 在 {1} 上游玩\n时间:{2}", - "F_UI_LocaleError_H": "LOCALES ERROR", - "F_UI_LocaleError_D": "There were errors when loading the Fika locales. Translation is now using fallbacks for the failed headers. Please report this to the developers!\n\nFailed keys: {0}" + "F_UI_LocaleError_H": "语言文件错误", + "F_UI_LocaleError_D": "加载Fika语言时发生错误。现在正在为失效的翻译条目切换为后备模式。 请将此报告给开发者!\n\n失效的文本键值: {0}" } \ No newline at end of file diff --git a/assets/database/locales/global/cz.json b/assets/database/locales/global/cz.json index 46d7a1ed..8b829c4d 100644 --- a/assets/database/locales/global/cz.json +++ b/assets/database/locales/global/cz.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "CHYBA BINDOVÁNÍ", "F_UI_ErrorBindIP": "{0} není platná IP adresa pro připojení! Zkontrolujte nastavení 'Vynutit Bindování IP'.", "F_UI_NoDedicatedClients": "Dedikovaný klient není k dispozici.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Čekáme na zakladatele hry aby dokončil raid inicializaci...", "F_UI_WaitForOtherPlayers": "Čekání na ostatní hráče co se načítají...", "F_UI_RetrieveSpawnInfo": "Obdržuji informace o spawnu ze serveru...", diff --git a/assets/database/locales/global/en.json b/assets/database/locales/global/en.json index 321bc5db..48cf96ad 100644 --- a/assets/database/locales/global/en.json +++ b/assets/database/locales/global/en.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "ERROR BINDING", "F_UI_ErrorBindIP": "'{0}' is not a valid IP address to bind to! Check your 'Force Bind IP' setting.", "F_UI_NoDedicatedClients": "No dedicated clients are available.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Waiting for host to finish raid initialization...", "F_UI_WaitForOtherPlayers": "Waiting for other players to finish loading...", "F_UI_RetrieveSpawnInfo": "Retrieving spawn info from server...", diff --git a/assets/database/locales/global/es-mx.json b/assets/database/locales/global/es-mx.json index 247cea46..bcb918e6 100644 --- a/assets/database/locales/global/es-mx.json +++ b/assets/database/locales/global/es-mx.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "ERROR ENLAZANDO", "F_UI_ErrorBindIP": "'{0}' no es una dirección IP válida para enlazar! Compruebe su configuración de 'Forzar enlace IP'.", "F_UI_NoDedicatedClients": "No hay clientes dedicados disponibles.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Esperando por el anfitrión para inicializar de la incursión...", "F_UI_WaitForOtherPlayers": "Esperando por otros jugadores para terminar la carga...", "F_UI_RetrieveSpawnInfo": "Recuperando información de aparición del servidor...", diff --git a/assets/database/locales/global/es.json b/assets/database/locales/global/es.json index c79bb170..c003d0ec 100644 --- a/assets/database/locales/global/es.json +++ b/assets/database/locales/global/es.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "ERROR DE UNIÓN", "F_UI_ErrorBindIP": "'{0}' no es una IP válida a la que forzar la unión! Comprueba tus ajustes de 'Forzar Unión de IP'.", "F_UI_NoDedicatedClients": "No hay clientes dedicados disponibles.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Esperando a que el anfitrión inicialice la partida...", "F_UI_WaitForOtherPlayers": "Esperando a que otros jugadores terminen de cargar...", "F_UI_RetrieveSpawnInfo": "Recuperando información de reaparición del servidor...", diff --git a/assets/database/locales/global/fr.json b/assets/database/locales/global/fr.json index 615540bd..0c77f429 100644 --- a/assets/database/locales/global/fr.json +++ b/assets/database/locales/global/fr.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "ERREUR AFFECTATION IP", "F_UI_ErrorBindIP": "'{0}' n'est pas une adresse IP valide ! Vérifiez le paramètre 'Force Bind IP'.", "F_UI_NoDedicatedClients": "Aucun client dédié n'est disponible.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "En attente de la fin de l'initialisation du raid par l'hôte...", "F_UI_WaitForOtherPlayers": "En attente du chargement des autres joueurs...", "F_UI_RetrieveSpawnInfo": "Récupération des informations d'apparitions depuis le serveur...", diff --git a/assets/database/locales/global/ge.json b/assets/database/locales/global/ge.json index 8b62009f..73546baf 100644 --- a/assets/database/locales/global/ge.json +++ b/assets/database/locales/global/ge.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "Fehler beim IP Binding", "F_UI_ErrorBindIP": "'{0}' ist keine gültige IP-Adresse zum BINDING! Überprüfe die 'Force Bind IP'-Einstellung.", "F_UI_NoDedicatedClients": "Keine dedizierten Clients verfügbar.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Warte darauf, dass der Host die Initialisierung des Raids vollendet...", "F_UI_WaitForOtherPlayers": "Warte darauf, dass andere Spieler das Laden beendet haben...", "F_UI_RetrieveSpawnInfo": "Spawn-Info wird vom Server abgerufen...", diff --git a/assets/database/locales/global/hu.json b/assets/database/locales/global/hu.json index 260d4558..8d643cec 100644 --- a/assets/database/locales/global/hu.json +++ b/assets/database/locales/global/hu.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "KÖTÉSI HIBA", "F_UI_ErrorBindIP": "A '{0}' nem érvényes IP-cím a kötéshez! Ellenőrizze a „Force Bind IP” beállítást.", "F_UI_NoDedicatedClients": "Nincsenek dedikált kliensek.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Várakozás, hogy a host befejezze a raid inicializálását...", "F_UI_WaitForOtherPlayers": "Várakozás, amíg a többi játékos befejezi a betöltést...", "F_UI_RetrieveSpawnInfo": "Spawn információk lekérése a szerverről...", diff --git a/assets/database/locales/global/it.json b/assets/database/locales/global/it.json index 1103e27d..c012e58d 100644 --- a/assets/database/locales/global/it.json +++ b/assets/database/locales/global/it.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "ERRORE BINDING", "F_UI_ErrorBindIP": "'{0}' non è un indirizzo IP valido per il binding! Controlla l'impostazione 'Forza Bind IP'.", "F_UI_NoDedicatedClients": "Nessun client dedicato è disponibile.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "In attesa che l'host concluda l'inizializzazione del raid...", "F_UI_WaitForOtherPlayers": "In attesa che gli altri giocatori finiscano di caricare...", "F_UI_RetrieveSpawnInfo": "Recupero informazioni di generazione dal server...", diff --git a/assets/database/locales/global/jp.json b/assets/database/locales/global/jp.json index e136ca84..1d3c7cb5 100644 --- a/assets/database/locales/global/jp.json +++ b/assets/database/locales/global/jp.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "バインドエラー", "F_UI_ErrorBindIP": "'{0}' はバインドするための有効なIPアドレスではありません! 'Force Bind IP' 設定を確認してください。", "F_UI_NoDedicatedClients": "専用クライアントは利用できません。", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "ホストがレイドの初期化を終えるのを待っています…", "F_UI_WaitForOtherPlayers": "他のプレイヤーが読み込みを終えるのを待っています…", "F_UI_RetrieveSpawnInfo": "サーバーからスポーン情報を取得しています…", diff --git a/assets/database/locales/global/kr.json b/assets/database/locales/global/kr.json index b312730a..97a7ab14 100644 --- a/assets/database/locales/global/kr.json +++ b/assets/database/locales/global/kr.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "바인딩 에러", "F_UI_ErrorBindIP": "{0} 은 바인드하기 유효한 IP주소가 아닙니다. IP 강제 바인드 설정을 확인해주십시오.", "F_UI_NoDedicatedClients": "사용가능한 전담 클라이언트가 없습니다.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "호스트의 레이드 초기화 대기중", "F_UI_WaitForOtherPlayers": "다른 플레이어들의 로딩 대기중", "F_UI_RetrieveSpawnInfo": "서버에서 스폰 정보 받아오는중", diff --git a/assets/database/locales/global/pl.json b/assets/database/locales/global/pl.json index 403f7304..e79cff61 100644 --- a/assets/database/locales/global/pl.json +++ b/assets/database/locales/global/pl.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "BŁĄD POWIĄZANIA", "F_UI_ErrorBindIP": "'{0}' nie jest prawidłowym adresem IP do powiązania! Sprawdź ustawienie 'Wymuś powiązanie IP'.", "F_UI_NoDedicatedClients": "Brak dostępnych dedykowanych klientów.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Oczekiwanie na zakończenie inicjalizacji raidu przez gospodarza...", "F_UI_WaitForOtherPlayers": "Oczekiwanie na zakończenie ładowania pozostałych graczy...", "F_UI_RetrieveSpawnInfo": "Pobieranie informacji o spawnie z serwera...", diff --git a/assets/database/locales/global/po.json b/assets/database/locales/global/po.json index 618c23ef..5c906de7 100644 --- a/assets/database/locales/global/po.json +++ b/assets/database/locales/global/po.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "ERRO DE VINCULAÇÃO", "F_UI_ErrorBindIP": "'{0}' não é um endereço IP válido para vincular! Verifique sua configuração 'Forçar vinculação de IP'.", "F_UI_NoDedicatedClients": "Não há clientes dedicados disponíveis.", + "F_UI_WaitForHostStartRaid": "Esperando o anfitrião iniciar a incursão...", "F_UI_WaitForHostFinishInit": "Esperando o host terminar a inicialização da incursão...", "F_UI_WaitForOtherPlayers": "Esperando que outros jogadores terminem de carregar...", "F_UI_RetrieveSpawnInfo": "Recuperando informações de spawn do servidor...", @@ -244,6 +245,6 @@ "F_MMUI_InHideout": "No esconderijo", "F_MMUI_InFlea": "Na pulga", "F_MMUI_RaidDetails": "Jogando como {0} em {1}\nHora: {2}", - "F_UI_LocaleError_H": "LOCALES ERROR", - "F_UI_LocaleError_D": "There were errors when loading the Fika locales. Translation is now using fallbacks for the failed headers. Please report this to the developers!\n\nFailed keys: {0}" + "F_UI_LocaleError_H": "ERRO NAS LOCALIZAÇÕES", + "F_UI_LocaleError_D": "Houve erros ao carregar as localizações do Fika. A tradução agora está usando os originais para os cabeçalhos que falharam. Por favor, reporte isso para os desenvolvedores!\n\nChaves falhas: {0}" } \ No newline at end of file diff --git a/assets/database/locales/global/ro.json b/assets/database/locales/global/ro.json index cda85fda..923e4420 100644 --- a/assets/database/locales/global/ro.json +++ b/assets/database/locales/global/ro.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "EROAREDE DE LEGARE", "F_UI_ErrorBindIP": "„{0}” nu este o adresă IP validă la care să vă legați! Verificați setarea „Forțare legare IP”.", "F_UI_NoDedicatedClients": "Nu sunt disponibili clienți dedicați.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Se așteaptă ca gazda să termine inițializarea raidului...", "F_UI_WaitForOtherPlayers": "Se așteaptă ca alți jucători să termine încărcarea...", "F_UI_RetrieveSpawnInfo": "Se preiau informații despre punctele de apariție de pe server...", diff --git a/assets/database/locales/global/ru.json b/assets/database/locales/global/ru.json index ee1a7ff8..0f424caf 100644 --- a/assets/database/locales/global/ru.json +++ b/assets/database/locales/global/ru.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "ОШИБКА ЗАПИСИ", "F_UI_ErrorBindIP": "'{0}' не является допустимым IP-адресом для привязки! Проверьте параметр 'Принудительная привязка к IP'.", "F_UI_NoDedicatedClients": "Нет выделенных клиентов.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Ожидание завершения инициализации рейда...", "F_UI_WaitForOtherPlayers": "Ожидание загрузки других игроков...", "F_UI_RetrieveSpawnInfo": "Получение информации о спавне с сервера...", diff --git a/assets/database/locales/global/sk.json b/assets/database/locales/global/sk.json index d074a5f5..cfe567f8 100644 --- a/assets/database/locales/global/sk.json +++ b/assets/database/locales/global/sk.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "CHYBA PRIRADZOVANIA", "F_UI_ErrorBindIP": "'{0}' nie je validna IP adresa pre priradenie! Prosím skontroluj 'Force IP' nastavenie.", "F_UI_NoDedicatedClients": "Žiadny dedikovaný klienti nie sú dostupný.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Čakám na hosta kým inicializuje raid...", "F_UI_WaitForOtherPlayers": "Čakám na načítanie ostatných hráčov...", "F_UI_RetrieveSpawnInfo": "Získavam dáta o spawne zo serveru...", diff --git a/assets/database/locales/global/tu.json b/assets/database/locales/global/tu.json index c71309f9..8c04df96 100644 --- a/assets/database/locales/global/tu.json +++ b/assets/database/locales/global/tu.json @@ -65,6 +65,7 @@ "F_UI_ErrorBindIPHeader": "HATA BAĞLANTISI", "F_UI_ErrorBindIP": "'{0}' bağlanmak için geçerli bir IP adresi değil! 'IP'yi Bağlamaya Zorla' ayarınızı kontrol edin.", "F_UI_NoDedicatedClients": "Özel istemci bulunmamaktadır.", + "F_UI_WaitForHostStartRaid": "Waiting for host to start the raid...", "F_UI_WaitForHostFinishInit": "Ana bilgisayarın raid başlatmayı bitirmesi bekleniyor...", "F_UI_WaitForOtherPlayers": "Diğer oyuncuların yüklemeyi bitirmesini bekleniliyor...", "F_UI_RetrieveSpawnInfo": "Sunucudan spawn bilgisi alınıyor...", diff --git a/src/Fika.ts b/src/Fika.ts index 9b48f507..7150a109 100644 --- a/src/Fika.ts +++ b/src/Fika.ts @@ -14,6 +14,9 @@ import { FikaPlayerRelationsCacheService } from "./services/cache/FikaPlayerRela import { FikaDedicatedProfileService } from "./services/dedicated/FikaDedicatedProfileService"; import { FikaConfig } from "./utils/FikaConfig"; import { FikaServerTools } from "./utils/FikaServerTools"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @injectable() export class Fika { @@ -24,6 +27,7 @@ export class Fika { constructor( @inject("DatabaseServer") protected databaseServer: DatabaseServer, + @inject("ConfigServer") protected configServer: ConfigServer, @inject("Overrider") protected overrider: Overrider, @inject("FikaServerTools") protected fikaServerTools: FikaServerTools, @inject("FikaConfig") protected fikaConfig: FikaConfig, @@ -52,6 +56,7 @@ export class Fika { } this.addFikaClientLocales(); + this.blacklistSpecialProfiles(); this.fikaPlayerRelationCacheServce.postInit(); if (this.backgroundConfig.enable) { @@ -75,4 +80,19 @@ export class Fika { } } } + + private async blacklistSpecialProfiles() { + const coreConfig: ICoreConfig = this.configServer.getConfig(ConfigTypes.CORE); + const profileBlacklist = coreConfig.features.createNewProfileTypesBlacklist; + + if (!this.fikaConfig.getConfig().server.showDevProfile) { + profileBlacklist.push("SPT Developer"); + } + + if (!this.fikaConfig.getConfig().server.showNonStandardProfile) { + for (const id of ["Tournament", "SPT Easy start", "SPT Zero to hero"]) { + profileBlacklist.push(id); + } + } + } } diff --git a/src/di/Container.ts b/src/di/Container.ts index ecda774b..43fd5cdd 100644 --- a/src/di/Container.ts +++ b/src/di/Container.ts @@ -10,7 +10,6 @@ import { DialogueControllerOverride } from "../overrides/controllers/DialogueCon import { ProfileControllerOverride } from "../overrides/controllers/ProfileController"; // import { LocalesOverride } from "../overrides/other/Locales"; import { HttpRouterOverride } from "../overrides/routers/HttpRouter"; -import { LauncherControllerOverride } from "../overrides/controllers/LauncherController"; import { MatchControllerOverride } from "../overrides/controllers/MatchController"; import { FikaMatchService } from "../services/FikaMatchService"; @@ -86,7 +85,6 @@ export class Container { container.registerType("Overrides", "HttpRouterOverride"); // container.registerType("Overrides", "LocalesOverride"); container.registerType("Overrides", "AchievementControllerOverride"); - container.registerType("Overrides", "LauncherControllerOverride"); container.registerType("Overrides", "LocationLifecycleServiceOverride"); container.registerType("Overrides", "MatchControllerOverride"); @@ -117,7 +115,6 @@ export class Container { // container.register("LocalesOverride", LocalesOverride, { lifecycle: Lifecycle.Singleton }); container.register("Overrider", Overrider, { lifecycle: Lifecycle.Singleton }); container.register("AchievementControllerOverride", AchievementControllerOverride, { lifecycle: Lifecycle.Singleton }); - container.register("LauncherControllerOverride", LauncherControllerOverride, { lifecycle: Lifecycle.Singleton }); container.register("LocationLifecycleServiceOverride", LocationLifecycleServiceOverride, { lifecycle: Lifecycle.Singleton }); container.register("MatchControllerOverride", MatchControllerOverride, { lifecycle: Lifecycle.Singleton }); } diff --git a/src/overrides/controllers/LauncherController.ts b/src/overrides/controllers/LauncherController.ts deleted file mode 100644 index 230c949a..00000000 --- a/src/overrides/controllers/LauncherController.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { DependencyContainer, inject, injectable } from "tsyringe"; - -import { LauncherController } from "@spt/controllers/LauncherController"; -import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { DatabaseService } from "@spt/services/DatabaseService"; -import { ConfigServer } from "@spt/servers/ConfigServer"; -import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; -import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; - -import { FikaConfig } from "../../utils/FikaConfig"; -import { Override } from "../../di/Override"; -import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; - -@injectable() -export class LauncherControllerOverride extends Override { - protected coreConfig: ICoreConfig; - - constructor( - @inject("LauncherController") protected launcherController: LauncherController, - @inject("HttpServerHelper") protected httpServerHelper: HttpServerHelper, - @inject("DatabaseService") protected databaseService: DatabaseService, - @inject("ConfigServer") protected configServer: ConfigServer, - @inject("FikaConfig") protected fikaConfig: FikaConfig, - ) { - super(); - - this.coreConfig = this.configServer.getConfig(ConfigTypes.CORE); - } - - public execute(container: DependencyContainer): void { - container.afterResolution( - "LauncherController", - (_t, result: LauncherController) => { - result.connect = (): IConnectResponse => { - let editions = this.databaseService.getProfiles(); - - if (!this.fikaConfig.getConfig().server.showDevProfile) { - // biome-ignore lint/performance/noDelete: Only ran once. - delete editions["SPT Developer"]; - } - - if (!this.fikaConfig.getConfig().server.showNonStandardProfile) { - for (const id of ["Tournament", "SPT Easy start", "SPT Zero to hero"]) { - delete editions[id]; - } - } - - // Stop TS from throwing a tantrum over protected methods - const launchController = this.launcherController as any; - - return { - backendUrl: this.httpServerHelper.getBackendUrl(), - name: this.coreConfig.serverName, - editions: Object.keys(editions), - profileDescriptions: launchController.getProfileDescriptions(), - }; - }; - }, - { frequency: "Always" }, - ); - } -}