diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs index c93fbc334b..84eb07e44d 100644 --- a/Content.Server/Doors/Systems/DoorSystem.cs +++ b/Content.Server/Doors/Systems/DoorSystem.cs @@ -48,6 +48,16 @@ public sealed class DoorSystem : SharedDoorSystem SubscribeLocalEvent(OnEmagged); } + protected override void OnActivate(EntityUid uid, DoorComponent door, ActivateInWorldEvent args) + { + // TODO once access permissions are shared, move this back to shared. + if (args.Handled || !door.ClickOpen) + return; + + TryToggleDoor(uid, door, args.User); + args.Handled = true; + } + protected override void SetCollidable( EntityUid uid, bool collidable, diff --git a/Content.Shared/Doors/Systems/SharedDoorSystem.cs b/Content.Shared/Doors/Systems/SharedDoorSystem.cs index 850e479ba7..d607319eb3 100644 --- a/Content.Shared/Doors/Systems/SharedDoorSystem.cs +++ b/Content.Shared/Doors/Systems/SharedDoorSystem.cs @@ -57,7 +57,6 @@ public abstract class SharedDoorSystem : EntitySystem SubscribeLocalEvent(OnGetState); SubscribeLocalEvent(OnHandleState); - SubscribeLocalEvent(OnInteractedNoHand); SubscribeLocalEvent(OnActivate); SubscribeLocalEvent(HandleCollide); @@ -180,22 +179,9 @@ public abstract class SharedDoorSystem : EntitySystem #endregion #region Interactions - - private void OnInteractedNoHand(EntityUid uid, DoorComponent component, InteractedNoHandEvent args) + protected virtual void OnActivate(EntityUid uid, DoorComponent door, ActivateInWorldEvent args) { - if (args.Handled || !component.ClickOpen || !Tags.HasTag(args.User, "DoorBumpOpener")) - return; - - TryToggleDoor(uid, component, args.User, predicted: true); - args.Handled = true; - } - - public void OnActivate(EntityUid uid, DoorComponent door, ActivateInWorldEvent args) - { - if (args.Handled || !door.ClickOpen) - return; - - TryToggleDoor(uid, door, args.User, predicted: true); + // avoid client-mispredicts, as the server will definitely handle this event args.Handled = true; } diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 5991705bf2..2fb94c50d4 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -2191,9 +2191,9 @@ accent: mouse - type: Tag tags: - - Hamster - - CannotSuicide - Trash + - CannotSuicide + - Hamster - type: Respirator damage: types: diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml b/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml index e1390920e3..e763ecac9f 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml @@ -6,7 +6,6 @@ components: - type: Tag tags: - - DoorBumpOpener - FootstepSound - type: InputMover - type: MobMover diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml b/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml index 644b373262..a325d557d1 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml @@ -41,7 +41,6 @@ volume: 3 - type: Tag tags: - - DoorBumpOpener - FootstepSound - type: Butcherable butcheringType: Knife