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:
DrSmugleaf
2021-03-10 14:48:29 +01:00
committed by GitHub
parent 4f9bd4e802
commit 902aa128c2
270 changed files with 1774 additions and 1550 deletions

View File

@@ -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)