Medical Scanner check session active (#6197)
This commit is contained in:
@@ -213,15 +213,14 @@ namespace Content.Server.Medical.Components
|
|||||||
// Ideally this ends with GameTicker & CloningSystem handing DNA to a function that sets up a body for that DNA.
|
// Ideally this ends with GameTicker & CloningSystem handing DNA to a function that sets up a body for that DNA.
|
||||||
var mindUser = mind.UserId;
|
var mindUser = mind.UserId;
|
||||||
|
|
||||||
if (mindUser == null)
|
if (mindUser.HasValue == false || mind.Session == null)
|
||||||
{
|
{
|
||||||
// For now assume this means soul departed
|
// For now assume this means soul departed
|
||||||
obj.Session.AttachedEntity.Value.PopupMessageCursor(Loc.GetString("medical-scanner-component-msg-soul-broken"));
|
obj.Session.AttachedEntity.Value.PopupMessageCursor(Loc.GetString("medical-scanner-component-msg-soul-broken"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// has to be explicit cast like this, IDK why, null suppression operators seem to not work
|
var profile = GetPlayerProfileAsync(mindUser.Value);
|
||||||
var profile = GetPlayerProfileAsync((NetUserId) mindUser);
|
|
||||||
cloningSystem.AddToDnaScans(new ClonerDNAEntry(mind, profile));
|
cloningSystem.AddToDnaScans(new ClonerDNAEntry(mind, profile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user