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