Add empty contents check for vape (#16123)

This commit is contained in:
themias
2023-05-05 13:48:47 -04:00
committed by GitHub
parent 57948bb9d4
commit 544d2a1010
2 changed files with 11 additions and 2 deletions

View File

@@ -50,6 +50,14 @@ namespace Content.Server.Nutrition.EntitySystems
|| _foodSystem.IsMouthBlocked(args.Target.Value, args.User))
return;
if (solution.Contents.Count == 0)
{
_popupSystem.PopupEntity(
Loc.GetString("vape-component-vape-empty"), args.Target.Value,
args.User);
return;
}
if (args.Target == args.User)
{
delay = comp.UserDelay;
@@ -166,4 +174,4 @@ namespace Content.Server.Nutrition.EntitySystems
args.Handled = true;
}
}
}
}