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

@@ -16,7 +16,7 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
public override string Name => "RevolverBarrel";
public override uint? NetID => ContentNetIDs.REVOLVER_BARREL;
private StatusControl _statusControl;
private StatusControl? _statusControl;
/// <summary>
/// A array that lists the bullet states
@@ -25,12 +25,12 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
/// null means no bullet
/// </summary>
[ViewVariables]
public bool?[] Bullets { get; private set; }
public bool?[] Bullets { get; private set; } = new bool?[0];
[ViewVariables]
public int CurrentSlot { get; private set; }
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
{
base.HandleComponentState(curState, nextState);