ModernUO/Projects/UOContent/Engines/Craft/Core/CraftSubResCol.cs
2020-09-13 21:49:46 -07:00

34 lines
770 B
C#

using System;
using System.Collections.Generic;
namespace Server.Engines.Craft
{
public class CraftSubResCol : List<CraftSubRes>
{
public CraftSubResCol() => Init = false;
public bool Init { get; set; }
public Type ResType { get; set; }
public string NameString { get; set; }
public int NameNumber { get; set; }
public CraftSubRes GetAt(int index) => this[index];
public CraftSubRes SearchFor(Type type)
{
for (var i = 0; i < Count; i++)
{
var craftSubRes = this[i];
if (craftSubRes.ItemType == type)
{
return craftSubRes;
}
}
return null;
}
}
}