Skip to content

Commit

Permalink
Add option to disable proxy generation #700
Browse files Browse the repository at this point in the history
  • Loading branch information
xen-42 committed Aug 22, 2023
1 parent 621ab4e commit 37032ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions NewHorizons/External/Modules/BaseModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ public class BaseModule
/// </summary>
public bool pushable;

/// <summary>
/// Set this to true to have no proxy be generated for this planet.
/// This is a small representation of the planet that appears when it is outside of the regular Unity camera range.
/// </summary>
public bool hideProxy;

#region Obsolete

[Obsolete("IsSatellite is deprecated, please use ShowMinimap instead")]
Expand Down
2 changes: 1 addition & 1 deletion NewHorizons/Handlers/PlanetCreationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public static GameObject GenerateStandardBody(NewHorizonsBody body, bool default
var remnant = otherBodies.Where(x => x.Config.isStellarRemnant && x.Config.name == body.Config.name).FirstOrDefault();
// TODO: add proxies for quantum states
//var quantumStates = otherBodies.Where(x => x.Config.isQuantumState && x.Config.name == body.Config.name).ToArray();
if (!(body.Config.Cloak != null && body.Config.Cloak.radius != 0f))
if (!(body.Config.Cloak != null && body.Config.Cloak.radius != 0f) && !body.Config.Base.hideProxy)
{
Delay.FireOnNextUpdate(() =>
{
Expand Down

0 comments on commit 37032ca

Please sign in to comment.