Hide host machine UserName when displaying error logs

This commit is contained in:
EvilFactory
2023-12-10 12:26:38 -03:00
parent e5e85e948b
commit c7b8cda902
3 changed files with 38 additions and 6 deletions
@@ -20,6 +20,7 @@ namespace Barotrauma
public bool TreatForcedModsAsNormal = false;
public bool PreferToUseWorkshopLuaSetup = false;
public bool DisableErrorGUIOverlay = false;
public bool HideUserNames = true;
public LuaCsSetupConfig() { }
}
@@ -121,6 +122,8 @@ namespace Barotrauma
{
Config = new LuaCsSetupConfig();
}
UpdateConfigVars();
}
[Obsolete("Use AssemblyManager::GetTypesByName()")]
@@ -161,6 +164,11 @@ namespace Barotrauma
public void DetachDebugger() => DebugServer.Detach(Lua);
public void UpdateConfigVars()
{
LuaCsLogger.HideUserNames = Config.HideUserNames;
}
public void UpdateConfig()
{
FileStream file;
@@ -168,6 +176,8 @@ namespace Barotrauma
else { file = File.Open(configFileName, FileMode.Truncate, FileAccess.Write); }
LuaCsConfig.Save(file, Config);
file.Close();
UpdateConfigVars();
}
public static ContentPackage GetPackage(ContentPackageId id, bool fallbackToAll = true, bool useBackup = false)