1 using System.Collections.Immutable;
52 if (tutorialCharacterElement !=
null)
55 .GetAttributeIdentifierArray(
"startingitemtags",
new Identifier[0])
64 if (bannerElement !=
null)
75 NextTutorialIdentifier: endMessageElement.GetAttributeIdentifier(
"nexttutorial",
Identifier.Empty));
81 if (tutorialCharacterElement ==
null)
86 Identifier jobPrefabIdentifier = tutorialCharacterElement.GetAttributeIdentifier(
"jobidentifier",
"assistant");
91 int jobVariant = tutorialCharacterElement.GetAttributeInt(
"variant", 0);
92 var characterInfo =
new CharacterInfo(speciesName, jobOrJobPrefab: jobPrefab, variant: jobVariant);
93 foreach (var skillElement
in tutorialCharacterElement.GetChildElements(
"skill"))
95 Identifier skillIdentifier = skillElement.GetAttributeIdentifier(
"identifier",
"");
96 if (skillIdentifier.IsEmpty) {
continue; }
97 float level = skillElement.GetAttributeFloat(
"level", 0.0f);
98 characterInfo.SetSkillLevel(skillIdentifier, level);
100 return characterInfo;
Stores information about the Character that is needed between rounds in the menu etc....
static readonly Identifier HumanSpeciesName
Base class for content file types, which are loaded from filelist.xml via reflection....
static ContentPath FromRaw(string? rawValue)
string? GetAttributeString(string key, string? def)
ContentPath? GetAttributeContentPath(string key)
ContentXElement? GetChildElement(string name)
bool GetAttributeBool(string key, bool def)
int GetAttributeInt(string key, int def)
Identifier GetAttributeIdentifier(string key, string def)
static readonly PrefabCollection< JobPrefab > Prefabs
static void UpdateInstanceTutorialButtons()
readonly Identifier Identifier
readonly record struct EndMessageInfo(EndType EndType, Identifier NextTutorialIdentifier)
static readonly PrefabCollection< TutorialPrefab > Prefabs
readonly bool AllowCharacterSwitch
readonly ImmutableArray< Identifier > StartingItemTags
readonly ContentPath SubmarinePath
TutorialPrefab(ContentFile file, ContentXElement element)
readonly Identifier EventIdentifier
readonly ContentPath OutpostPath
readonly EndMessageInfo EndMessage
readonly string LevelSeed
CharacterInfo GetTutorialCharacterInfo()
readonly bool DisableBotConversations
readonly string LevelParams