commit 14/10/2025
Soundbank Menu beres
This commit is contained in:
@@ -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}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user