Add range attribute

This commit is contained in:
Noah Pilarski 2022-09-17 09:58:22 -04:00
parent f04171ec83
commit 9be2bed1f0

View File

@ -4,6 +4,7 @@ using Newtonsoft.Json.Converters;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Text; using System.Text;
@ -138,7 +139,9 @@ namespace NewHorizons.External.Modules
/// <summary> /// <summary>
/// The loudness of the audio /// The loudness of the audio
/// </summary> /// </summary>
[DefaultValue(1f)] public float volume = 1f; [Range(0f, 1f)]
[DefaultValue(1f)]
public float volume = 1f;
} }
[JsonObject] [JsonObject]