diff --git a/Content.Client/Parallax/Managers/ParallaxManager.cs b/Content.Client/Parallax/Managers/ParallaxManager.cs index 3b000a65ff..7c07f18cff 100644 --- a/Content.Client/Parallax/Managers/ParallaxManager.cs +++ b/Content.Client/Parallax/Managers/ParallaxManager.cs @@ -18,10 +18,10 @@ public sealed class ParallaxManager : IParallaxManager public Vector2 ParallaxAnchor { get; set; } - private readonly ConcurrentDictionary _parallaxesLQ = new(); - private readonly ConcurrentDictionary _parallaxesHQ = new(); + private readonly Dictionary _parallaxesLQ = new(); + private readonly Dictionary _parallaxesHQ = new(); - private readonly ConcurrentDictionary _loadingParallaxes = new(); + private readonly Dictionary _loadingParallaxes = new(); public bool IsLoaded(string name) => _parallaxesLQ.ContainsKey(name); @@ -32,7 +32,7 @@ public sealed class ParallaxManager : IParallaxManager return !_parallaxesLQ.TryGetValue(name, out var lq) ? Array.Empty() : lq; } - return !_parallaxesLQ.TryGetValue(name, out var hq) ? Array.Empty() : hq; + return !_parallaxesHQ.TryGetValue(name, out var hq) ? Array.Empty() : hq; } public void UnloadParallax(string name) @@ -45,8 +45,8 @@ public sealed class ParallaxManager : IParallaxManager } if (!_parallaxesLQ.ContainsKey(name)) return; - _parallaxesLQ.Remove(name, out _); - _parallaxesHQ.Remove(name, out _); + _parallaxesLQ.Remove(name); + _parallaxesHQ.Remove(name); } public async void LoadDefaultParallax() @@ -89,8 +89,8 @@ public sealed class ParallaxManager : IParallaxManager if (token.Token.IsCancellationRequested) return; - _parallaxesLQ[name] = layers[0]; - _parallaxesHQ[name] = layers[1]; + _parallaxesLQ[name] = layers[1]; + _parallaxesHQ[name] = layers[0]; _sawmill.Info($"Loaded parallax {name}"); diff --git a/Content.Client/Parallax/ParallaxControl.cs b/Content.Client/Parallax/ParallaxControl.cs index 943fee2cf3..afd9a7423e 100644 --- a/Content.Client/Parallax/ParallaxControl.cs +++ b/Content.Client/Parallax/ParallaxControl.cs @@ -32,7 +32,7 @@ public sealed class ParallaxControl : Control foreach (var layer in _parallaxManager.GetParallaxLayers("FastSpace")) { var tex = layer.Texture; - var texSize = (tex.Size.X * (int) Size.X, tex.Size.Y * (int) Size.X) * layer.Config.Scale.Floored() / 540; + var texSize = (tex.Size.X * (int) Size.X, tex.Size.Y * (int) Size.X) * layer.Config.Scale.Floored() / 1920; var ourSize = PixelSize; var currentTime = (float) _timing.RealTime.TotalSeconds; diff --git a/Resources/Prototypes/Parallaxes/default.yml b/Resources/Prototypes/Parallaxes/default.yml index 05f5c1668e..26a0fe0b39 100644 --- a/Resources/Prototypes/Parallaxes/default.yml +++ b/Resources/Prototypes/Parallaxes/default.yml @@ -29,9 +29,9 @@ layersLQ: - texture: !type:GeneratedParallaxTextureSource - id: "" - configPath: "/Prototypes/Parallaxes/parallax_config.toml" - slowness: 0.875 + id: "" + configPath: "/Prototypes/Parallaxes/parallax_config.toml" + slowness: 0.875 layersLQUseHQ: false # Because hyperspace and the menu need their own. @@ -42,7 +42,7 @@ !type:ImageParallaxTextureSource path: "/Textures/Parallaxes/layer1.png" slowness: 0.5 - scale: "1, 1" + scale: "3, 3" - texture: !type:GeneratedParallaxTextureSource id: "hq_wizard_stars" @@ -66,8 +66,8 @@ layersLQ: - texture: !type:GeneratedParallaxTextureSource - id: "" - configPath: "/Prototypes/Parallaxes/parallax_config.toml" - slowness: 0.5 + id: "" + configPath: "/Prototypes/Parallaxes/parallax_config.toml" + slowness: 0.5 layersLQUseHQ: false