Add teleporter logs (#13375)
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Content.Shared.Teleportation.Systems;
|
||||
/// <summary>
|
||||
/// Handles symmetrically linking two entities together, and removing links properly.
|
||||
/// This does not do anything on its own (outside of deleting entities that have 0 links, if that option is true)
|
||||
/// Systems can do whatever they please with the linked entities, such as <see cref="PortalSystem"/>.
|
||||
/// Systems can do whatever they please with the linked entities, such as <see cref="SharedPortalSystem"/>.
|
||||
/// </summary>
|
||||
public sealed class LinkedEntitySystem : EntitySystem
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Content.Shared.Teleportation.Systems;
|
||||
/// <summary>
|
||||
/// This handles teleporting entities through portals, and creating new linked portals.
|
||||
/// </summary>
|
||||
public sealed class PortalSystem : EntitySystem
|
||||
public abstract class SharedPortalSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly INetManager _netMan = default!;
|
||||
@@ -153,9 +153,16 @@ public sealed class PortalSystem : EntitySystem
|
||||
projectile.IgnoreShooter = false;
|
||||
}
|
||||
|
||||
LogTeleport(portal, subject, Transform(subject).Coordinates, target);
|
||||
|
||||
Transform(subject).Coordinates = target;
|
||||
|
||||
_audio.PlayPredicted(departureSound, portal, subject);
|
||||
_audio.PlayPredicted(arrivalSound, subject, subject);
|
||||
}
|
||||
|
||||
protected virtual void LogTeleport(EntityUid portal, EntityUid subject, EntityCoordinates source,
|
||||
EntityCoordinates target)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user