commit 14/10/2025

Soundbank Menu beres
This commit is contained in:
2025-10-14 13:22:48 +07:00
parent 5f57e1bf2e
commit de54d142ae
23 changed files with 212 additions and 162 deletions

View File

@@ -1,5 +1,7 @@
package database
import content.Category
data class Soundbank(
var index: UInt,
var Description: String,
@@ -8,4 +10,45 @@ data class Soundbank(
var Language: String,
var VoiceType: String,
var Path: String,
)
){
/**
* Check if all fields are not empty
*/
fun isNotEmpty(): Boolean{
if (Description.isNotEmpty()){
if (TAG.isNotEmpty()){
if (Category.isNotEmpty()){
if (Language.isNotEmpty()){
if (VoiceType.isNotEmpty()){
if (Path.isNotEmpty()){
return true
}
}
}
}
}
}
return false
}
/**
* Check if Category is valid
*/
fun ValidCategory() : Boolean{
return content.Category.entries.any{ it.name == this.Category}
}
/**
* Check if VoiceType is valid
*/
fun ValidVoiceType() : Boolean{
return content.VoiceType.entries.any{ it.name == this.VoiceType}
}
/**
* Check if Language is valid
*/
fun ValidLanguage() : Boolean{
return content.Language.entries.any{ it.name == this.Language}
}
}