Ghost Teleporting (#2071)

* Fix?

Nuked everything and put my code back in, hope everything works

* Nullable fix?

* nullable fix electric boogaloo

* Haha nullable error go brrr

send help

* Cleanup and fix not clearing the button list

* Remove unnecessary brackets and parentheses

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
NuclearWinter
2020-10-16 13:36:20 -05:00
committed by GitHub
parent b1fe4bad01
commit b4ea6857cd
5 changed files with 298 additions and 35 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using Content.Shared.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
@@ -17,8 +18,6 @@ namespace Content.Shared.GameObjects.Components.Observer
public bool CanPickup() => false;
public bool CanEmote() => false;
public bool CanAttack() => false;
public bool CanShiver() => false;
public bool CanSweat() => false;
}
[Serializable, NetSerializable]
@@ -35,7 +34,65 @@ namespace Content.Shared.GameObjects.Components.Observer
[Serializable, NetSerializable]
public class ReturnToBodyComponentMessage : ComponentMessage
{
public ReturnToBodyComponentMessage() => Directed = true;
public ReturnToBodyComponentMessage()
{
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostWarpRequestMessage : ComponentMessage
{
public EntityUid PlayerTarget;
public string WarpName;
public GhostWarpRequestMessage(EntityUid playerTarget = default, string warpTarget = default)
{
WarpName = warpTarget;
PlayerTarget = playerTarget;
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostRequestWarpPointData : ComponentMessage
{
public GhostRequestWarpPointData()
{
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostRequestPlayerNameData : ComponentMessage
{
public GhostRequestPlayerNameData()
{
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostReplyWarpPointData : ComponentMessage
{
public List<string> WarpName;
public GhostReplyWarpPointData(List<string> warpName)
{
WarpName = warpName;
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostReplyPlayerNameData : ComponentMessage
{
public Dictionary<EntityUid,string> PlayerNames;
public GhostReplyPlayerNameData(Dictionary<EntityUid, string> playerNameDict)
{
PlayerNames = playerNameDict;
Directed = true;
}
}
@@ -45,3 +102,5 @@ namespace Content.Shared.GameObjects.Components.Observer
public ReturnToCloneComponentMessage() => Directed = true;
}
}