Cloning rework (#3808)

* Fix cloning

* Fix cloning after clone dies and remove unneeded code

* Fix ignored

Co-authored-by: Silver <silvertorch5@gmail.com>
This commit is contained in:
ShadowCommander
2021-05-11 16:16:08 -07:00
committed by GitHub
parent d41fc24834
commit c2d66723a3
8 changed files with 191 additions and 148 deletions

View File

@@ -95,13 +95,6 @@ namespace Content.Server.GameObjects.Components.Observer
}
break;
}
case ReturnToCloneComponentMessage _:
if (Owner.TryGetComponent(out VisitingMindComponent? mind) && mind.Mind != null)
{
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new GhostReturnMessage(mind.Mind));
}
break;
case GhostWarpToLocationRequestMessage warp:
{
if (session?.AttachedEntity != Owner)
@@ -191,15 +184,5 @@ namespace Content.Server.GameObjects.Components.Observer
message.AddMarkup(Loc.GetString("Died [color=yellow]{0}[/color].", deathTimeInfo));
}
public class GhostReturnMessage : EntityEventArgs
{
public GhostReturnMessage(Mind sender)
{
Sender = sender;
}
public Mind Sender { get; }
}
}
}