Display popup when butchering with the wrong tool (#18023)

This commit is contained in:
Kevin Zheng
2023-07-16 20:54:39 -07:00
committed by GitHub
parent 541eb417e3
commit 466cee1bc7
2 changed files with 5 additions and 1 deletions

View File

@@ -54,7 +54,10 @@ public sealed class SharpSystem : EntitySystem
return;
if (butcher.Type != ButcheringType.Knife)
{
_popupSystem.PopupEntity(Loc.GetString("butcherable-different-tool", ("target", target)), knife, user);
return;
}
if (TryComp<MobStateComponent>(target, out var mobState) && !_mobStateSystem.IsDead(target, mobState))
return;