Popup when being pulled shows who is pulling you (#33612)

* Popup when being pulled

* Update Content.Shared/Movement/Pulling/Systems/PullingSystem.cs

Co-authored-by: MilenVolf <63782763+MilenVolf@users.noreply.github.com>

* Update Resources/Locale/en-US/movement/pulling.ftl

Co-authored-by: MilenVolf <63782763+MilenVolf@users.noreply.github.com>

---------

Co-authored-by: MilenVolf <63782763+MilenVolf@users.noreply.github.com>
This commit is contained in:
Plykiya
2024-12-08 19:51:53 -08:00
committed by GitHub
parent a7e1adf395
commit 8f2b19e103
2 changed files with 7 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ using Content.Shared.Cuffs.Components;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.Hands; using Content.Shared.Hands;
using Content.Shared.Hands.EntitySystems; using Content.Shared.Hands.EntitySystems;
using Content.Shared.IdentityManagement;
using Content.Shared.Input; using Content.Shared.Input;
using Content.Shared.Interaction; using Content.Shared.Interaction;
using Content.Shared.Item; using Content.Shared.Item;
@@ -46,6 +47,7 @@ public sealed class PullingSystem : EntitySystem
[Dependency] private readonly SharedInteractionSystem _interaction = default!; [Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly HeldSpeedModifierSystem _clothingMoveSpeed = default!; [Dependency] private readonly HeldSpeedModifierSystem _clothingMoveSpeed = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
public override void Initialize() public override void Initialize()
{ {
@@ -326,7 +328,6 @@ public sealed class PullingSystem : EntitySystem
RaiseLocalEvent(pullableUid, message); RaiseLocalEvent(pullableUid, message);
} }
_alertsSystem.ClearAlert(pullableUid, pullableComp.PulledAlert); _alertsSystem.ClearAlert(pullableUid, pullableComp.PulledAlert);
} }
@@ -514,6 +515,10 @@ public sealed class PullingSystem : EntitySystem
Dirty(pullerUid, pullerComp); Dirty(pullerUid, pullerComp);
Dirty(pullableUid, pullableComp); Dirty(pullableUid, pullableComp);
var pullingMessage =
Loc.GetString("getting-pulled-popup", ("puller", Identity.Entity(pullerUid, EntityManager)));
_popup.PopupEntity(pullingMessage, pullableUid, pullableUid);
_adminLogger.Add(LogType.Action, LogImpact.Low, _adminLogger.Add(LogType.Action, LogImpact.Low,
$"{ToPrettyString(pullerUid):user} started pulling {ToPrettyString(pullableUid):target}"); $"{ToPrettyString(pullerUid):user} started pulling {ToPrettyString(pullableUid):target}");
return true; return true;

View File

@@ -0,0 +1 @@
getting-pulled-popup = { CAPITALIZE(THE($puller)) } begins pulling you.