Reduce action blocker uses and add target entity to CanInteract (#6655)

This commit is contained in:
Leon Friedrich
2022-02-15 17:06:52 +13:00
committed by GitHub
parent 334568dad2
commit ad9ddf1552
60 changed files with 286 additions and 402 deletions

View File

@@ -96,7 +96,7 @@ namespace Content.Server.Shuttles.EntitySystems
{
if (comp.Console == null) continue;
if (!_blocker.CanInteract((comp).Owner))
if (!_blocker.CanInteract(comp.Owner, comp.Console.Owner))
{
toRemove.Add(comp);
}
@@ -189,8 +189,7 @@ namespace Content.Server.Shuttles.EntitySystems
public void AddPilot(EntityUid entity, ShuttleConsoleComponent component)
{
if (!_blocker.CanInteract(entity) ||
!EntityManager.TryGetComponent(entity, out PilotComponent? pilotComponent) ||
if (!EntityManager.TryGetComponent(entity, out PilotComponent? pilotComponent) ||
component.SubscribedPilots.Contains(pilotComponent))
{
return;