Add probe volumes

This commit is contained in:
Noah Pilarski 2022-11-25 17:23:13 -05:00
parent f33a820c94
commit 49996e5f48
2 changed files with 36 additions and 0 deletions

View File

@ -106,6 +106,23 @@ namespace NewHorizons.Builder.Volumes
FluidVolumeBuilder.Make(go, sector, fluidVolume); FluidVolumeBuilder.Make(go, sector, fluidVolume);
} }
} }
if (config.Volumes.probe != null)
{
if (config.Volumes.probe.destructionVolumes != null)
{
foreach (var destructionVolume in config.Volumes.probe.destructionVolumes)
{
VolumeBuilder.Make<ProbeDestructionVolume>(go, sector, destructionVolume);
}
}
if (config.Volumes.probe.safetyVolumes != null)
{
foreach (var safetyVolume in config.Volumes.probe.safetyVolumes)
{
VolumeBuilder.Make<ProbeSafetyVolume>(go, sector, safetyVolume);
}
}
}
} }
} }
} }

View File

@ -60,6 +60,11 @@ namespace NewHorizons.External.Modules
/// </summary> /// </summary>
public OxygenVolumeInfo[] oxygenVolumes; public OxygenVolumeInfo[] oxygenVolumes;
/// <summary>
/// Add probe-specific volumes to this planet.
/// </summary>
public ProbeModule probe;
/// <summary> /// <summary>
/// Add triggers that reveal parts of the ship log on this planet. /// Add triggers that reveal parts of the ship log on this planet.
/// </summary> /// </summary>
@ -384,6 +389,20 @@ namespace NewHorizons.External.Modules
[EnumMember(Value = @"fog")] FOG [EnumMember(Value = @"fog")] FOG
} }
} }
[JsonObject]
public class ProbeModule
{
/// <summary>
/// Add probe destruction volumes to this planet. These will delete your probe.
/// </summary>
public VolumeInfo[] destructionVolumes;
/// <summary>
/// Add probe safety volumes to this planet. These will stop the probe destruction volumes from working.
/// </summary>
public VolumeInfo[] safetyVolumes;
}
} }
[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(StringEnumConverter))]