- Added support for animated projectiles - Refactoring - Removed useless fields - Fixed swords not dealing damages - Added Hour Hand (from Evie's PR)
28 lines
649 B
C#
28 lines
649 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Decimation.Lib.Amulets;
|
|
using Terraria;
|
|
|
|
namespace Decimation.Lib.Collections
|
|
{
|
|
public class AmuletList : List<Amulet>
|
|
{
|
|
|
|
private static readonly AmuletList _instance = new AmuletList();
|
|
public static AmuletList Instance { get; } = _instance;
|
|
private AmuletList() { }
|
|
|
|
public Amulet GetAmuletForItem(Item item)
|
|
{
|
|
return this.FirstOrDefault(amulet => amulet.item.type == item.type);
|
|
}
|
|
|
|
public bool Contains(Item item)
|
|
{
|
|
return GetAmuletForItem(item) != null;
|
|
}
|
|
|
|
}
|
|
}
|