CORE/docs/references/core.gd.md
JeremyStarTM 83ea84b9ab Documentation/website release and more
This commit added:
- A website and documentation (two in one) containing a install guide and code references
- Character counting script (count_characters.sh)
- Godot development project support (making a temporary godot project)
- Makefile
2023-07-09 00:16:15 +02:00

59 lines
2.1 KiB
Markdown

---
hide:
- navigation
---
# CORE Holder (core)
The **CORE Holder** is responsible for... well holding the components.
## Constants
### version
- type `string`
- description `The CORE version.`
- format `<TYPE> <BUILD>` (`<TYPE>` can be either `release`, `prerelease` or `source`. `<BUILD>` is the latest version number)
## Methods
### welcome()
- returns `void`
- description `Prints a welcome message and the CORE version.`
## Internal Variables
Do not touch or you will cause breakage.
### locked
- type `bool`
- default value `false`
- description `If true, attach() will reject new components.`
### readycount
- type `int`
- default value `0`
- description `How many components have been fully initialized.`
### readylized
- type `bool`
- default value `false`
- description `If all components have been fully initialized. Is set to true if readycount is equal to the number of components.`
## Internal functions
Do not call or you will cause breakage.
### attach()
- returns `void`
- description `Attaches a component to the CORE holder`
- argument `type`
- type `String`
- mandatory `yes`
- description `The component type. Can be "config", "wmgr", "smgr", "resmgr", "events" or "splash".`
- argument `component`
- type `none (intended types are "PackedScene" or "Script")`
- mandatory `yes`
- description `The component attach() should add to the SceneTree.`
- argument `do_setup`
- type `bool`
- mandatory `no, default value is true`
- description `If true, creates a new Control and sets the component as a script. Used for Scripts like "smgr.gd" but not for PackedScene's like "splash.tscn".`
### lock()
- returns `void`
- description `Sets the "locked" variable to true.`
### setready()
- returns `void`
- description `Increases "readycount" variable by 1 and checks if "readycount" is equal to the number of components.`
# Trivia
- The variable [readylized](#readylized) was named like that because a signal called `ready` already exists in `Node` and can therefore not be used as a name. [JeremyStar™](https://git.staropensource.de/JeremyStarTM) then simply appended `lized` from `initialized` to `ready` and `readylized` was born.