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;
}
}
}
}

View File

@@ -3,4 +3,5 @@ vape-component-vape-success-forced = {CAPITALIZE(THE($user))} forced you to puff
vape-component-vape-success-user-forced = You successfully forced to puff {THE($target)}.
vape-component-try-use-vape-forced = {CAPITALIZE(THE($user))} is trying to make you puff on the vape.
vape-component-try-use-vape-forced-user = You are forcing {THE($target)} to puff on the vape.
vape-component-try-use-vape = You are trying to puff on the vape.
vape-component-try-use-vape = You are trying to puff on the vape.
vape-component-vape-empty = The vape is empty!