Add PopupPredictedCursor and fix doubled popups on vending machines (#36655)
* Add PopupCursorPredicted method * Fix doubled popups on vending machine restock failures * Rename to match existing pattern
This commit is contained in:
@@ -17,7 +17,7 @@ public abstract partial class SharedVendingMachineSystem
|
||||
{
|
||||
if (!TryComp<WiresPanelComponent>(target, out var panel) || !panel.Open)
|
||||
{
|
||||
Popup.PopupCursor(Loc.GetString("vending-machine-restock-needs-panel-open",
|
||||
Popup.PopupPredictedCursor(Loc.GetString("vending-machine-restock-needs-panel-open",
|
||||
("this", uid),
|
||||
("user", user),
|
||||
("target", target)),
|
||||
@@ -37,7 +37,7 @@ public abstract partial class SharedVendingMachineSystem
|
||||
{
|
||||
if (!component.CanRestock.Contains(machineComponent.PackPrototypeId))
|
||||
{
|
||||
Popup.PopupCursor(Loc.GetString("vending-machine-restock-invalid-inventory", ("this", uid), ("user", user),
|
||||
Popup.PopupPredictedCursor(Loc.GetString("vending-machine-restock-invalid-inventory", ("this", uid), ("user", user),
|
||||
("target", target)), user);
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user