Remove IRelayMoveInput (#4663)
* Remove IRelayMoveInput This interface gets called every time a movement key is pressed so it gets called a lot. * Remove RelayMovementEntityMessage Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -36,11 +36,9 @@ namespace Content.Server.Medical.Components
|
||||
public class MedicalScannerComponent : SharedMedicalScannerComponent, IActivate, IDestroyAct
|
||||
{
|
||||
[Dependency] private readonly IServerPreferencesManager _prefsManager = null!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = null!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
|
||||
private static readonly TimeSpan InternalOpenAttemptDelay = TimeSpan.FromSeconds(0.5);
|
||||
private TimeSpan _lastInternalOpenAttempt;
|
||||
public static readonly TimeSpan InternalOpenAttemptDelay = TimeSpan.FromSeconds(0.5);
|
||||
public TimeSpan LastInternalOpenAttempt;
|
||||
|
||||
private ContainerSlot _bodyContainer = default!;
|
||||
private readonly Vector2 _ejectOffset = new(0f, 0f);
|
||||
@@ -70,31 +68,6 @@ namespace Content.Server.Medical.Components
|
||||
UpdateUserInterface();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case RelayMovementEntityMessage msg:
|
||||
{
|
||||
if (EntitySystem.Get<ActionBlockerSystem>().CanInteract(msg.Entity))
|
||||
{
|
||||
if (_gameTiming.CurTime <
|
||||
_lastInternalOpenAttempt + InternalOpenAttemptDelay)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
_lastInternalOpenAttempt = _gameTiming.CurTime;
|
||||
EjectBody();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly MedicalScannerBoundUserInterfaceState EmptyUIState =
|
||||
new(
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user