diff --git a/Content.Server/Chat/Commands/SuicideCommand.cs b/Content.Server/Chat/Commands/SuicideCommand.cs index bdfa9d49bb..c82dd8a13c 100644 --- a/Content.Server/Chat/Commands/SuicideCommand.cs +++ b/Content.Server/Chat/Commands/SuicideCommand.cs @@ -21,6 +21,7 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Map; using Robust.Shared.Prototypes; +using Content.Shared.MobState.Components; namespace Content.Server.Chat.Commands { @@ -83,6 +84,13 @@ namespace Content.Server.Chat.Commands return; } + //Checks to see if the player is dead. + if(_entities.TryGetComponent(owner, out var mobState) && mobState.IsDead()) + { + shell.WriteLine(Loc.GetString("suicide-command-already-dead")); + return; + } + //Checks to see if the CannotSuicide tag exits, ghosts instead. if(EntitySystem.Get().HasTag(owner, "CannotSuicide")) { diff --git a/Resources/Locale/en-US/chat/commands/suicide-command.ftl b/Resources/Locale/en-US/chat/commands/suicide-command.ftl index b3a95d9840..6748aa630c 100644 --- a/Resources/Locale/en-US/chat/commands/suicide-command.ftl +++ b/Resources/Locale/en-US/chat/commands/suicide-command.ftl @@ -4,4 +4,5 @@ suicide-command-help-text = The suicide command gives you a quick way out of a r If that fails, it will attempt to use an object in the environment. Finally, if neither of the above worked, you will die by biting your tongue. suicide-command-default-text-others = {$name} is attempting to bite their own tongue! -suicide-command-default-text-self = You attempt to bite your own tongue! \ No newline at end of file +suicide-command-default-text-self = You attempt to bite your own tongue! +suicide-command-already-dead = You can't suicide. You're dead.