Add gdscript documentation
This commit is contained in:
parent
94bd18eab6
commit
c4291e1489
2 changed files with 17 additions and 1 deletions
|
@ -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")
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue