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