-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add map marker display distance overrides and make a map marker module (
- Loading branch information
Showing
9 changed files
with
102 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace NewHorizons.Components | ||
{ | ||
public class NHMapMarker : MapMarker | ||
{ | ||
public float minDisplayDistanceOverride = -1; | ||
public float maxDisplayDistanceOverride = -1; | ||
|
||
public new void Awake() | ||
{ | ||
base.Awake(); | ||
if (minDisplayDistanceOverride >= 0) | ||
{ | ||
_minDisplayDistance = minDisplayDistanceOverride; | ||
} | ||
if (maxDisplayDistanceOverride >= 0) | ||
{ | ||
_maxDisplayDistance = maxDisplayDistanceOverride; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.ComponentModel; | ||
using NewHorizons.External.SerializableData; | ||
using Newtonsoft.Json; | ||
|
||
namespace NewHorizons.External.Modules | ||
{ | ||
[JsonObject] | ||
public class MapMarkerModule | ||
{ | ||
/// <summary> | ||
/// If the body should have a marker on the map screen. | ||
/// </summary> | ||
public bool enabled; | ||
|
||
/// <summary> | ||
/// Lowest distance away from the body that the marker can be shown. This is automatically set to 0 for all bodies except focal points where it is 5,000. | ||
/// </summary> | ||
public float minDisplayDistanceOverride = -1; | ||
|
||
/// <summary> | ||
/// Highest distance away from the body that the marker can be shown. For planets and focal points the automatic value is 50,000. Moons and planets in focal points are 5,000. Stars are 1E+10 (10,000,000,000). | ||
/// </summary> | ||
public float maxDisplayDistanceOverride = -1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters