diff --git a/README.md b/README.md index 025b912..8be0e9b 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ Adds a splash to the specified category. Adds an array of splashes to the specified category. #### *CoreBaseModule* delete_category(*String* category) Removes the specified category. +#### *Array[String]* get_categories()() +Returns a list of all categories. #### *CoreBaseModule* copy_splashes(*String* source_category, *String* target_category) Copies all splashes from the source category to the target category. #### *String* get_random_splash(*String* category) diff --git a/src/modules/splashes.gd b/src/modules/splashes.gd index e84db83..2ae5671 100644 --- a/src/modules/splashes.gd +++ b/src/modules/splashes.gd @@ -139,6 +139,10 @@ func add_splashes(category: String, splash_array: Array[String]) -> CoreBaseModu return self +## Returns a list of all categories. +func list_categories() -> Array[String]: + return core.misc.array_to_stringarray(splashes.keys()) + ## Removes the specified category. func delete_category(category: String) -> CoreBaseModule: splashes.erase(category)