Compare commits
10 commits
539fc1cea6
...
9372a5be1c
Author | SHA1 | Date | |
---|---|---|---|
9372a5be1c | |||
ddbe0d605c | |||
5582fef70a | |||
94a677286c | |||
8f29bc5e99 | |||
e9b1169d98 | |||
12548963b4 | |||
cd352eb73b | |||
b80d387a3e | |||
227b0be514 |
10 changed files with 81 additions and 66 deletions
|
@ -29,10 +29,9 @@ body:
|
||||||
description: 'For us to understand the problem you''re having please insert the ENTIRE log file here. You must give us `DIAG` level logs (set `logger_level` in CORE''s configuration to `CoreTypes.LoggerLevel.DIAG` during initialization). **Leave this empty if you give us a reproduction project.**'
|
description: 'For us to understand the problem you''re having please insert the ENTIRE log file here. You must give us `DIAG` level logs (set `logger_level` in CORE''s configuration to `CoreTypes.LoggerLevel.DIAG` during initialization). **Leave this empty if you give us a reproduction project.**'
|
||||||
placeholder: 'Your log file here...'
|
placeholder: 'Your log file here...'
|
||||||
value: |
|
value: |
|
||||||
<details>
|
```plain
|
||||||
Your log file here...
|
Your log file here...
|
||||||
Note: We wrap the log in the `details` tag so the log doesn't take up too much space in the issue. Please don't remove them.
|
```
|
||||||
</details>
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: 'textarea'
|
- type: 'textarea'
|
||||||
|
@ -41,12 +40,9 @@ body:
|
||||||
label: 'Bug snippet'
|
label: 'Bug snippet'
|
||||||
description: 'Insert a snippet of your code that you think is causing the issue. **Leave this empty if you give us a reproduction project.**'
|
description: 'Insert a snippet of your code that you think is causing the issue. **Leave this empty if you give us a reproduction project.**'
|
||||||
value: |
|
value: |
|
||||||
<details>
|
|
||||||
```gdscript
|
```gdscript
|
||||||
Your code snippet here...
|
Your code snippet here...
|
||||||
Note: We wrap the snippet in the `details` tag so the code doesn't take up too much space in the issue. Please don't remove them.
|
|
||||||
```
|
```
|
||||||
</details>
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: 'textarea'
|
- type: 'textarea'
|
||||||
|
|
|
@ -14,7 +14,7 @@ body:
|
||||||
Please answer the following questions accurately, otherwise we may not be able to add the feature. \
|
Please answer the following questions accurately, otherwise we may not be able to add the feature. \
|
||||||
\
|
\
|
||||||
**Note: Please check if the same feature request already exists. If not, continue. If so, participate in that one instead.** \
|
**Note: Please check if the same feature request already exists. If not, continue. If so, participate in that one instead.** \
|
||||||
**Note: Please don't censor anything *except* sensitive information. You don''t need to be embarrased about your username. You censor your bug report, we censor our answers.**
|
**Note: Please don't censor anything *except* sensitive information. You don't need to be embarrased about your username. You censor your bug report, we censor our answers.**
|
||||||
- type: 'textarea'
|
- type: 'textarea'
|
||||||
id: 'feature-description'
|
id: 'feature-description'
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -22,7 +22,7 @@ body:
|
||||||
description: 'Explain *what* you want added. Also describe why this feature can''t implemented without integrating it into the CORE Framework. Include as many details as possible.'
|
description: 'Explain *what* you want added. Also describe why this feature can''t implemented without integrating it into the CORE Framework. Include as many details as possible.'
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example:
|
Example:
|
||||||
I want to do XY in my project, which is fairely hard to implement but would benefit a lot of projects.
|
I want to do XY in my project, which is fairly hard to implement but would benefit a lot of projects.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: 'textarea'
|
- type: 'textarea'
|
||||||
|
@ -33,7 +33,7 @@ body:
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example:
|
Example:
|
||||||
I would propose to <some description on how to implement your feature>.
|
I would propose to <some description on how to implement your feature>.
|
||||||
I''ve also thought on simply <some other description on how to implement your feature>.
|
I've also thought on simply <some other description on how to implement your feature>.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: 'textarea'
|
- type: 'textarea'
|
||||||
|
@ -43,9 +43,9 @@ body:
|
||||||
description: 'Explain how could be possible to implement the feature without building it into the framework directly. Include as many details as possible. **Leave empty if it can''t simply be solved by adding a module.**'
|
description: 'Explain how could be possible to implement the feature without building it into the framework directly. Include as many details as possible. **Leave empty if it can''t simply be solved by adding a module.**'
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example:
|
Example:
|
||||||
I''ve considered using a custom module for this feature.
|
I've considered using a custom module for this feature.
|
||||||
Otherwise it would be possible to use <link to some project>.
|
Otherwise it would be possible to use <link to some project>.
|
||||||
I''ve also considered using the engine''s way of doing it by <how to do it using the engine''s way>.
|
I've also considered using the normal way of doing it by <how to do it using the normal way>.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: 'markdown'
|
- type: 'markdown'
|
||||||
|
|
|
@ -28,10 +28,9 @@ body:
|
||||||
description: 'For us to understand the problem you''re having please insert the ENTIRE log file here. You must give us `DIAG` level logs (set `logger_level` in CORE''s configuration to `CoreTypes.LoggerLevel.DIAG` during initialization). **Leave this empty if your problem does not need log output or doesn''t involve code at all.**'
|
description: 'For us to understand the problem you''re having please insert the ENTIRE log file here. You must give us `DIAG` level logs (set `logger_level` in CORE''s configuration to `CoreTypes.LoggerLevel.DIAG` during initialization). **Leave this empty if your problem does not need log output or doesn''t involve code at all.**'
|
||||||
placeholder: 'Your log file here...'
|
placeholder: 'Your log file here...'
|
||||||
value: |
|
value: |
|
||||||
<details>
|
```plain
|
||||||
Your log file here...
|
Your log file here...
|
||||||
Note: We wrap the log in the `details` tag so the log doesn't take up too much space in the issue. Please don't remove them.
|
```
|
||||||
</details>
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: 'textarea'
|
- type: 'textarea'
|
||||||
|
@ -40,10 +39,9 @@ body:
|
||||||
label: 'Code snippet'
|
label: 'Code snippet'
|
||||||
description: 'Insert a snippet of your code that you need help with. **Leave this empty if your problem does not need log output or doesn''t involve code at all.**'
|
description: 'Insert a snippet of your code that you need help with. **Leave this empty if your problem does not need log output or doesn''t involve code at all.**'
|
||||||
value: |
|
value: |
|
||||||
<details>
|
```gdscript
|
||||||
Your code snippet here...
|
Your code snippet here...
|
||||||
Note: We wrap the snippet in the `details` tag so the code doesn't take up too much space in the issue. Please don't remove them.
|
```
|
||||||
</details>
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: 'dropdown'
|
- type: 'dropdown'
|
||||||
|
|
66
README.md
66
README.md
|
@ -9,7 +9,7 @@ The CORE Framework aims at simplifying development for developers writing their
|
||||||
- [File structure](#file-structure)
|
- [File structure](#file-structure)
|
||||||
|
|
||||||
## About
|
## About
|
||||||
The CORE Framework is written in GDScript (for now, see [#14](https://git.staropensource.de/StarOpenSource/CORE/issues/14)) and acts as the base for your games and applications. It includes a logger w/ crashhandler, scene management system, downloader, miscellaneous stuff and much more. \
|
The CORE Framework is written in GDScript (for now) and acts as the base for your games and applications. It includes a logger w/ crashhandler, scene management system, downloader, miscellaneous stuff and much more. \
|
||||||
Read more about CORE [here](https://core.staropensource.de/about/).
|
Read more about CORE [here](https://core.staropensource.de/about/).
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
@ -109,22 +109,16 @@ Here's a file structure for this project:
|
||||||
│ ├── build-distrib-assetlibrary.sh Builds a distribution directory for distributing CORE in the Godot Asset Library.
|
│ ├── build-distrib-assetlibrary.sh Builds a distribution directory for distributing CORE in the Godot Asset Library.
|
||||||
│ ├── build-distrib-git.sh Builds a distribution directory for distributing CORE using git.
|
│ ├── build-distrib-git.sh Builds a distribution directory for distributing CORE using git.
|
||||||
│ ├── core.png
|
│ ├── core.png
|
||||||
│ ├── core.png.import
|
|
||||||
│ ├── core.xcf
|
│ ├── core.xcf
|
||||||
│ ├── FiraCode
|
│ ├── FiraCode
|
||||||
│ │ ├── Bold.ttf
|
│ │ ├── Bold.ttf
|
||||||
│ │ ├── Bold.ttf.import
|
|
||||||
│ │ ├── Light.ttf
|
│ │ ├── Light.ttf
|
||||||
│ │ ├── Light.ttf.import
|
|
||||||
│ │ ├── Medium.ttf
|
│ │ ├── Medium.ttf
|
||||||
│ │ ├── Medium.ttf.import
|
|
||||||
│ │ ├── Regular.ttf
|
│ │ ├── Regular.ttf
|
||||||
│ │ ├── Regular.ttf.import
|
|
||||||
│ │ ├── Retina.ttf
|
│ │ ├── Retina.ttf
|
||||||
│ │ └── Retina.ttf.import
|
|
||||||
│ └── submodules Contains all submodules CORE uses
|
│ └── submodules Contains all submodules CORE uses
|
||||||
│ └── besseretests
|
│ └── besseretests
|
||||||
├── docs CORE's documentation, includes a Makefile
|
├── docs CORE's documentation
|
||||||
│ ├── babel.config.js
|
│ ├── babel.config.js
|
||||||
│ ├── docs Where all documentation pages lie
|
│ ├── docs Where all documentation pages lie
|
||||||
│ │ ├── about.md
|
│ │ ├── about.md
|
||||||
|
@ -132,17 +126,28 @@ Here's a file structure for this project:
|
||||||
│ │ │ ├── _category_.json
|
│ │ │ ├── _category_.json
|
||||||
│ │ │ ├── initializing-core.md
|
│ │ │ ├── initializing-core.md
|
||||||
│ │ │ └── setting-up.mdx
|
│ │ │ └── setting-up.mdx
|
||||||
|
│ │ ├── guides Various guides for specific stuff
|
||||||
|
│ │ │ ├── _category_.json
|
||||||
|
│ │ │ └── custom-modules.md
|
||||||
│ │ ├── reference CORE class and module reference
|
│ │ ├── reference CORE class and module reference
|
||||||
│ │ │ ├── _category_.json
|
│ │ │ ├── _category_.json
|
||||||
│ │ │ ├── coreconfiguration.md
|
│ │ │ ├── classes Reference for classes
|
||||||
│ │ │ ├── core.md
|
│ │ │ │ ├── basemodule.md
|
||||||
│ │ │ ├── coretypes.md
|
│ │ │ │ ├── _category_.json
|
||||||
│ │ │ ├── erm.md
|
│ │ │ │ ├── core.md
|
||||||
│ │ │ ├── loggerinstance.md
|
│ │ │ │ ├── loggerinstance.md
|
||||||
│ │ │ ├── logger.md
|
│ │ │ │ ├── types.md
|
||||||
│ │ │ ├── misc.md
|
│ │ │ │ ├── validationschema.md
|
||||||
│ │ │ ├── sms.md
|
│ │ │ │ └── validationsingle.md
|
||||||
│ │ │ └── storage.md
|
│ │ │ └── modules Reference for modules
|
||||||
|
│ │ │ ├── _category_.json
|
||||||
|
│ │ │ ├── config.md
|
||||||
|
│ │ │ ├── erm.md
|
||||||
|
│ │ │ ├── logger.md
|
||||||
|
│ │ │ ├── misc.md
|
||||||
|
│ │ │ ├── sms.md
|
||||||
|
│ │ │ ├── storage.md
|
||||||
|
│ │ │ └── validation.md
|
||||||
│ │ └── terminology.md
|
│ │ └── terminology.md
|
||||||
│ ├── docusaurus.config.ts Documentation configuration
|
│ ├── docusaurus.config.ts Documentation configuration
|
||||||
│ ├── Makefile Makefile for managing the documentation
|
│ ├── Makefile Makefile for managing the documentation
|
||||||
|
@ -153,9 +158,6 @@ Here's a file structure for this project:
|
||||||
│ ├── src
|
│ ├── src
|
||||||
│ │ ├── css
|
│ │ ├── css
|
||||||
│ │ │ └── custom.css
|
│ │ │ └── custom.css
|
||||||
│ │ └── pages
|
|
||||||
│ │ ├── index.module.css
|
|
||||||
│ │ └── index.tsx
|
|
||||||
│ ├── static
|
│ ├── static
|
||||||
│ │ └── dist
|
│ │ └── dist
|
||||||
│ │ └── core.png -> ../../../dist/core.png Symlink to the framework icon
|
│ │ └── core.png -> ../../../dist/core.png Symlink to the framework icon
|
||||||
|
@ -163,29 +165,35 @@ Here's a file structure for this project:
|
||||||
├── LICENSE
|
├── LICENSE
|
||||||
├── project.godot
|
├── project.godot
|
||||||
├── README.md
|
├── README.md
|
||||||
├── src Contains the source code
|
├── src Contains the framework source code
|
||||||
│ ├── classes
|
│ ├── classes Contains all classes except for 'Core'
|
||||||
│ │ ├── basemodule.gd
|
│ │ ├── basemodule.gd
|
||||||
│ │ ├── config.gd
|
│ │ ├── config.gd
|
||||||
│ │ ├── loggerinstance.gd
|
│ │ ├── loggerinstance.gd
|
||||||
│ │ └── types.gd
|
│ │ ├── types.gd
|
||||||
|
│ │ ├── validationschema.gd
|
||||||
|
│ │ └── validationsingle.gd
|
||||||
│ ├── core.gd
|
│ ├── core.gd
|
||||||
│ ├── erm.gd
|
│ ├── erm.gd
|
||||||
│ ├── logger.gd
|
│ ├── logger.gd
|
||||||
│ ├── logui.gd
|
│ ├── logui.gd
|
||||||
│ ├── misc.gd
|
│ ├── misc.gd
|
||||||
│ ├── sms.gd
|
│ ├── sms.gd
|
||||||
│ └── storage.gd
|
│ ├── storage.gd
|
||||||
├── Test.gd Test script, only for testing during development
|
│ └── validation.gd
|
||||||
|
├── Test.gd Dev script, only for testing during development
|
||||||
├── tests For unit testing
|
├── tests For unit testing
|
||||||
│ ├── test_resources Scripts, scenes and other resources used in tests
|
│ ├── test_resources Scripts, scenes and other resources used in tests
|
||||||
│ │ ├── custom_module.gd A custom module used in 'tests/unit/core.gd'
|
│ │ ├── custom_module.gd A custom module used in 'tests/unit/core.gd'
|
||||||
│ │ ├── scene.gd Updates the callback value
|
│ │ ├── scene.gd Updates the callback value
|
||||||
│ │ └── scene.tscn Loads 'scene.gd'
|
│ │ └── scene.tscn Loads 'scene.gd'
|
||||||
│ ├── unit The actual unit tests
|
│ ├── unit The actual unit tests
|
||||||
│ │ ├── core.gd
|
│ │ ├── core.gd
|
||||||
│ │ ├── misc.gd
|
│ │ ├── erm.gd
|
||||||
│ │ └── sms.gd
|
│ │ ├── misc.gd
|
||||||
|
│ │ ├── sms.gd
|
||||||
|
│ │ ├── storage.gd
|
||||||
|
│ │ └── validation.gd
|
||||||
│ └── unitbase.gd The base for all of our unit tests, includes functions and variables used in all unit tests.
|
│ └── unitbase.gd The base for all of our unit tests, includes functions and variables used in all unit tests.
|
||||||
└── Test.tscn Simply executes `Test.gd`
|
└── Test.tscn Stub class, has script 'Test.gd' attached
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,12 +3,15 @@
|
||||||
dist: help
|
dist: help
|
||||||
help:
|
help:
|
||||||
@echo "make install-deps -> Install all dependencies"
|
@echo "make install-deps -> Install all dependencies"
|
||||||
|
@echo " update-deps -> Updates all dependencies"
|
||||||
@echo " test -> Start a web server for development"
|
@echo " test -> Start a web server for development"
|
||||||
@echo " build -> Build static files"
|
@echo " build -> Build static files"
|
||||||
@echo " clean -> Clean directory"
|
@echo " clean -> Clean directory"
|
||||||
@echo " clean-extra -> Clean directory with extra directories/files"
|
@echo " clean-extra -> Clean directory with extra directories/files"
|
||||||
install-deps:
|
install-deps:
|
||||||
pnpm install
|
pnpm install
|
||||||
|
update-deps:
|
||||||
|
pnpm install @docusaurus/{core,plugin-client-redirects,plugin-content-docs,plugin-sitemap,preset-classic,module-type-aliases,tsconfig,types}@latest
|
||||||
test:
|
test:
|
||||||
pnpm run start --hot-only --no-open
|
pnpm run start --hot-only --no-open
|
||||||
build:
|
build:
|
||||||
|
@ -21,4 +24,4 @@ clean-extra: clean
|
||||||
|
|
||||||
# The nuclear option. Why is it here you might ask? I made it while creating the documentation README.md
|
# The nuclear option. Why is it here you might ask? I made it while creating the documentation README.md
|
||||||
clean-ultra: clean clean-extra
|
clean-ultra: clean clean-extra
|
||||||
rm -rf "~/.cache/pnpm" "~/.local/share/pnpm" "~/.local/state/pnpm"
|
rm -rf "~/.cache/pnpm" "~/.local/share/pnpm" "~/.local/state/pnpm"
|
||||||
|
|
|
@ -23,6 +23,9 @@ Your answer is *(probably)* **yes**!
|
||||||
:::note
|
:::note
|
||||||
This table only compares frameworks that are relatively up to date with the Godot Engine (versions 4.1 and 4.2), can be found in the Godot Asset Library or are well known and are aimed at a specific game genre or general usage. Things like animation or dialogue frameworks are not in compared here.
|
This table only compares frameworks that are relatively up to date with the Godot Engine (versions 4.1 and 4.2), can be found in the Godot Asset Library or are well known and are aimed at a specific game genre or general usage. Things like animation or dialogue frameworks are not in compared here.
|
||||||
:::
|
:::
|
||||||
|
:::warning
|
||||||
|
There are pretty much no projects like the CORE Framework which we can compare against.
|
||||||
|
:::
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
"typecheck": "tsc"
|
"typecheck": "tsc"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "3.3.2",
|
"@docusaurus/core": "3.4.0",
|
||||||
"@docusaurus/plugin-client-redirects": "^3.3.2",
|
"@docusaurus/plugin-client-redirects": "^3.4.0",
|
||||||
"@docusaurus/plugin-content-docs": "^3.3.2",
|
"@docusaurus/plugin-content-docs": "^3.4.0",
|
||||||
"@docusaurus/plugin-sitemap": "^3.3.2",
|
"@docusaurus/plugin-sitemap": "^3.4.0",
|
||||||
"@docusaurus/preset-classic": "3.3.2",
|
"@docusaurus/preset-classic": "3.4.0",
|
||||||
"@mdx-js/react": "^3.0.1",
|
"@mdx-js/react": "^3.0.1",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.0",
|
||||||
"prism-react-renderer": "^2.3.1",
|
"prism-react-renderer": "^2.3.1",
|
||||||
|
@ -27,9 +27,9 @@
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "3.3.2",
|
"@docusaurus/module-type-aliases": "3.4.0",
|
||||||
"@docusaurus/tsconfig": "3.3.2",
|
"@docusaurus/tsconfig": "3.4.0",
|
||||||
"@docusaurus/types": "3.3.2",
|
"@docusaurus/types": "3.4.0",
|
||||||
"@types/node": "^20.12.5",
|
"@types/node": "^20.12.5",
|
||||||
"typescript": "~5.4.4"
|
"typescript": "~5.4.4"
|
||||||
},
|
},
|
||||||
|
|
|
@ -188,7 +188,7 @@ func evaluate() -> bool:
|
||||||
# ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇
|
# ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇
|
||||||
# ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇
|
# ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇
|
||||||
# ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇
|
# ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇
|
||||||
# ⠀⠀ ⠀⠀⠀⠀⠀⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠇
|
# ⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠇
|
||||||
# ⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇
|
# ⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇
|
||||||
# ⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
|
# ⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
|
||||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2902061979
|
# https://steamcommunity.com/sharedfiles/filedetails/?id=2902061979
|
||||||
|
|
25
src/core.gd
25
src/core.gd
|
@ -28,7 +28,7 @@ const version_version: int = 2
|
||||||
## The version type. See [enum CoreTypes.VersionType] for more information.
|
## The version type. See [enum CoreTypes.VersionType] for more information.
|
||||||
const version_type: CoreTypes.VersionType = CoreTypes.VersionType.RELEASE
|
const version_type: CoreTypes.VersionType = CoreTypes.VersionType.RELEASE
|
||||||
## The version type number. Resets on every new version and version type.
|
## The version type number. Resets on every new version and version type.
|
||||||
const version_typerelease: int = 0
|
const version_typerelease: int = 1
|
||||||
## The fork indicator. Update this if you intend on soft or hard forking this framework.
|
## The fork indicator. Update this if you intend on soft or hard forking this framework.
|
||||||
const version_fork: String = ""
|
const version_fork: String = ""
|
||||||
|
|
||||||
|
@ -245,19 +245,26 @@ func register_custom_module(module_name: String, module_origin: String, module_c
|
||||||
if custom_modules.has(module_name):
|
if custom_modules.has(module_name):
|
||||||
loggeri.error(stringify_variables("Registering module failed: A custom module with the name %name% already exists.", { "name": module_name }))
|
loggeri.error(stringify_variables("Registering module failed: A custom module with the name %name% already exists.", { "name": module_name }))
|
||||||
return false
|
return false
|
||||||
loggeri.diag("Updating variables")
|
|
||||||
|
# Update variables
|
||||||
module_class.name = module_name
|
module_class.name = module_name
|
||||||
module_class.core = self
|
module_class.core = self
|
||||||
module_class.logger = logger.get_instance(module_origin, module_class)
|
module_class.logger = logger.get_instance(module_origin, module_class)
|
||||||
module_class.logger.framework = true
|
module_class.logger.framework = true
|
||||||
loggeri.diag("Adding module to SceneTree")
|
|
||||||
custom_modules_node.add_child(module_class)
|
# Register module
|
||||||
loggeri.diag("Merging module with custom_modules")
|
|
||||||
custom_modules.merge({ module_name: module_class })
|
custom_modules.merge({ module_name: module_class })
|
||||||
loggeri.diag("Initializing custom module")
|
|
||||||
module_class._initialize()
|
# Add to 'custom_modules_node'
|
||||||
loggeri.diag("Updating custom module configuration")
|
custom_modules_node.add_child(module_class)
|
||||||
module_class._pull_config()
|
|
||||||
|
# Initialize module
|
||||||
|
@warning_ignore("redundant_await")
|
||||||
|
await module_class._initialize()
|
||||||
|
|
||||||
|
# Update module configuration
|
||||||
|
@warning_ignore("redundant_await")
|
||||||
|
await module_class._pull_config()
|
||||||
return true
|
return true
|
||||||
|
|
||||||
## Unregisters a custom module, making it no longer available.
|
## Unregisters a custom module, making it no longer available.
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
extends CoreBaseModule
|
extends CoreBaseModule
|
||||||
|
|
||||||
## Used internally for adding, managing and removing scene collections.
|
## Used internally for adding, managing and removing scene collections.
|
||||||
const scene_nodes: Array[String] = [ "debug", "cutscene", "menu", "main", "background" ]
|
const scene_nodes: Array[String] = [ "background", "main", "menu", "cutscene", "debug" ]
|
||||||
# Scene collections
|
# Scene collections
|
||||||
var scenes_debug: Node = Node.new()
|
var scenes_debug: Node = Node.new()
|
||||||
var scenes_cutscene: Node = Node.new()
|
var scenes_cutscene: Node = Node.new()
|
||||||
|
|
Loading…
Reference in a new issue