Allow custom profiles to use localied descriptions

Fixed an inconsistently named locale key

Added logger to LauncherController
This commit is contained in:
Dev 2023-11-15 11:16:56 +00:00
parent fcb1e2c2f3
commit 3b053b741b
12 changed files with 41453 additions and 44609 deletions

View File

@ -593,8 +593,9 @@
"launcher-profile_standard": "Same as live, basic stash size (10x28), 500,000 roubles",
"launcher-profile_leftbehind": "Same as Standard plus; larger stash size (10x38), extra equipment/items, 500 dollars",
"launcher-profile_preparetoescape": "Same as Left Behind plus; larger stash size (10x48), extra equipment/items, higher starting reputation with traders, 250 euros",
"launcher-edgeofdarkness": "Same as Prepare To Escape plus; larger stash size (10x68), extra equipment/items, higher starting reputation with traders, 1000 dollars, 500 euros",
"launcher-profile-edgeofdarkness": "Same as Prepare To Escape plus; larger stash size (10x68), extra equipment/items, higher starting reputation with traders, 1000 dollars, 500 euros",
"launcher-profile_spteasystart": "Lots of Roubles/Dollars/Euros, Some QoL skills are level 20, trader rep maxed, starting level is 69, no quests completed",
"launcher-profile_sptzerotohero": "Start with almost nothing, no Roubles/Dollars/Euros, no trader rep, 1 knife, no quests completed",
"launcher-profile_sptdeveloper": "Testing profile, starting level is 69, lots of Roubles/Dollars/Euros, USEC start with all quests ready to start, BEAR start with all quests ready to hand in, invincibility balaclava"
"launcher-profile_sptdeveloper": "Testing profile, starting level is 69, lots of Roubles/Dollars/Euros, USEC start with all quests ready to start, BEAR start with all quests ready to hand in, invincibility balaclava",
"launcher-missing_property": "Profile: %s is missing a descriptionLocaleKey property"
}

View File

@ -402,7 +402,7 @@
"launcher-profile_standard": "Igual que en multijugador, el tamaño básico del escondite (10x28), 500.000 rublos",
"launcher-profile_leftbehind": "Igual que Standard plus; mayor tamaño de inventario(10x38), equipamiento extra, 500 dólares",
"launcher-profile_preparetoescape": "Igual que Left Behind plus; mayor tamaño de inventario (10x48), equipamiento adicional/artículos, mayor reputación inicial con los comerciantes, 250 euros",
"launcher-edgeofdarkness": "Igual que Prepare to Escape plus; mayor tamaño de escondite (10x68), equipo adicional/artículos, mayor reputación inicial con los comerciantes, 1000 dólares, 500 euros",
"launcher-profile-edgeofdarkness": "Igual que Prepare to Escape plus; mayor tamaño de escondite (10x68), equipo adicional/artículos, mayor reputación inicial con los comerciantes, 1000 dólares, 500 euros",
"launcher-profile_spteasystart": "Muchos rublos/dólares/euros, algunas habilidades de QoL son de nivel 20, la reputación de los comerciantes al máximo, el nivel inicial es 69, no hay misiones completadas",
"launcher-profile_sptzerotohero": "Comienza con casi nada, sin rublos/dólares/euros, sin reputación de comerciantes, 1 cuchillo y sin misiones completadas",
"launcher-profile_sptdeveloper": "Prefil de prueba, el nivel inicial es 69, muchos rublos/dólares/euros, USEC comienza con todas las misiones listas para empezar, BEAR comienza con todas las misiones listas para entregar, pasamontañas de invencibilidad"

View File

@ -553,7 +553,7 @@
"launcher-profile_standard": "Edition Standard, stash basique (10x28), 500 000 roubles",
"launcher-profile_leftbehind": "Edition Left Behind, stash moyenne (10x38), équipement en plus, 500 dollars",
"launcher-profile_preparetoescape": "Edition Prepare for Escape, stash grande (10x48), plus d'équipement, meilleure rép de démarrage vendeurs, 250 euros",
"launcher-edgeofdarkness": "Edition EoD, stash de taille maximale (10x68), un max d'équipement, gros boost avec la rép des traders, 1000 dollars, 500 euros",
"launcher-profile-edgeofdarkness": "Edition EoD, stash de taille maximale (10x68), un max d'équipement, gros boost avec la rép des traders, 1000 dollars, 500 euros",
"launcher-profile_spteasystart": "SPT mode touriste. Beaucoup de Roubles/Dollars/Euros, certains skills confort sont à 20, réputation traders maximale, level de départ à 69. Aucune quête validée",
"launcher-profile_sptzerotohero": "SPT zero to hero ! Tu démarres avec rien, juste ta bite et ton couteau ! Aucune quête validée",
"launcher-profile_sptdeveloper": "SPT dév/testing/debug, lvl 69, max Roubles/Dollars/Euros, USEC ==> toutes les quêtes prêtes à être débutées, BEAR ==> toutes les quêtes terminées prêtes à être validées, item balaclava d'invincibilité"

View File

@ -208,7 +208,7 @@
"launcher-profile_standard": "Uguale al profilo standard di live EFT, dimensioni standard del nascondiglio (10x28), 500,000 rubli",
"launcher-profile_leftbehind": "Uguale al profilo standard di live EFT ed in più; dimensioni del nascondiglio aumentato (10x38), oggetti/equipaggiamento extra, 500 dollari",
"launcher-profile_preparetoescape": "Uguale al profilo Left Behind di live EFT ed in più; dimensioni del nascondiglio aumentato (10x48), oggetti/equipaggiamento extra, reputazione con i mercanti più alta, 250 euro",
"launcher-edgeofdarkness": "Uguale al profilo Prepare to Escape di live EFT ed in più; dimensioni del nascondiglio massime (10x68), oggetti/equipaggiamento extra, reputazione con i mercanti più alta, 1000 dollari, 500 euro",
"launcher-profile-edgeofdarkness": "Uguale al profilo Prepare to Escape di live EFT ed in più; dimensioni del nascondiglio massime (10x68), oggetti/equipaggiamento extra, reputazione con i mercanti più alta, 1000 dollari, 500 euro",
"launcher-profile_spteasystart": "Gran numero di Rubli/Dollari/Euro, alcune abilità utili sono già livello 20, reputazione con i mercanti al massimo, i PMC iniziano al livello 69, nessuna missione completata",
"launcher-profile_sptzerotohero": "Inizi con quasi nulla, niente Rubli/Dollari/Euro, reputazione mercanti a zero, un coltello, nessuna missione completata",
"launcher-profile_sptdeveloper": "Profile per testare, i PMC iniziano al livello 69, molti Rubli/Dollari/Euro, USEC cominciano con tutte le quest pronte a cominciare, BEAR comincia con tutte le quest pronte ad essere consegnate, balaclava dell'invicibilità incluso",

View File

@ -479,7 +479,7 @@
"launcher-profile_standard": "라이브와 동일, 기본 보관함 크기(10x28), 500,000루블",
"launcher-profile_leftbehind": "스탠다드 + 더 큰 보관함 크기(10x38), 추가 장비/아이템, 500달러",
"launcher-profile_preparetoescape": "레프트 비하인드와 동일 더 큰 보관함 크기(10x48), 추가 장비/아이템, 상인과의 시작 평판 상승, 250유로",
"launcher-edgeofdarkness": "프리페어 투 이스케이프와 동일 더 큰 은신처 크기(10x68), 추가 장비/아이템, 상인과의 높은 시작 평판, 1000달러, 500유로",
"launcher-profile-edgeofdarkness": "프리페어 투 이스케이프와 동일 더 큰 은신처 크기(10x68), 추가 장비/아이템, 상인과의 높은 시작 평판, 1000달러, 500유로",
"launcher-profile_spteasystart": "많은 루블/달러/유로, 일부 품질 관리 기술 레벨 20, 상인 담당자 최대 레벨, 시작 레벨 69, 완료된 퀘스트 없음",
"launcher-profile_sptzerotohero": "루블/달러/유로, 상인 대표, 칼 1개, 퀘스트 완료 등 거의 아무것도 없이 시작하세요.",
"launcher-profile_sptdeveloper": "테스트 프로필, 시작 레벨은 69, 많은 루블/달러/유로, USEC는 모든 퀘스트를 시작할 준비가 된 상태로 시작, BEAR는 모든 퀘스트를 제출할 준비가 된 상태로 시작, 무적 발라 클라바"

View File

@ -553,7 +553,7 @@
"launcher-profile_standard": "Zelfde als live, basis stash grootte (10x28), 500,000 roubles",
"launcher-profile_leftbehind": "Zelfde als Standard plus; grotere stash (10x38), extra uitrusting/items, 500 dollars",
"launcher-profile_preparetoescape": "Zelfde als Left Behind plus; grotere stash (10x48), extra uitrusting/items, hogere start reputatie met traders, 250 euros",
"launcher-edgeofdarkness": "Zelfde als Prepare To Escape plus; grotere stash (10x68), extra uitrusting/items, hogere start reputatie met traders, 1000 dollars, 500 euros",
"launcher-profile-edgeofdarkness": "Zelfde als Prepare To Escape plus; grotere stash (10x68), extra uitrusting/items, hogere start reputatie met traders, 1000 dollars, 500 euros",
"launcher-profile_spteasystart": "Heel veel Roubles/Dollars/Euros, Een aantal QoL skills zijn level 20, trader rep maximaal, start level is 69, geen voltooide missies",
"launcher-profile_sptzerotohero": "Start met bijna niks, geen Roubles/Dollars/Euros, geen trader rep, 1 mes, geen voltooide missies",
"launcher-profile_sptdeveloper": "Test profiel, start level is 69, heel veel Roubles/Dollars/Euros, USEC start met alle missied klaar om te starten, BEAR start met alle missies klaar om ingeleverd te vorden, invincibility balaclava"

View File

@ -553,7 +553,7 @@
"launcher-profile_standard": "Tak samo jak na oficjalnym, podstawowy rozmiar schowka (10x28), 500 000 rubli",
"launcher-profile_leftbehind": "Tak samo jak Standard plus; większy rozmiar schowka (10x38), dodatkowy sprzęt/przedmioty, 500 dolarów",
"launcher-profile_preparetoescape": "Tak samo jak Left Behind plus; większy rozmiar schowka (10x48), dodatkowy sprzęt/przedmioty, wyższa startowa reputacja u handlarzy, 250 euro",
"launcher-edgeofdarkness": "Tak samo jak Prepare To Escape plus; większy rozmiar schowka (10x68), dodatkowy sprzęt/przedmioty, wyższa startowa reputacja u handlarzy, 1000 dolarów, 500 euro",
"launcher-profile-edgeofdarkness": "Tak samo jak Prepare To Escape plus; większy rozmiar schowka (10x68), dodatkowy sprzęt/przedmioty, wyższa startowa reputacja u handlarzy, 1000 dolarów, 500 euro",
"launcher-profile_spteasystart": "Dużo rubli/dolarów/euro, niektóre pomocne umiejętności na poziomie 20, maksymalna reputacja u handlarzy, początkowy poziom to 69, żadne zadania nie zostały ukończone",
"launcher-profile_sptzerotohero": "Zaczynaj praktycznie od zera, bez rubli/dolarów/euro, bez reputacji u handlarzy, 1 nóż, żadne zadania nie zostały ukończone",
"launcher-profile_sptdeveloper": "Profil testowy, początkowy poziom to 69, dużo rubli/dolarów/euro, USEC zaczyna z wszystkimi zadaniami gotowymi do rozpoczęcia, BEAR zaczyna z wszystkimi zadaniami gotowymi do oddania, kominiarka nieśmiertelności"

View File

@ -548,7 +548,7 @@
"launcher-profile_standard": "Вариант Standard, базовый размер схрона (10x28), 500,000 рублей",
"launcher-profile_leftbehind": "Вариант Left Behind; увеличенный размер схрона (10x38), дополнительное снаряжение/предметы, 500 долларов",
"launcher-profile_preparetoescape": "Вариант Prepare for Escape; увеличенный размер схрона (10x48), дополнительное снаряжение/предметы, изначально повышенная репутация со всеми торговцами в игре, 250 евро",
"launcher-edgeofdarkness": "Вариант Edge of Darkness; увеличенный размер схрона (10x68), дополнительное снаряжение/предметы, изначально повышенная репутация со всеми торговцами в игре, 1000 долларов, 500 евро",
"launcher-profile-edgeofdarkness": "Вариант Edge of Darkness; увеличенный размер схрона (10x68), дополнительное снаряжение/предметы, изначально повышенная репутация со всеми торговцами в игре, 1000 долларов, 500 евро",
"launcher-profile_spteasystart": "Много рублей/долларов/евро, некоторые QoL навыки 20 уровня, максимальная репа у троговцев, начальный уровень 69, задания не выполнены",
"launcher-profile_sptzerotohero": "Старт практические без всего, нет рублей/долларов/евро, нет репутации у торговцев, 1 нож, задания не выполнены",
"launcher-profile_sptdeveloper": "Профиль для тестирования, начальный уровень 69, много рублей/долларов/евро, USEC начинают со всеми заданиями, готовыми к принятию, BEAR начинают со всеми заданиями, готовыми к сдаче, балаклава неуязвимости"

View File

@ -553,7 +553,7 @@
"launcher-profile_standard": "与在线相同基本储物空间10×28500,000卢布",
"launcher-profile_leftbehind": "包含标准版内容以及;更大的储物空间;10×38额外的装备和物品500美元",
"launcher-profile_preparetoescape": "包含落后版内容以及更大的储物空间10×48额外的装备和物品更高的商人初始声望250欧元",
"launcher-edgeofdarkness": "包含准备逃离版内容以及更大的储物空间10×68额外的装备和物品更高的商人初始声望1000美元500欧元",
"launcher-profile-edgeofdarkness": "包含准备逃离版内容以及更大的储物空间10×68额外的装备和物品更高的商人初始声望1000美元500欧元",
"launcher-profile_spteasystart": "大量卢布、美元和欧元一些基础技能等级20商人声望满初始等级69没有已完成任务",
"launcher-profile_sptzerotohero": "开局几乎没有物资,没有卢布、美元或欧元,没有商人声望,就一把刀,没有已完成任务",
"launcher-profile_sptdeveloper": "测试用存档初始等级69大量卢布、美元和欧元USEC开局所有的任务已准备开始BEAR开局所有任务已准备接取无敌面罩"

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ import { IConnectResponse } from "@spt-aki/models/eft/profile/IConnectResponse";
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { SaveServer } from "@spt-aki/servers/SaveServer";
@ -23,6 +24,7 @@ export class LauncherController
protected coreConfig: ICoreConfig;
constructor(
@inject("WinstonLogger") protected logger: ILogger,
@inject("HashUtil") protected hashUtil: HashUtil,
@inject("SaveServer") protected saveServer: SaveServer,
@inject("HttpServerHelper") protected httpServerHelper: HttpServerHelper,
@ -47,26 +49,26 @@ export class LauncherController
}
/**
* Get descriptive text for each of the profile edtions a player can choose
* @returns
* Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
* @returns Dictionary of profile types with related descriptive text
*/
protected getProfileDescriptions(): Record<string, string>
{
return {
"Standard": this.localisationService.getText("launcher-profile_standard"),
// eslint-disable-next-line @typescript-eslint/naming-convention
"Left Behind": this.localisationService.getText("launcher-profile_leftbehind"),
// eslint-disable-next-line @typescript-eslint/naming-convention
"Prepare To Escape": this.localisationService.getText("launcher-profile_preparetoescape"),
// eslint-disable-next-line @typescript-eslint/naming-convention
"Edge Of Darkness": this.localisationService.getText("launcher-edgeofdarkness"),
// eslint-disable-next-line @typescript-eslint/naming-convention
"SPT Easy start": this.localisationService.getText("launcher-profile_spteasystart"),
// eslint-disable-next-line @typescript-eslint/naming-convention
"SPT Zero to hero": this.localisationService.getText("launcher-profile_sptzerotohero"),
// eslint-disable-next-line @typescript-eslint/naming-convention
"SPT Developer": this.localisationService.getText("launcher-profile_sptdeveloper")
};
const result = {};
const dbProfiles = this.databaseServer.getTables().templates.profiles;
for (const profileKey in dbProfiles)
{
const localeKey = dbProfiles[profileKey]?.descriptionLocaleKey;
if (!localeKey)
{
this.logger.warning(this.localisationService.getText("launcher-missing_property", profileKey));
continue;
}
result[profileKey] = this.localisationService.getText(localeKey);
}
return result;
}
public find(sessionIdKey: string): Info

View File

@ -9,11 +9,18 @@ export interface IProfileTemplates
// eslint-disable-next-line @typescript-eslint/naming-convention
"Prepare To Escape": IProfileSides
// eslint-disable-next-line @typescript-eslint/naming-convention
"Edge Of Darkness": IProfileSides
"Edge Of Darkness": IProfileSides,
// eslint-disable-next-line @typescript-eslint/naming-convention
"SPT Developer": IProfileSides,
// eslint-disable-next-line @typescript-eslint/naming-convention
"SPT Easy start": IProfileSides,
// eslint-disable-next-line @typescript-eslint/naming-convention
"SPT Zero to hero": IProfileSides
}
export interface IProfileSides
{
descriptionLocaleKey: string
usec: TemplateSide
bear: TemplateSide
}