feat: Adds Next/Prev for future link list support (#1546)

This commit is contained in:
Kamron Batman 2023-10-14 19:43:10 -07:00 • committed by GitHub
parent fbd194339a
commit c2d6578955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 493 additions and 5 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Server.Collections;
using Server.Json;
using Server.Logging;
using Server.Network;
@ -117,7 +118,7 @@ public enum MusicName
NoMusic = 0x1FFF
}
public class Region : IComparable<Region>
public class Region : IComparable<Region>, IValueLinkListNode<Region>
{
private static readonly ILogger logger = LogFactory.GetLogger(typeof(Region));
@ -175,6 +176,16 @@ public class Region : IComparable<Region>
}
}
// Sectors
[JsonIgnore]
public Region Next { get; set; }
[JsonIgnore]
public Region Previous { get; set; }
[JsonIgnore]
public bool OnLinkList { get; set; }
// Used during deserialization only
public Expansion MinExpansion { get; set; } = Expansion.None;