diff --git a/LethalLevelLoader/Components/ExtendedContent/ExtendedLevel.cs b/LethalLevelLoader/Components/ExtendedContent/ExtendedLevel.cs index 5ee382a..4591fd4 100644 --- a/LethalLevelLoader/Components/ExtendedContent/ExtendedLevel.cs +++ b/LethalLevelLoader/Components/ExtendedContent/ExtendedLevel.cs @@ -186,14 +186,11 @@ internal static string GetNumberlessPlanetName(SelectableLevel selectableLevel) internal void SetLevelID() { - if (ContentType == ContentType.Custom) - { - SelectableLevel.levelID = PatchedContent.ExtendedLevels.IndexOf(this); - if (RouteNode != null) - RouteNode.displayPlanetInfo = SelectableLevel.levelID; - if (RouteConfirmNode != null) - RouteConfirmNode.buyRerouteToMoon = SelectableLevel.levelID; - } + SelectableLevel.levelID = PatchedContent.ExtendedLevels.IndexOf(this); + if (RouteNode != null) + RouteNode.displayPlanetInfo = SelectableLevel.levelID; + if (RouteConfirmNode != null) + RouteConfirmNode.buyRerouteToMoon = SelectableLevel.levelID; } internal void SetExtendedDungeonFlowMatches() diff --git a/LethalLevelLoader/General/Patches.cs b/LethalLevelLoader/General/Patches.cs index ace94ce..f4cc16b 100644 --- a/LethalLevelLoader/General/Patches.cs +++ b/LethalLevelLoader/General/Patches.cs @@ -196,7 +196,7 @@ internal static void StartOfRoundAwake_Prefix(StartOfRound __instance) //Initialize ExtendedContent Objects For Custom Content. AssetBundleLoader.InitializeBundles(); - foreach (ExtendedLevel extendedLevel in PatchedContent.CustomExtendedLevels) + foreach (ExtendedLevel extendedLevel in PatchedContent.ExtendedLevels) extendedLevel.SetLevelID(); //Some Debugging. diff --git a/LethalLevelLoader/Tools/AssetBundleLoader.cs b/LethalLevelLoader/Tools/AssetBundleLoader.cs index 352e211..72b8ed1 100644 --- a/LethalLevelLoader/Tools/AssetBundleLoader.cs +++ b/LethalLevelLoader/Tools/AssetBundleLoader.cs @@ -472,13 +472,22 @@ internal static void CreateVanillaExtendedLevels(StartOfRound startOfRound) ExtendedLevel extendedLevel = ExtendedLevel.Create(selectableLevel); foreach (CompatibleNoun compatibleRouteNoun in TerminalManager.routeKeyword.compatibleNouns) - if (compatibleRouteNoun.noun.name.Contains(ExtendedLevel.GetNumberlessPlanetName(selectableLevel))) + { + + string comparedName = compatibleRouteNoun.noun.name; + switch(comparedName) + { + // Terminal node noun is called "CompanyMoon", not "Gordion" so it will never grab the respective nodes if we don't change the compared name + case "CompanyMoon": comparedName = "Gordion"; break; + } + if (comparedName.Contains(ExtendedLevel.GetNumberlessPlanetName(selectableLevel))) { extendedLevel.RouteNode = compatibleRouteNoun.result; extendedLevel.RouteConfirmNode = compatibleRouteNoun.result.terminalOptions[1].result; extendedLevel.RoutePrice = compatibleRouteNoun.result.itemCost; break; } + } PatchedContent.AllLevelSceneNames.Add(extendedLevel.SelectableLevel.sceneName); extendedLevel.Initialize("Lethal Company", generateTerminalAssets: false);