Client LuaCsForBarotrauma
StructureFile.cs
1 using System.Xml.Linq;
2 
3 namespace Barotrauma
4 {
5  [RequiredByCorePackage]
6  sealed class StructureFile : GenericPrefabFile<StructurePrefab>
7  {
8  public StructureFile(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 == "prefabs" || identifier == "structures";
13  protected override StructurePrefab CreatePrefab(ContentXElement element)
14  {
15  return new StructurePrefab(element, this);
16  }
17  }
18 }
override PrefabCollection< StructurePrefab > Prefabs
override bool MatchesPlural(Identifier identifier)
override StructurePrefab CreatePrefab(ContentXElement element)
StructureFile(ContentPackage contentPackage, ContentPath path)
Definition: StructureFile.cs:8
override bool MatchesSingular(Identifier identifier)
static readonly PrefabCollection< StructurePrefab > Prefabs