Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -6,6 +6,7 @@ using JetBrains.Annotations;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Observer.GhostRoles
|
||||
@@ -33,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Observer.GhostRoles
|
||||
[CanBeNull]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("prototype")]
|
||||
public string Prototype { get; private set; }
|
||||
public string? Prototype { get; private set; }
|
||||
|
||||
public override bool Take(IPlayerSession session)
|
||||
{
|
||||
@@ -50,7 +51,11 @@ namespace Content.Server.GameObjects.Components.Observer.GhostRoles
|
||||
|
||||
mob.EnsureComponent<MindComponent>();
|
||||
|
||||
session.ContentData().Mind.TransferTo(mob);
|
||||
var mind = session.ContentData()?.Mind;
|
||||
|
||||
DebugTools.AssertNotNull(mind);
|
||||
|
||||
mind!.TransferTo(mob);
|
||||
|
||||
if (++_currentTakeovers < _availableTakeovers) return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user