PathPoly.cs 889 B

1234567891011121314151617181920212223242526272829303132
  1. using Robust.Shared.Map;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.NPC;
  4. /*
  5. * I bikeshedded a lot on how to do this and I'm still not entirely happy.
  6. * The main thing is you need a weak ref to the poly because it may be invalidated due to graph updates.
  7. * I had a struct version but you still need to store the neighbors somewhere, maybe on the chunk itself?
  8. * Future dev work required.
  9. */
  10. /// <summary>
  11. /// A path poly to be used for networked debug purposes.
  12. /// </summary>
  13. [Serializable, NetSerializable]
  14. public sealed class DebugPathPoly
  15. {
  16. public NetEntity GraphUid;
  17. public Vector2i ChunkOrigin;
  18. public byte TileIndex;
  19. public Box2 Box;
  20. public PathfindingData Data;
  21. public List<NetCoordinates> Neighbors = default!;
  22. }
  23. [Serializable, NetSerializable]
  24. public sealed class DebugPathPolyNeighbor
  25. {
  26. public NetCoordinates Coordinates;
  27. }