Hugging yourself no longer allowed (#8103)
!1984. I want to hug the other person damnit.
This commit is contained in:
@@ -3,9 +3,8 @@ using Content.Shared.Sound;
|
|||||||
namespace Content.Server.Interaction.Components;
|
namespace Content.Server.Interaction.Components;
|
||||||
|
|
||||||
[RegisterComponent, Friend(typeof(InteractionPopupSystem))]
|
[RegisterComponent, Friend(typeof(InteractionPopupSystem))]
|
||||||
|
public sealed class InteractionPopupComponent : Component
|
||||||
public sealed class InteractionPopupComponent : Component
|
{
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Time delay between interactions to avoid spam.
|
/// Time delay between interactions to avoid spam.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -64,4 +63,4 @@ namespace Content.Server.Interaction.Components;
|
|||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public TimeSpan LastInteractTime;
|
public TimeSpan LastInteractTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ namespace Content.Server.Interaction;
|
|||||||
public sealed class InteractionPopupSystem : EntitySystem
|
public sealed class InteractionPopupSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ public sealed class InteractionPopupSystem : EntitySystem
|
|||||||
|
|
||||||
private void OnInteractHand(EntityUid uid, InteractionPopupComponent component, InteractHandEvent args)
|
private void OnInteractHand(EntityUid uid, InteractionPopupComponent component, InteractHandEvent args)
|
||||||
{
|
{
|
||||||
if (args.Handled)
|
if (args.Handled || args.User == args.Target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var curTime = _gameTiming.CurTime;
|
var curTime = _gameTiming.CurTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user