mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add option to prevent bringing items into other systems #997
This commit is contained in:
parent
acc2cfc016
commit
6e254cd10a
@ -21,6 +21,12 @@ namespace NewHorizons.External.Configs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string name;
|
public string name;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When changing star systems are you allowed to bring items into this system?
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue(true)]
|
||||||
|
public bool allowOutsideItems = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In this system should the player be able to rotate their map camera freely or be stuck above the plane of the solar system?
|
/// In this system should the player be able to rotate their map camera freely or be stuck above the plane of the solar system?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -89,10 +89,14 @@ public static class HeldItemHandler
|
|||||||
_pathOfItemTakenFromSystem[Main.Instance.CurrentStarSystem].Add(path);
|
_pathOfItemTakenFromSystem[Main.Instance.CurrentStarSystem].Add(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnStarSystemChanging(string _)
|
private static void OnStarSystemChanging(string newSystem)
|
||||||
{
|
{
|
||||||
// Double check we're still holding it
|
// Double check we're still holding it
|
||||||
_currentlyHeldItem = Locator.GetToolModeSwapper().GetItemCarryTool().GetHeldItem()?.gameObject;
|
_currentlyHeldItem = Locator.GetToolModeSwapper().GetItemCarryTool().GetHeldItem()?.gameObject;
|
||||||
|
if (!Main.SystemDict[newSystem].Config.allowOutsideItems)
|
||||||
|
{
|
||||||
|
_currentlyHeldItem = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (_currentlyHeldItem != null)
|
if (_currentlyHeldItem != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user