2 using System.Collections.Generic;
5 using Microsoft.Xna.Framework;
29 speciesName = parentPrefab.GetBaseCharacterSpeciesName(speciesName);
43 private void ParseConfigElement()
57 private readonly XElement originalElement;
72 if (!
Prefabs.ContainsKey(speciesName)) {
return null; }
78 return Prefabs.Find(p => p.ContentFile.Path == filePath);
88 originalElement = mainElement;
97 string name = element.GetAttributeString(
"name",
null);
98 if (!
string.IsNullOrEmpty(name))
100 DebugConsole.NewMessage($
"Error in {file.Path}: 'name' is deprecated! Use 'speciesname' instead.", Color.Orange);
104 name = element.GetAttributeString(
"speciesname",
string.Empty);
114 DebugConsole.ThrowError($
"No species name defined for: {file.Path}",
static void RemoveByPrefab(CharacterPrefab prefab)
Contains character data that should be editable in the character editor.
static XElement CreateVariantXml(XElement variantXML, XElement baseXML)
static bool CheckSpeciesName(XElement mainElement, CharacterFile file, out Identifier name)
static readonly Identifier HumanGroup
static IEnumerable< ContentXElement > ConfigElements
static CharacterPrefab FindByFilePath(string filePath)
static CharacterFile HumanConfigFile
void InheritFrom(CharacterPrefab parent)
CharacterPrefab(ContentXElement mainElement, CharacterFile file)
static CharacterPrefab Find(Predicate< CharacterPrefab > predicate)
Identifier GetBaseCharacterSpeciesName(Identifier speciesName)
static CharacterPrefab FindBySpeciesName(Identifier speciesName)
CharacterInfoPrefab CharacterInfoPrefab
ContentXElement ConfigElement
static Identifier ParseName(XElement element, CharacterFile file)
CharacterPrefab ParentPrefab
static readonly PrefabCollection< CharacterPrefab > Prefabs
static readonly Identifier HumanSpeciesName
readonly ContentPackage ContentPackage
ContentPackage? ContentPackage
ContentXElement? GetChildElement(string name)
bool GetAttributeBool(string key, bool def)
readonly ContentFile ContentFile
readonly Identifier Identifier
Prefab that has a property serves as a deterministic hash of a prefab's identifier....