Make a base volume info

This commit is contained in:
Noah Pilarski 2022-08-31 15:19:25 -04:00
parent a3b104ef46
commit 8d04dc23b4

View File

@ -35,7 +35,21 @@ namespace NewHorizons.External.Modules
public RevealVolumeInfo[] revealVolumes; public RevealVolumeInfo[] revealVolumes;
[JsonObject] [JsonObject]
public class RevealVolumeInfo public class VolumeInfo
{
/// <summary>
/// The location of this volume. Optional (will default to 0,0,0).
/// </summary>
public MVector3 position;
/// <summary>
/// The radius of this volume.
/// </summary>
public float radius = 1f;
}
[JsonObject]
public class RevealVolumeInfo : VolumeInfo
{ {
[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(StringEnumConverter))]
public enum RevealVolumeType public enum RevealVolumeType
@ -57,16 +71,6 @@ namespace NewHorizons.External.Modules
/// </summary> /// </summary>
public float maxDistance = -1f; // Snapshot & Observe Only public float maxDistance = -1f; // Snapshot & Observe Only
/// <summary>
/// The position to place this volume at
/// </summary>
public MVector3 position;
/// <summary>
/// The radius of this reveal volume
/// </summary>
public float radius = 1f;
/// <summary> /// <summary>
/// What needs to be done to the volume to unlock the facts /// What needs to be done to the volume to unlock the facts
/// </summary> /// </summary>
@ -84,18 +88,8 @@ namespace NewHorizons.External.Modules
} }
[JsonObject] [JsonObject]
public class AudioVolumeInfo public class AudioVolumeInfo : VolumeInfo
{ {
/// <summary>
/// The location of this audio volume. Optional (will default to 0,0,0).
/// </summary>
public MVector3 position;
/// <summary>
/// The radius of this audio volume
/// </summary>
public float radius;
/// <summary> /// <summary>
/// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. /// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.
/// </summary> /// </summary>
@ -113,23 +107,13 @@ namespace NewHorizons.External.Modules
} }
[JsonObject] [JsonObject]
public class NotificationVolumeInfo public class NotificationVolumeInfo : VolumeInfo
{ {
/// <summary> /// <summary>
/// What the notification will show for. /// What the notification will show for.
/// </summary> /// </summary>
[DefaultValue("all")] public NotificationTarget target = NotificationTarget.All; [DefaultValue("all")] public NotificationTarget target = NotificationTarget.All;
/// <summary>
/// The location of this notification volume. Optional (will default to 0,0,0).
/// </summary>
public MVector3 position;
/// <summary>
/// The radius of this notification volume.
/// </summary>
public float radius;
/// <summary> /// <summary>
/// The notification that will play when you enter this volume. /// The notification that will play when you enter this volume.
/// </summary> /// </summary>
@ -165,18 +149,8 @@ namespace NewHorizons.External.Modules
} }
[JsonObject] [JsonObject]
public class HazardVolumeInfo public class HazardVolumeInfo : VolumeInfo
{ {
/// <summary>
/// The location of this hazard volume. Optional (will default to 0,0,0).
/// </summary>
public MVector3 position;
/// <summary>
/// The radius of this hazard volume.
/// </summary>
public float radius;
/// <summary> /// <summary>
/// The type of hazard for this volume. /// The type of hazard for this volume.
/// </summary> /// </summary>