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; return;
if (butcher.Type != ButcheringType.Knife) if (butcher.Type != ButcheringType.Knife)
{
_popupSystem.PopupEntity(Loc.GetString("butcherable-different-tool", ("target", target)), knife, user);
return; return;
}
if (TryComp<MobStateComponent>(target, out var mobState) && !_mobStateSystem.IsDead(target, mobState)) if (TryComp<MobStateComponent>(target, out var mobState) && !_mobStateSystem.IsDead(target, mobState))
return; return;

View File

@@ -1,4 +1,5 @@
butcherable-knife-butchered-success = You butcher { THE($target) } with { THE($knife) }. butcherable-different-tool = You are going to need a different tool to butcher { THE($target) }.
butcherable-knife-butchered-success = You butcher { THE($target) } with { THE($knife) }.
butcherable-need-knife = Use a sharp object to butcher { THE($target) }. butcherable-need-knife = Use a sharp object to butcher { THE($target) }.
butcherable-not-in-container = { CAPITALIZE(THE($target)) } can't be in a container. butcherable-not-in-container = { CAPITALIZE(THE($target)) } can't be in a container.
butcherable-mob-isnt-dead = Needs to be dead. butcherable-mob-isnt-dead = Needs to be dead.