Added nullable to most Content.Shared files (#3238)
* Add nullable to some Content.Shared files. * Use [NotNullWhen(true)] * Undo adding now redundant !'s * Forgot one * Add a ton more nullable * You can guess * Fix some issues * It actually compiles now * Auto stash before merge of "null2" and "origin/master" * I lied * enable annotations -> enable * Revert ActionBlockerSystem.cs to original * Fix ActionBlockerSystem.cs * More nullable * Undo some added exclamation marks * Fix issues * Update Content.Shared/Maps/ContentTileDefinition.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Resolve some issues * Remove unused method * Fix more issues * Fix more issues * Fix more issues * Fix more issues * Fix issue, rollback SharedGhostComponent.cs * Update submodule * Fix issue, invert some if-statements to reduce nesting * Revert RobustToolbox * FIx things broken by merge * Some fixes - Replaced with string.Empty - Remove some exclamation marks - Revert file * Some fixes * Trivial #nullable enable * Fix null ables Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
#nullable enable
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
@@ -51,8 +52,8 @@ namespace Content.Shared.GameObjects.Components.PDA
|
||||
public bool FlashlightEnabled;
|
||||
public bool HasPen;
|
||||
public PDAIdInfoText PDAOwnerInfo;
|
||||
public UplinkAccountData Account;
|
||||
public UplinkListingData[] Listings;
|
||||
public UplinkAccountData Account = default!;
|
||||
public UplinkListingData[] Listings = default!;
|
||||
|
||||
public PDAUpdateState(bool isFlashlightOn, bool hasPen, PDAIdInfoText ownerInfo)
|
||||
{
|
||||
@@ -107,9 +108,9 @@ namespace Content.Shared.GameObjects.Components.PDA
|
||||
[Serializable, NetSerializable]
|
||||
public struct PDAIdInfoText
|
||||
{
|
||||
public string ActualOwnerName;
|
||||
public string IdOwner;
|
||||
public string JobTitle;
|
||||
public string? ActualOwnerName;
|
||||
public string? IdOwner;
|
||||
public string? JobTitle;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
@@ -127,7 +128,7 @@ namespace Content.Shared.GameObjects.Components.PDA
|
||||
|
||||
public class UplinkAccount
|
||||
{
|
||||
public event Action<UplinkAccount> BalanceChanged;
|
||||
public event Action<UplinkAccount>? BalanceChanged;
|
||||
public EntityUid AccountHolder;
|
||||
private int _balance;
|
||||
[ViewVariables]
|
||||
@@ -148,7 +149,6 @@ namespace Content.Shared.GameObjects.Components.PDA
|
||||
_balance = newBalance;
|
||||
BalanceChanged?.Invoke(this);
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace Content.Shared.GameObjects.Components.PDA
|
||||
ItemId = itemId;
|
||||
}
|
||||
|
||||
public bool Equals(UplinkListingData other)
|
||||
public bool Equals(UplinkListingData? other)
|
||||
{
|
||||
if (other == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user