mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 12:05:23 +01:00
GetPlanet bugfix (#1122)
## Bug fixes - Make GetPlanet only check planets in the current system. This prevents it from pulling the wrong config if a planet in another system has the same name.
This commit is contained in:
commit
4982f2a69a
@ -83,7 +83,7 @@ namespace NewHorizons
|
||||
|
||||
public GameObject GetPlanet(string name)
|
||||
{
|
||||
return Main.BodyDict.Values.SelectMany(x => x)?.ToList()?.FirstOrDefault(x => x.Config.name == name)?.Object;
|
||||
return Main.BodyDict[Main.Instance.CurrentStarSystem].FirstOrDefault(x => x.Config.name == name)?.Object;
|
||||
}
|
||||
|
||||
public string GetCurrentStarSystem() => Main.Instance.CurrentStarSystem;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user