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.Database;
|
||||||
using Content.Shared.Item;
|
using Content.Shared.Item;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
|
using Content.Shared.Tag;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
using Robust.Shared.Enums;
|
using Robust.Shared.Enums;
|
||||||
@@ -82,6 +83,17 @@ namespace Content.Server.Chat.Commands
|
|||||||
return;
|
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: needs to check if the mob is actually alive
|
||||||
//TODO: maybe set a suicided flag to prevent resurrection?
|
//TODO: maybe set a suicided flag to prevent resurrection?
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,9 @@
|
|||||||
interactSuccessString: petting-success-holo
|
interactSuccessString: petting-success-holo
|
||||||
interactFailureString: petting-failure-holo
|
interactFailureString: petting-failure-holo
|
||||||
successChance: 0.7
|
successChance: 0.7
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- CannotSuicide
|
||||||
|
|
||||||
# From the uplink injector
|
# From the uplink injector
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -123,4 +126,4 @@
|
|||||||
- state: magic_base
|
- state: magic_base
|
||||||
- state: magic_flare
|
- state: magic_flare
|
||||||
color: "#d14730"
|
color: "#d14730"
|
||||||
shader: unshaded
|
shader: unshaded
|
||||||
|
|||||||
@@ -42,6 +42,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: CanPilot
|
id: CanPilot
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: CannotSuicide
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: CaptainSabre
|
id: CaptainSabre
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user