From c4291e14890f5c3d6ab6ff9bc020e62c6f383fee Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sat, 18 May 2024 19:22:20 +0200 Subject: [PATCH] Add gdscript documentation --- addons/venus/src/manager.gd | 16 +++++++++++++++- addons/venus/src/modules/splashes.gd | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/addons/venus/src/manager.gd b/addons/venus/src/manager.gd index 84eb572..39f5bfa 100644 --- a/addons/venus/src/manager.gd +++ b/addons/venus/src/manager.gd @@ -14,21 +14,34 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . + +## Manages Venus' custom modules. +## +## To setup Venus in your project, add this to your initialization code: +## [codeblock] +## var manager: VenusManager = VenusManager.new(core) +## manager.register_modules() +## [/codeblock] extends Node class_name VenusManager +## Reference to the [CORE] Object var core: Core +## Reference to the [CoreLoggerInstance] for this script. var logger: CoreLoggerInstance +## Where Venus was installed to var path: String = "addons/venus/src" var modules: Dictionary = { "standard": [ "splashes", "launcher" ], "sui": [] } +## Contains a list of all modules Venus provides func _init(core_new: Core) -> void: - name = "Venus manager" + name = "VenusManager" core = core_new logger = core.logger.get_instance(path + "/manager.gd", self) +## Registers Venus' custom modules. func register_modules() -> void: logger.verb("Registering Venus' modules") @@ -45,6 +58,7 @@ func register_modules() -> void: core.register_custom_module(module, path + "/modules/" + module + ".gd", module_node) +## Unregisters Venus' custom modules. func unregister_modules() -> void: logger.verb("Unregistering Venus' modules") diff --git a/addons/venus/src/modules/splashes.gd b/addons/venus/src/modules/splashes.gd index 0b0a8d9..e9a8ece 100644 --- a/addons/venus/src/modules/splashes.gd +++ b/addons/venus/src/modules/splashes.gd @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . + +## Holds and provides management utilities for splash texts. extends CoreBaseModule ## Contains all categories and their splashes