Fixed pre-raid locales that can be confusing to players
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
],
|
||||
"removeModItemsFromProfile": false,
|
||||
"removeInvalidTradersFromProfile": false,
|
||||
"fixProfileBreakingInventoryItemIssues": false
|
||||
"fixProfileBreakingInventoryItemIssues": false,
|
||||
"renamePreRaidLocales": true
|
||||
},
|
||||
"survey": {
|
||||
"locale": {
|
||||
|
||||
@@ -244,6 +244,12 @@ public record GameFixes
|
||||
/// </summary>
|
||||
[JsonPropertyName("fixProfileBreakingInventoryItemIssues")]
|
||||
public bool FixProfileBreakingInventoryItemIssues { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should pre-raid english locales be renamed during raid start
|
||||
/// </summary>
|
||||
[JsonPropertyName("renamePreRaidLocales")]
|
||||
public bool RenamePreRaidLocales { get; set; }
|
||||
}
|
||||
|
||||
public record ServerFeatures
|
||||
|
||||
@@ -136,6 +136,28 @@ public class PostDbLoadService(
|
||||
{
|
||||
ReplaceScavWavesWithRole(BotConfig.ReplaceScavWith);
|
||||
}
|
||||
|
||||
if (CoreConfig.Fixes.RenamePreRaidLocales)
|
||||
{
|
||||
RenamePreraidLocales();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void RenamePreraidLocales()
|
||||
{
|
||||
if (databaseService.GetLocales().Global.TryGetValue("en", out var lazyloadedValue))
|
||||
{
|
||||
// We have to add a transformer here, because locales are lazy loaded due to them taking up huge space in memory
|
||||
// The transformer will make sure that each time the locales are requested, the ones changed or added below are included
|
||||
lazyloadedValue.AddTransformer(lazyloadedLocaleData =>
|
||||
{
|
||||
lazyloadedLocaleData["Offline raid test mode"] = "SPT";
|
||||
lazyloadedLocaleData["Offline raid description"] = " ";
|
||||
|
||||
return lazyloadedLocaleData;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected void ReplaceScavWavesWithRole(WildSpawnType newScavRole)
|
||||
|
||||
Reference in New Issue
Block a user