Client LuaCsForBarotrauma
UpgradeModulesFile.cs
1
using
System.Xml.Linq;
2
3
namespace
Barotrauma
4
{
5
[RequiredByCorePackage]
6
sealed
class
UpgradeModulesFile
:
GenericPrefabFile
<UpgradeContentPrefab>
7
{
8
public
UpgradeModulesFile
(
ContentPackage
contentPackage,
ContentPath
path) : base(contentPackage, path) { }
9
10
protected
override
bool
MatchesSingular
(Identifier identifier) =>
11
identifier ==
"upgrademodule"
||
12
identifier ==
"upgradecategory"
;
13
14
protected
override
bool
MatchesPlural
(Identifier identifier) =>
15
identifier ==
"upgrademodules"
;
16
17
protected
override
PrefabCollection<UpgradeContentPrefab>
Prefabs
=>
UpgradeContentPrefab
.
PrefabsAndCategories
;
18
protected
override
UpgradeContentPrefab
CreatePrefab
(
ContentXElement
element)
19
{
20
Identifier elemName = element.
NameAsIdentifier
();
21
if
(elemName ==
"upgradecategory"
)
22
{
23
return
new
UpgradeCategory(element,
this
);
24
}
25
else
26
{
27
return
new
UpgradePrefab(element,
this
);
28
}
29
}
30
}
31
}
Barotrauma.ContentPackage
Definition:
ContentPackage.cs:18
Barotrauma.ContentPath
Definition:
ContentPath.cs:11
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.NameAsIdentifier
Identifier NameAsIdentifier()
Barotrauma.GenericPrefabFile
Definition:
GenericPrefabFile.cs:7
Barotrauma.PrefabCollection
Definition:
PrefabCollection.cs:14
Barotrauma.UpgradeContentPrefab
Definition:
BarotraumaShared/SharedSource/Upgrades/UpgradePrefab.cs:79
Barotrauma.UpgradeContentPrefab.PrefabsAndCategories
static readonly PrefabCollection< UpgradeContentPrefab > PrefabsAndCategories
Definition:
BarotraumaShared/SharedSource/Upgrades/UpgradePrefab.cs:80
Barotrauma.UpgradeModulesFile
Definition:
UpgradeModulesFile.cs:7
Barotrauma.UpgradeModulesFile.MatchesPlural
override bool MatchesPlural(Identifier identifier)
Barotrauma.UpgradeModulesFile.CreatePrefab
override UpgradeContentPrefab CreatePrefab(ContentXElement element)
Definition:
UpgradeModulesFile.cs:18
Barotrauma.UpgradeModulesFile.Prefabs
override PrefabCollection< UpgradeContentPrefab > Prefabs
Definition:
UpgradeModulesFile.cs:17
Barotrauma.UpgradeModulesFile.UpgradeModulesFile
UpgradeModulesFile(ContentPackage contentPackage, ContentPath path)
Definition:
UpgradeModulesFile.cs:8
Barotrauma.UpgradeModulesFile.MatchesSingular
override bool MatchesSingular(Identifier identifier)
Barotrauma
Definition:
AchievementManager.cs:12
Barotrauma
BarotraumaShared
SharedSource
ContentManagement
ContentFile
UpgradeModulesFile.cs
Generated by
1.9.1