Add gdscript documentation

This commit is contained in:
JeremyStar™ 2024-05-18 19:22:20 +02:00
parent 94bd18eab6
commit c4291e1489
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 17 additions and 1 deletions

View file

@ -14,21 +14,34 @@
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
## 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 extends Node
class_name VenusManager class_name VenusManager
## Reference to the [CORE] Object
var core: Core var core: Core
## Reference to the [CoreLoggerInstance] for this script.
var logger: CoreLoggerInstance var logger: CoreLoggerInstance
## Where Venus was installed to
var path: String = "addons/venus/src" var path: String = "addons/venus/src"
var modules: Dictionary = { "standard": [ "splashes", "launcher" ], "sui": [] } var modules: Dictionary = { "standard": [ "splashes", "launcher" ], "sui": [] }
## Contains a list of all modules Venus provides
func _init(core_new: Core) -> void: func _init(core_new: Core) -> void:
name = "Venus manager" name = "VenusManager"
core = core_new core = core_new
logger = core.logger.get_instance(path + "/manager.gd", self) logger = core.logger.get_instance(path + "/manager.gd", self)
## Registers Venus' custom modules.
func register_modules() -> void: func register_modules() -> void:
logger.verb("Registering Venus' modules") logger.verb("Registering Venus' modules")
@ -45,6 +58,7 @@ func register_modules() -> void:
core.register_custom_module(module, path + "/modules/" + module + ".gd", module_node) core.register_custom_module(module, path + "/modules/" + module + ".gd", module_node)
## Unregisters Venus' custom modules.
func unregister_modules() -> void: func unregister_modules() -> void:
logger.verb("Unregistering Venus' modules") logger.verb("Unregistering Venus' modules")

View file

@ -14,6 +14,8 @@
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
## Holds and provides management utilities for splash texts.
extends CoreBaseModule extends CoreBaseModule
## Contains all categories and their splashes ## Contains all categories and their splashes