A bunch of AttachedEntity bullshit

This commit is contained in:
metalgearsloth
2021-12-06 15:39:46 +11:00
parent 215cae5655
commit 525297c5fe
58 changed files with 135 additions and 133 deletions

View File

@@ -73,7 +73,7 @@ namespace Content.Server.Tabletop
/// <param name="uid">The UID of the tabletop game entity.</param>
public void OpenSessionFor(IPlayerSession player, EntityUid uid)
{
if (!EntityManager.TryGetComponent(uid, out TabletopGameComponent? tabletop) || player.AttachedEntity is not {} attachedEntity)
if (!EntityManager.TryGetComponent(uid, out TabletopGameComponent? tabletop) || player.AttachedEntity is not {Valid: true} attachedEntity)
return;
// Make sure we have a session, and add the player to it if not added already.