Fix component generic usages where IComponent would not be valid (#19482)
This commit is contained in:
@@ -78,7 +78,7 @@ namespace Content.Server.Tabletop
|
||||
if (session.Players.ContainsKey(player))
|
||||
return;
|
||||
|
||||
if(EntityManager.TryGetComponent<TabletopGamerComponent?>(attachedEntity, out var gamer))
|
||||
if(EntityManager.TryGetComponent(attachedEntity, out TabletopGamerComponent? gamer))
|
||||
CloseSessionFor(player, gamer.Tabletop, false);
|
||||
|
||||
// Set the entity as an absolute GAMER.
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Content.Server.Tabletop
|
||||
if (!args.CanAccess || !args.CanInteract)
|
||||
return;
|
||||
|
||||
if (!EntityManager.TryGetComponent<ActorComponent?>(args.User, out var actor))
|
||||
if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor))
|
||||
return;
|
||||
|
||||
var playVerb = new ActivationVerb()
|
||||
|
||||
Reference in New Issue
Block a user