Can no longer place an infinite quantity of items inside a microwave (#23577)
* initial commit * rewrote code to early return to reduce nesting * added VV to Capacity field of MicrowaveComponent
This commit is contained in:
@@ -31,6 +31,7 @@ using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using System.Linq;
|
||||
using Content.Shared.Access.Components;
|
||||
|
||||
namespace Content.Server.Kitchen.EntitySystems
|
||||
{
|
||||
@@ -260,6 +261,12 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
return;
|
||||
}
|
||||
|
||||
if (ent.Comp.Storage.Count >= ent.Comp.Capacity)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-full"), ent, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
_handsSystem.TryDropIntoContainer(args.User, args.Used, ent.Comp.Storage);
|
||||
UpdateUserInterfaceState(ent, ent.Comp);
|
||||
|
||||
Reference in New Issue
Block a user