Content update for NetEntities (#18935)

This commit is contained in:
metalgearsloth
2023-09-11 09:42:41 +10:00
committed by GitHub
parent 389c8d1a2c
commit 5a0fc68be2
526 changed files with 3058 additions and 2215 deletions

View File

@@ -44,9 +44,12 @@ public sealed partial class DoAfter
/// <summary>
/// Position of the user relative to their parent when the do after was started.
/// </summary>
[NonSerialized]
[DataField("userPosition")]
public EntityCoordinates UserPosition;
public NetCoordinates NetUserPosition;
/// <summary>
/// Distance from the user to the target when the do after was started.
/// </summary>
@@ -62,9 +65,12 @@ public sealed partial class DoAfter
/// <summary>
/// If <see cref="NeedHand"/> is true, this is the entity that was in the active hand when the doafter started.
/// </summary>
[NonSerialized]
[DataField("activeItem")]
public EntityUid? InitialItem;
public NetEntity? NetInitialItem;
// cached attempt event for the sake of avoiding unnecessary reflection every time this needs to be raised.
[NonSerialized] public object? AttemptEvent;
@@ -86,7 +92,7 @@ public sealed partial class DoAfter
StartTime = startTime;
}
public DoAfter(DoAfter other)
public DoAfter(IEntityManager entManager, DoAfter other)
{
Index = other.Index;
Args = new(other.Args);
@@ -97,6 +103,9 @@ public sealed partial class DoAfter
TargetDistance = other.TargetDistance;
InitialHand = other.InitialHand;
InitialItem = other.InitialItem;
NetUserPosition = other.NetUserPosition;
NetInitialItem = other.NetInitialItem;
}
}