Меньше попапов в чат (#143)

* add: less popups in chat

* fix: less brackets
This commit is contained in:
ThereDrD0
2024-02-29 13:36:13 +03:00
committed by GitHub
parent 97b0cb1acb
commit be32d673cb
21 changed files with 18 additions and 51 deletions

View File

@@ -323,7 +323,7 @@ namespace Content.Server.VendingMachines
if (_accessReader.IsAllowed(sender, uid, accessReader) || HasComp<EmaggedComponent>(uid))
return true;
Popup.PopupEntity(Loc.GetString("vending-machine-component-try-eject-access-denied"), uid);
Popup.PopupClient(Loc.GetString("vending-machine-component-try-eject-access-denied"), uid, sender);
Deny(uid, vendComponent);
return false;
}
@@ -351,14 +351,19 @@ namespace Content.Server.VendingMachines
if (entry == null)
{
Popup.PopupEntity(Loc.GetString("vending-machine-component-try-eject-invalid-item"), uid);
if (sender.HasValue)
Popup.PopupClient(Loc.GetString("vending-machine-component-try-eject-invalid-item"), uid, sender.Value);
Deny(uid, vendComponent);
return;
}
if (entry.Amount <= 0)
{
Popup.PopupEntity(Loc.GetString("vending-machine-component-try-eject-out-of-stock"), uid);
if (sender.HasValue)
Popup.PopupClient(Loc.GetString("vending-machine-component-try-eject-out-of-stock"), uid, sender.Value);
Deny(uid, vendComponent);
return;
}