Vessel warp prompt fact (#300)

Fixes #295
This commit is contained in:
Nick 2022-08-25 21:41:37 -04:00 committed by GitHub
commit 03f1e8dcf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 6 deletions

View File

@ -15,7 +15,7 @@ namespace NewHorizons.External.Configs
public class StarSystemConfig
{
/// <summary>
/// Whether this system can be warped to via the warp drive
/// Whether this system can be warped to via the warp drive. If you set factRequiredForWarp, this will be true.
/// </summary>
[DefaultValue(true)] public bool canEnterViaWarpDrive = true;
@ -30,8 +30,8 @@ namespace NewHorizons.External.Configs
[DefaultValue(true)] public bool enableTimeLoop = true;
/// <summary>
/// Set to the FactID that must be revealed before it can be warped to. Don't set `CanEnterViaWarpDrive` to `false` if
/// you're using this, that would make no sense.
/// The FactID that must be revealed before it can be warped to. Don't set `canEnterViaWarpDrive` to `false` if
/// you're using this, because it will be overwritten.
/// </summary>
public string factRequiredForWarp;
@ -189,6 +189,11 @@ namespace NewHorizons.External.Configs
/// Euler angles by which the warp exit will be oriented.
/// </summary>
public MVector3 warpExitRotation;
/// <summary>
/// A ship log fact which will make a prompt appear showing the coordinates when you're in the Vessel.
/// </summary>
public string promptFact;
}
/// <summary>

View File

@ -31,7 +31,7 @@ namespace NewHorizons.Handlers
foreach (var system in systems)
{
var systemName = system.UniqueID;
var fact = system.Config.factRequiredForWarp;
var fact = system.Config.Vessel.promptFact;
var nomaiCoords = system.Config.Vessel?.coords;
if (system.UniqueID == "EyeOfTheUniverse" || nomaiCoords == null) continue;

View File

@ -7,7 +7,7 @@
"properties": {
"canEnterViaWarpDrive": {
"type": "boolean",
"description": "Whether this system can be warped to via the warp drive",
"description": "Whether this system can be warped to via the warp drive. If you set factRequiredForWarp, this will be true.",
"default": true
},
"destroyStockPlanets": {
@ -22,7 +22,7 @@
},
"factRequiredForWarp": {
"type": "string",
"description": "Set to the FactID that must be revealed before it can be warped to. Don't set `CanEnterViaWarpDrive` to `false` if\nyou're using this, that would make no sense."
"description": "The FactID that must be revealed before it can be warped to. Don't set `canEnterViaWarpDrive` to `false` if\nyou're using this, because it will be overwritten."
},
"loopDuration": {
"type": "number",
@ -138,6 +138,10 @@
"warpExitRotation": {
"description": "Euler angles by which the warp exit will be oriented.",
"$ref": "#/definitions/MVector3"
},
"promptFact": {
"type": "string",
"description": "A ship log fact which will make a prompt appear showing the coordinates when you're in the Vessel."
}
}
},