Fixes Holoparasites killing their hosts when suiciding. (#7465)
* Fixes Holoparasites from killing their hosts when suiciding * Adds the CannotSuicide tag to the Guardian Parent This way it effects all guardian types and not just holoparasites. * Adds check, fixes whitespace * Fixes the ghosting check
This commit is contained in:
@@ -12,6 +12,7 @@ using Content.Shared.Damage.Prototypes;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Enums;
|
||||
@@ -82,6 +83,17 @@ namespace Content.Server.Chat.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
//Checks to see if the CannotSuicide tag exits, ghosts instead.
|
||||
if(EntitySystem.Get<TagSystem>().HasTag(owner, "CannotSuicide"))
|
||||
{
|
||||
if (!EntitySystem.Get<GameTicker>().OnGhostAttempt(mind, true))
|
||||
{
|
||||
shell?.WriteLine("You can't ghost right now.");
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//TODO: needs to check if the mob is actually alive
|
||||
//TODO: maybe set a suicided flag to prevent resurrection?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user