diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs index e061398114..bd95c92327 100644 --- a/Content.Server/VendingMachines/VendingMachineSystem.cs +++ b/Content.Server/VendingMachines/VendingMachineSystem.cs @@ -8,6 +8,7 @@ using Content.Shared.Damage; using Content.Shared.Destructible; using Content.Shared.DoAfter; using Content.Shared.Emp; +using Content.Shared.IdentityManagement; using Content.Shared.Popups; using Content.Shared.Power; using Content.Shared.Throwing; @@ -15,6 +16,7 @@ using Content.Shared.UserInterface; using Content.Shared.VendingMachines; using Content.Shared.Wall; using Robust.Shared.Audio; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; @@ -141,7 +143,9 @@ namespace Content.Server.VendingMachines TryRestockInventory(uid, component); - Popup.PopupEntity(Loc.GetString("vending-machine-restock-done", ("this", args.Args.Used), ("user", args.Args.User), ("target", uid)), args.Args.User, PopupType.Medium); + Popup.PopupEntity(Loc.GetString("vending-machine-restock-done-self", ("target", uid)), args.Args.User, args.Args.User, PopupType.Medium); + var othersFilter = Filter.PvsExcept(args.Args.User); + Popup.PopupEntity(Loc.GetString("vending-machine-restock-done-others", ("user", Identity.Entity(args.User, EntityManager)), ("target", uid)), args.Args.User, othersFilter, true, PopupType.Medium); Audio.PlayPvs(restockComponent.SoundRestockDone, uid, AudioParams.Default.WithVolume(-2f).WithVariation(0.2f)); diff --git a/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs b/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs index a5e2a6eccc..20c8f1195a 100644 --- a/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs +++ b/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs @@ -1,4 +1,5 @@ using Content.Shared.DoAfter; +using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Popups; using Content.Shared.Wires; @@ -72,8 +73,10 @@ public abstract partial class SharedVendingMachineSystem if (!_doAfter.TryStartDoAfter(doAfterArgs)) return; - Popup.PopupPredicted(Loc.GetString("vending-machine-restock-start", ("this", uid), ("user", args.User), - ("target", target)), + var selfMessage = Loc.GetString("vending-machine-restock-start-self", ("target", target)); + var othersMessage = Loc.GetString("vending-machine-restock-start-others", ("user", Identity.Entity(args.User, EntityManager)), ("target", target)); + Popup.PopupPredicted(selfMessage, + othersMessage, uid, args.User, PopupType.Medium); diff --git a/Resources/Locale/en-US/vending-machines/vending-machine-restock-component.ftl b/Resources/Locale/en-US/vending-machines/vending-machine-restock-component.ftl index 3d1968604a..49b0305b19 100644 --- a/Resources/Locale/en-US/vending-machines/vending-machine-restock-component.ftl +++ b/Resources/Locale/en-US/vending-machines/vending-machine-restock-component.ftl @@ -1,4 +1,6 @@ vending-machine-restock-invalid-inventory = { CAPITALIZE(THE($this)) } isn't the right package to restock { THE($target) }. -vending-machine-restock-needs-panel-open = { CAPITALIZE($target) } needs { POSS-ADJ($target) } maintenance panel opened first. -vending-machine-restock-start = { $user } starts restocking { $target }. -vending-machine-restock-done = { $user } finishes restocking { $target }. +vending-machine-restock-needs-panel-open = { CAPITALIZE(THE($target)) } needs { POSS-ADJ($target) } maintenance panel opened first. +vending-machine-restock-start-self = You start restocking { THE($target) }. +vending-machine-restock-start-others = { CAPITALIZE(THE($user)) } starts restocking { THE($target) }. +vending-machine-restock-done-self = You finish restocking { THE($target) }. +vending-machine-restock-done-others = { CAPITALIZE(THE($user)) } finishes restocking { THE($target) }.