Build 0.18.0.0

This commit is contained in:
Markus Isberg
2022-05-13 00:55:52 +09:00
parent 15d18e6ff6
commit 7547a9b78a
218 changed files with 3881 additions and 2192 deletions
@@ -301,7 +301,6 @@ namespace Barotrauma
{ InputType.Down, Keys.S },
{ InputType.Left, Keys.A },
{ InputType.Right, Keys.D },
{ InputType.ToggleInventory, Keys.Q },
{ InputType.SelectNextCharacter, Keys.Z },
{ InputType.SelectPreviousCharacter, Keys.X },
@@ -452,19 +451,19 @@ namespace Barotrauma
public static void SetCurrentConfig(in Config newConfig)
{
bool setGraphicsMode =
currentConfig.Graphics.Width != newConfig.Graphics.Width
|| currentConfig.Graphics.Height != newConfig.Graphics.Height
|| currentConfig.Graphics.VSync != newConfig.Graphics.VSync
|| currentConfig.Graphics.DisplayMode != newConfig.Graphics.DisplayMode;
bool resolutionChanged =
currentConfig.Graphics.Width != newConfig.Graphics.Width ||
currentConfig.Graphics.Height != newConfig.Graphics.Height;
bool languageChanged = currentConfig.Language != newConfig.Language;
bool audioOutputChanged = currentConfig.Audio.AudioOutputDevice != newConfig.Audio.AudioOutputDevice;
bool voiceCaptureChanged = currentConfig.Audio.VoiceCaptureDevice != newConfig.Audio.VoiceCaptureDevice;
bool textScaleChanged = Math.Abs(currentConfig.Graphics.TextScale - newConfig.Graphics.TextScale) > MathF.Pow(2.0f, -7);
bool setGraphicsMode =
resolutionChanged ||
currentConfig.Graphics.VSync != newConfig.Graphics.VSync ||
currentConfig.Graphics.DisplayMode != newConfig.Graphics.DisplayMode;
currentConfig = newConfig;
#if CLIENT
@@ -483,7 +482,7 @@ namespace Barotrauma
VoipCapture.ChangeCaptureDevice(currentConfig.Audio.VoiceCaptureDevice);
}
if (textScaleChanged)
if (textScaleChanged || resolutionChanged)
{
foreach (var font in GUIStyle.Fonts.Values)
{
@@ -504,23 +503,11 @@ namespace Barotrauma
XElement graphicsElement = new XElement("graphicssettings"); root.Add(graphicsElement);
currentConfig.Graphics.SerializeElement(graphicsElement);
#region Backwards compatibility crap
#warning TODO: remove once modding refactor ships in a stable release
XElement backwardsCompatibilityGraphicsMode = new XElement(graphicsElement); root.Add(backwardsCompatibilityGraphicsMode);
backwardsCompatibilityGraphicsMode.Name = "graphicsmode";
#endregion
XElement audioElement = new XElement("audio"); root.Add(audioElement);
currentConfig.Audio.SerializeElement(audioElement);
XElement contentPackagesElement = new XElement("contentpackages"); root.Add(contentPackagesElement);
#region More backwards compatibility crap
XComment backwardsCompatibleComment = new XComment("Backwards compatibility"); contentPackagesElement.Add(backwardsCompatibleComment);
#warning TODO: remove once modding refactor ships in a stable release
XElement backwardsCompatibleCoreElement = new XElement("core"); contentPackagesElement.Add(backwardsCompatibleCoreElement);
backwardsCompatibleCoreElement.SetAttributeValue("name", "Vanilla 0.9");
#endregion
XComment corePackageComment = new XComment(ContentPackageManager.EnabledPackages.Core?.Name ?? "Vanilla"); contentPackagesElement.Add(corePackageComment);
XElement corePackageElement = new XElement(ContentPackageManager.CorePackageElementName); contentPackagesElement.Add(corePackageElement);
corePackageElement.SetAttributeValue("path", ContentPackageManager.EnabledPackages.Core?.Path ?? ContentPackageManager.VanillaFileList);