Closed Hydraxous closed 5 months ago
There also seems to be an ancient method called GetLevel
in Plugin.cs which I rarely used
public static LevelContainer GetLevel(string id)
{
foreach (AngryBundleContainer container in angryBundles.Values)
{
foreach (LevelContainer level in container.levels.Values)
{
if (level.field.data.uniqueIdentifier == id)
return level;
}
}
return null;
}
yeah no idea why I did not make that sort of method
ooooh I didnt even see that
epic fail
public static bool TryFindLevel(string id, out LevelContainer level)
{
level = null;
foreach (AngryBundleContainer container in Plugin.angryBundles.Values)
{
foreach (LevelContainer levelContainer in container.levels.Values)
{
if (level.data.uniqueIdentifier == id) // not level, levelContainer
{
level = levelContainer;
return true;
}
}
}
return false;
}
I'm sorry.
Allows AbruptLevelChanger to load angry levels by id.
Also im not sure why the FinalRank file looks like the whole file was replaced, it might be formatting or something im not sure. The patch for FinalRank.ChangeLevel was the only thing actually changed in that file.