Client LuaCsForBarotrauma
ParticlesFile.cs
1 using System.Xml.Linq;
2 #if CLIENT
4 #endif
5 
6 namespace Barotrauma
7 {
8  [RequiredByCorePackage]
9  [NotSyncedInMultiplayer]
10 #if CLIENT
11  sealed class ParticlesFile : GenericPrefabFile<ParticlePrefab>
12  {
13  public ParticlesFile(ContentPackage contentPackage, ContentPath path) : base(contentPackage, path) { }
14 
15  protected override bool MatchesSingular(Identifier identifier) => !MatchesPlural(identifier);
16  protected override bool MatchesPlural(Identifier identifier) => identifier == "prefabs" || identifier == "particles";
18  protected override ParticlePrefab CreatePrefab(ContentXElement element)
19  {
20  return new ParticlePrefab(element, this);
21  }
22 
23  public override Md5Hash CalculateHash() => Md5Hash.Blank;
24  }
25 #else
26  sealed class ParticlesFile : OtherFile
27  {
28  public ParticlesFile(ContentPackage contentPackage, ContentPath path) : base(contentPackage, path) { } //this content type doesn't do anything on a server
29  }
30 #endif
31 }
static readonly Md5Hash Blank
Definition: Md5Hash.cs:14
static readonly PrefabCollection< ParticlePrefab > Prefabs
override ParticlePrefab CreatePrefab(ContentXElement element)
override PrefabCollection< ParticlePrefab > Prefabs
override bool MatchesSingular(Identifier identifier)
override Md5Hash CalculateHash()
ParticlesFile(ContentPackage contentPackage, ContentPath path)
override bool MatchesPlural(Identifier identifier)