Client LuaCsForBarotrauma
ItemFile.cs
1 using System.Xml.Linq;
2 
3 namespace Barotrauma
4 {
5  [RequiredByCorePackage]
6  sealed class ItemFile : GenericPrefabFile<ItemPrefab>
7  {
8  public ItemFile(ContentPackage contentPackage, ContentPath path) : base(contentPackage, path) { }
9 
10  protected override bool MatchesSingular(Identifier identifier) => !MatchesPlural(identifier);
11  protected override bool MatchesPlural(Identifier identifier) => identifier == "items";
13  protected override ItemPrefab CreatePrefab(ContentXElement element)
14  {
15  return new ItemPrefab(element, this);
16  }
17  }
18 }
override bool MatchesPlural(Identifier identifier)
override bool MatchesSingular(Identifier identifier)
override PrefabCollection< ItemPrefab > Prefabs
Definition: ItemFile.cs:12
ItemFile(ContentPackage contentPackage, ContentPath path)
Definition: ItemFile.cs:8
override ItemPrefab CreatePrefab(ContentXElement element)
Definition: ItemFile.cs:13
static readonly PrefabCollection< ItemPrefab > Prefabs