Improves MindComponent's description. Force ghost without body return when commiting suicide.

This commit is contained in:
Víctor Aguilera Puerto
2020-08-16 17:08:27 +02:00
parent d58d84096b
commit 83567c1bd9
3 changed files with 11 additions and 3 deletions

View File

@@ -1,10 +1,12 @@
using System.Linq;
using System;
using System.Linq;
using Content.Server.GameObjects.Components.Damage;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Observer;
using Content.Server.Interfaces.Chat;
using Content.Server.Interfaces.GameObjects;
using Content.Server.Observer;
using Content.Server.Players;
using Content.Shared.GameObjects.Components.Damage;
using Robust.Server.Interfaces.Console;
@@ -168,6 +170,10 @@ namespace Content.Server.Chat
// Default suicide, bite your tongue
chat.EntityMe(owner, Loc.GetString("is attempting to bite {0:their} own tongue, looks like {0:theyre} trying to commit suicide!", owner)); //TODO: theyre macro
dmgComponent.TakeDamage(DamageType.Brute, 500, owner, owner); //TODO: dmg value needs to be a max damage of some sorts
// Prevent the player from returning to the body. Yes, this is an ugly hack.
var ghost = new Ghost(){CanReturn = false};
ghost.Execute(shell, player, Array.Empty<string>());
}
}
}