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

@@ -18,7 +18,6 @@ namespace Content.Server.UserInterface
[UsedImplicitly]
internal sealed class ActivatableUISystem : EntitySystem
{
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
[Dependency] private readonly IAdminManager _adminManager = default!;
public override void Initialize()
@@ -82,12 +81,6 @@ namespace Content.Server.UserInterface
if (aui.AdminOnly && !_adminManager.IsAdmin(actor.PlayerSession)) return false;
if (!HasComp<GhostComponent>(user) && !_actionBlockerSystem.CanInteract(user))
{
user.PopupMessageCursor(Loc.GetString("base-computer-ui-component-cannot-interact"));
return true;
}
var ui = aui.UserInterface;
if (ui == null) return false;