mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
respawnHere
This commit is contained in:
parent
a974f354fd
commit
fd9dc69fb1
10
NewHorizons/External/Configs/StarSystemConfig.cs
vendored
10
NewHorizons/External/Configs/StarSystemConfig.cs
vendored
@ -56,11 +56,17 @@ namespace NewHorizons.External.Configs
|
||||
public SkyboxModule Skybox;
|
||||
|
||||
/// <summary>
|
||||
/// Set to `true` if you want to spawn here after dying, not Timber Hearth. You can still warp back to the main star
|
||||
/// Set to `true` if you want to spawn here after dying, not Timber Hearth. You can still warp back to the main star.
|
||||
/// system.
|
||||
/// </summary>
|
||||
public bool startHere;
|
||||
|
||||
/// <summary>
|
||||
/// Set to `true` if you want the player to stay in this star system if they die in it.
|
||||
/// system.
|
||||
/// </summary>
|
||||
public bool respawnHere;
|
||||
|
||||
[Obsolete("travelAudioClip is deprecated, please use travelAudio instead")]
|
||||
public string travelAudioClip;
|
||||
|
||||
@ -238,7 +244,7 @@ namespace NewHorizons.External.Configs
|
||||
|
||||
// False by default so if one is true go true
|
||||
mapRestricted = mapRestricted || otherConfig.mapRestricted;
|
||||
mapRestricted = mapRestricted || otherConfig.mapRestricted;
|
||||
respawnHere = respawnHere || otherConfig.respawnHere;
|
||||
startHere = startHere || otherConfig.startHere;
|
||||
|
||||
Vessel = Vessel == null ? otherConfig.Vessel : Vessel;
|
||||
|
||||
@ -819,18 +819,17 @@ namespace NewHorizons
|
||||
// We reset the solar system on death
|
||||
if (!IsChangingStarSystem)
|
||||
{
|
||||
if (SystemDict[_currentStarSystem].Config.respawnHere) return;
|
||||
|
||||
// If the override is a valid system then we go there
|
||||
if (SystemDict.ContainsKey(_defaultSystemOverride))
|
||||
{
|
||||
_currentStarSystem = _defaultSystemOverride;
|
||||
IsWarpingFromShip = true; // always do this else sometimes the spawn gets messed up
|
||||
}
|
||||
else
|
||||
{
|
||||
_currentStarSystem = _defaultStarSystem;
|
||||
}
|
||||
|
||||
IsWarpingFromShip = false;
|
||||
}
|
||||
}
|
||||
#endregion Change star system
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user