@@ -15,15 +15,12 @@ public abstract partial class SharedVendingMachineSystem
|
|||||||
EntityUid target)
|
EntityUid target)
|
||||||
{
|
{
|
||||||
if (!TryComp<WiresPanelComponent>(target, out var panel) || !panel.Open)
|
if (!TryComp<WiresPanelComponent>(target, out var panel) || !panel.Open)
|
||||||
{
|
|
||||||
if (_net.IsServer)
|
|
||||||
{
|
{
|
||||||
Popup.PopupCursor(Loc.GetString("vending-machine-restock-needs-panel-open",
|
Popup.PopupCursor(Loc.GetString("vending-machine-restock-needs-panel-open",
|
||||||
("this", uid),
|
("this", uid),
|
||||||
("user", user),
|
("user", user),
|
||||||
("target", target)),
|
("target", target)),
|
||||||
user);
|
user);
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -38,12 +35,9 @@ public abstract partial class SharedVendingMachineSystem
|
|||||||
EntityUid target)
|
EntityUid target)
|
||||||
{
|
{
|
||||||
if (!component.CanRestock.Contains(machineComponent.PackPrototypeId))
|
if (!component.CanRestock.Contains(machineComponent.PackPrototypeId))
|
||||||
{
|
|
||||||
if (_net.IsServer)
|
|
||||||
{
|
{
|
||||||
Popup.PopupCursor(Loc.GetString("vending-machine-restock-invalid-inventory", ("this", uid), ("user", user),
|
Popup.PopupCursor(Loc.GetString("vending-machine-restock-invalid-inventory", ("this", uid), ("user", user),
|
||||||
("target", target)), user);
|
("target", target)), user);
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -78,13 +72,11 @@ public abstract partial class SharedVendingMachineSystem
|
|||||||
if (!_doAfter.TryStartDoAfter(doAfterArgs))
|
if (!_doAfter.TryStartDoAfter(doAfterArgs))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_net.IsServer)
|
Popup.PopupPredicted(Loc.GetString("vending-machine-restock-start", ("this", uid), ("user", args.User),
|
||||||
{
|
|
||||||
Popup.PopupEntity(Loc.GetString("vending-machine-restock-start", ("this", uid), ("user", args.User),
|
|
||||||
("target", target)),
|
("target", target)),
|
||||||
|
uid,
|
||||||
args.User,
|
args.User,
|
||||||
PopupType.Medium);
|
PopupType.Medium);
|
||||||
}
|
|
||||||
|
|
||||||
Audio.PlayPredicted(component.SoundRestockStart, uid, args.User);
|
Audio.PlayPredicted(component.SoundRestockStart, uid, args.User);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user