| | | 1 | | using FixedMathSharp; |
| | | 2 | | using GridForge.Configuration; |
| | | 3 | | using System; |
| | | 4 | | |
| | | 5 | | namespace Trailblazer.Pathing; |
| | | 6 | | |
| | | 7 | | internal readonly struct ExternalGridEventSignature : IEquatable<ExternalGridEventSignature> |
| | | 8 | | { |
| | | 9 | | public ExternalGridEventSignature( |
| | | 10 | | ExternalGridEventKind eventKind, |
| | | 11 | | int gridSpawnToken, |
| | | 12 | | uint gridVersion, |
| | | 13 | | GridConfiguration configuration, |
| | | 14 | | Vector3d boundsMin, |
| | | 15 | | Vector3d boundsMax) |
| | | 16 | | { |
| | 2019 | 17 | | EventKind = eventKind; |
| | 2019 | 18 | | GridSpawnToken = gridSpawnToken; |
| | 2019 | 19 | | GridVersion = gridVersion; |
| | 2019 | 20 | | Configuration = configuration; |
| | 2019 | 21 | | BoundsMin = boundsMin; |
| | 2019 | 22 | | BoundsMax = boundsMax; |
| | 2019 | 23 | | } |
| | | 24 | | |
| | | 25 | | public ExternalGridEventKind EventKind { get; } |
| | | 26 | | |
| | | 27 | | public int GridSpawnToken { get; } |
| | | 28 | | |
| | | 29 | | public uint GridVersion { get; } |
| | | 30 | | |
| | | 31 | | public GridConfiguration Configuration { get; } |
| | | 32 | | |
| | | 33 | | public Vector3d BoundsMin { get; } |
| | | 34 | | |
| | | 35 | | public Vector3d BoundsMax { get; } |
| | | 36 | | |
| | | 37 | | public bool Equals(ExternalGridEventSignature other) |
| | | 38 | | { |
| | 1290 | 39 | | return EventKind == other.EventKind |
| | 1290 | 40 | | && GridSpawnToken == other.GridSpawnToken |
| | 1290 | 41 | | && GridVersion == other.GridVersion |
| | 1290 | 42 | | && Configuration.Equals(other.Configuration) |
| | 1290 | 43 | | && BoundsMin == other.BoundsMin |
| | 1290 | 44 | | && BoundsMax == other.BoundsMax; |
| | | 45 | | } |
| | | 46 | | } |