Files
OldThink/Content.Shared/Ghost/SharedGhostSystem.cs

68 lines
1.6 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.Ghost
{
public abstract class SharedGhostSystem : EntitySystem
{
2021-08-06 00:02:36 -07:00
public void SetCanReturnToBody(SharedGhostComponent component, bool canReturn)
{
2021-08-06 00:02:36 -07:00
if (component.CanReturnToBody == canReturn)
{
return;
}
2021-08-06 00:02:36 -07:00
component.CanReturnToBody = canReturn;
component.Dirty();
}
}
[Serializable, NetSerializable]
public class GhostWarpsRequestEvent : EntityEventArgs
{
}
[Serializable, NetSerializable]
public class GhostWarpsResponseEvent : EntityEventArgs
{
public GhostWarpsResponseEvent(List<string> locations, Dictionary<EntityUid, string> players)
{
Locations = locations;
Players = players;
}
public List<string> Locations { get; }
public Dictionary<EntityUid, string> Players { get; }
}
[Serializable, NetSerializable]
public class GhostWarpToLocationRequestEvent : EntityEventArgs
{
public string Name { get; }
public GhostWarpToLocationRequestEvent(string name)
{
Name = name;
}
}
[Serializable, NetSerializable]
public class GhostWarpToTargetRequestEvent : EntityEventArgs
{
public EntityUid Target { get; }
public GhostWarpToTargetRequestEvent(EntityUid target)
{
Target = target;
}
}
[Serializable, NetSerializable]
public class GhostReturnToBodyRequest : EntityEventArgs
{
}
}