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

@@ -15,7 +15,7 @@ public sealed class TryStartStructureConstructionMessage : EntityEventArgs
/// <summary>
/// Position to start building.
/// </summary>
public readonly EntityCoordinates Location;
public readonly NetCoordinates Location;
/// <summary>
/// The construction prototype to start building.
@@ -27,9 +27,13 @@ public sealed class TryStartStructureConstructionMessage : EntityEventArgs
/// <summary>
/// Identifier to be sent back in the acknowledgement so that the client can clean up its ghost.
/// </summary>
/// <remarks>
/// So essentially the client is sending its own entity to the server so it knows to delete it when it gets server
/// response back.
/// </remarks>
public readonly int Ack;
public TryStartStructureConstructionMessage(EntityCoordinates loc, string prototypeName, Angle angle, int ack)
public TryStartStructureConstructionMessage(NetCoordinates loc, string prototypeName, Angle angle, int ack)
{
Location = loc;
PrototypeName = prototypeName;
@@ -67,9 +71,9 @@ public sealed class AckStructureConstructionMessage : EntityEventArgs
/// <summary>
/// The entity that is now being constructed, if any.
/// </summary>
public readonly EntityUid? Uid;
public readonly NetEntity? Uid;
public AckStructureConstructionMessage(int ghostId, EntityUid? uid = null)
public AckStructureConstructionMessage(int ghostId, NetEntity? uid = null)
{
GhostId = ghostId;
Uid = uid;
@@ -110,15 +114,15 @@ public sealed class ResponseConstructionGuide : EntityEventArgs
public sealed partial class ConstructionInteractDoAfterEvent : DoAfterEvent
{
[DataField("clickLocation")]
public EntityCoordinates ClickLocation;
public NetCoordinates ClickLocation;
private ConstructionInteractDoAfterEvent()
{
}
public ConstructionInteractDoAfterEvent(InteractUsingEvent ev)
public ConstructionInteractDoAfterEvent(IEntityManager entManager, InteractUsingEvent ev)
{
ClickLocation = ev.ClickLocation;
ClickLocation = entManager.GetNetCoordinates(ev.ClickLocation);
}
public override DoAfterEvent Clone() => this;