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.Runtime.CompilerServices;
using Server.Collections;
using Server.ContextMenus;
using Server.Items;
using Server.Logging;
@ -175,7 +176,7 @@ public enum ExpandFlag
Spawner = 0x100
}
public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEntity
public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEntity, IValueLinkListNode<Item>
{
private static readonly ILogger logger = LogFactory.GetLogger(typeof(Item));
@ -253,6 +254,11 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
}
}
// Sectors
public Item Next { get; set; }
public Item Previous { get; set; }
public bool OnLinkList { get; set; }
/// <summary>
/// The <see cref="Mobile" /> who is currently <see cref="Mobile.Holding">holding</see> this item.
/// </summary>