Add self message variants for starting/finishing vending machine restocking (#36633)

* Add self message variants for starting/finishing restock

* Identity
This commit is contained in:
Tayrtahn
2025-04-16 17:33:02 -04:00
committed by GitHub
parent 705cbe1541
commit aec8e7f8d9
3 changed files with 15 additions and 6 deletions

View File

@@ -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));