Enable nullability in Content.Client (#3257)
* Enable nullability in Content.Client * Remove #nullable enable * Merge fixes * Remove Debug.Assert * Merge fixes * Fix build * Fix build
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Content.Client.Parallax
|
||||
{
|
||||
private readonly List<Layer> Layers = new();
|
||||
|
||||
public static Image<Rgba32> GenerateParallax(TomlTable config, Size size, ISawmill sawmill, List<Image<Rgba32>> debugLayerDump)
|
||||
public static Image<Rgba32> GenerateParallax(TomlTable config, Size size, ISawmill sawmill, List<Image<Rgba32>>? debugLayerDump)
|
||||
{
|
||||
sawmill.Debug("Generating parallax!");
|
||||
var generator = new ParallaxGenerator();
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace Content.Client.Parallax
|
||||
private static readonly ResourcePath ParallaxPath = new("/parallax_cache.png");
|
||||
private static readonly ResourcePath ParallaxConfigOld = new("/parallax_config_old");
|
||||
|
||||
public event Action<Texture> OnTextureLoaded;
|
||||
public Texture ParallaxTexture { get; private set; }
|
||||
public event Action<Texture>? OnTextureLoaded;
|
||||
public Texture? ParallaxTexture { get; private set; }
|
||||
|
||||
public async void LoadParallax()
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace Content.Client.Parallax
|
||||
table = Toml.ReadString(contents);
|
||||
}
|
||||
|
||||
List<Image<Rgba32>> debugImages = null;
|
||||
List<Image<Rgba32>>? debugImages = null;
|
||||
if (debugParallax)
|
||||
{
|
||||
debugImages = new List<Image<Rgba32>>();
|
||||
@@ -94,7 +94,7 @@ namespace Content.Client.Parallax
|
||||
image.SaveAsPng(stream);
|
||||
}
|
||||
|
||||
if (debugParallax)
|
||||
if (debugParallax && debugImages != null)
|
||||
{
|
||||
var i = 0;
|
||||
foreach (var debugImage in debugImages)
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Content.Client.Parallax
|
||||
|
||||
private const float Slowness = 0.5f;
|
||||
|
||||
private Texture _parallaxTexture;
|
||||
private Texture? _parallaxTexture;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.ScreenSpaceBelowWorld;
|
||||
private readonly ShaderInstance _shader;
|
||||
|
||||
Reference in New Issue
Block a user