Fix parallax generation.

It broke when IoC got made thread local,
since it is done in the thread pool.
This commit is contained in:
Pieter-Jan Briers
2019-05-08 22:01:14 +02:00
parent 0ccefebc52
commit eacfa34c99
2 changed files with 8 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
using Robust.Client.Utility;
using Robust.Shared.Interfaces.Log;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Noise;
@@ -17,9 +18,9 @@ namespace Content.Client.Parallax
{
private readonly List<Layer> Layers = new List<Layer>();
public static Image<Rgba32> GenerateParallax(TomlTable config, Size size)
public static Image<Rgba32> GenerateParallax(TomlTable config, Size size, ISawmill sawmill)
{
Logger.DebugS("parallax", "Generating parallax!");
sawmill.Debug("Generating parallax!");
var generator = new ParallaxGenerator();
generator._loadConfig(config);
@@ -28,7 +29,7 @@ namespace Content.Client.Parallax
foreach (var layer in generator.Layers)
{
layer.Apply(image);
Logger.DebugS("parallax", "Layer {0} done!", count++);
sawmill.Debug("Layer {0} done!", count++);
}
return image;