Compare commits
No commits in common. "95aef2ea4823bc90aa26ff9757ce20f341d594c5" and "4f1e263708b75371e73b8379934b49f96461c33f" have entirely different histories.
95aef2ea48
...
4f1e263708
1 changed files with 5 additions and 14 deletions
19
src/core.gd
19
src/core.gd
|
@ -29,8 +29,6 @@ const version_version: int = 1
|
|||
const version_type: CoreTypes.VersionType = CoreTypes.VersionType.RELEASE
|
||||
## The version type number. Resets on every new version and version type.
|
||||
const version_typerelease: int = 1
|
||||
## The fork indicator. Update this if you intend on soft or hard forking this framework.
|
||||
const version_fork: String = ""
|
||||
|
||||
# Modules
|
||||
## Used internally for loading, managing and unloading modules.
|
||||
|
@ -172,16 +170,13 @@ func complete_init() -> void:
|
|||
if modsinit_custom.size() != 0: print(" Custom: " + str(modsinit_custom))
|
||||
await get_tree().create_timer(1).timeout
|
||||
|
||||
initduration_complete_initialization = Time.get_ticks_msec() - inittime
|
||||
|
||||
# Initialization complete
|
||||
await get_tree().process_frame
|
||||
if !welcomed:
|
||||
welcomed = true
|
||||
var version_welcome: String = await get_formatted_string("v%version%-%version_type_technical%%version_typerelease%%version_fork%")
|
||||
if version_welcome.length() > 15:
|
||||
await logger.crash("Invalid version size of 15")
|
||||
elif version_welcome.length() < 15:
|
||||
version_welcome = " ".repeat(15-version_welcome.length()) + version_welcome
|
||||
logger._log(CoreTypes.LoggerLevel.SPECIAL, basepath.replace("res://", "") + "src/core.gd", """_________________________________ __________ %version% ______
|
||||
logger._log(CoreTypes.LoggerLevel.SPECIAL, basepath.replace("res://", "") + "src/core.gd", """_________________________________ __________ ______
|
||||
__ ____/_ __ \\__ __ \\__ ____/ ___ ____/____________ _______ ___________ _________________ /__
|
||||
_ / _ / / /_ /_/ /_ __/ __ /_ __ ___/ __ `/_ __ `__ \\ _ \\_ | /| / / __ \\_ ___/_ //_/
|
||||
/ /___ / /_/ /_ _, _/_ /___ _ __/ _ / / /_/ /_ / / / / / __/_ |/ |/ // /_/ / / _ ,<
|
||||
|
@ -192,12 +187,10 @@ You should have recieved a copy of the GNU Affero General Public License
|
|||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Consider contributing to the CORE Framework to make it even better... and remember: #TransRightsAreHumanRights
|
||||
Thank you for using the CORE Framework to develop your application or game!""".replace("%version%", version_welcome))
|
||||
Thank you for using the CORE Framework to develop your application or game!""")
|
||||
loggeri.info("Framework initialization took " + str(initduration_preinitialization + initduration_initialization + initduration_complete_initialization) + "ms (pre " + str(initduration_preinitialization) + "ms, init " + str(initduration_initialization) + "ms, complete " + str(initduration_complete_initialization) + "ms)")
|
||||
if is_devmode(): loggeri.warn("The CORE Framework is running in development mode.\nThis may cause bugs and issues inside the framework. Here be dragons!")
|
||||
if logger.verbose_mode: loggeri.warn("Godot is running in verbose stdout mode.\nDue to a bug in the engine that prevents displaying truecolor ANSI escape\nsequences CORE changed the color of all diagnostic log messages.\nTo prevent this, set 'logger_detect_verbose_mode' in the configuration to 'false'.")
|
||||
|
||||
initduration_complete_initialization = Time.get_ticks_msec() - inittime
|
||||
loggeri.info("Framework initialization took " + str(initduration_preinitialization + initduration_initialization + initduration_complete_initialization) + "ms (pre " + str(initduration_preinitialization) + "ms, init " + str(initduration_initialization) + "ms, complete " + str(initduration_complete_initialization) + "ms)")
|
||||
|
||||
# +++ configuration +++
|
||||
## Loads a (new) configuration object and applies it to all modules.
|
||||
|
@ -367,7 +360,6 @@ func get_formatted_string(string: String) -> String:
|
|||
# Version strings
|
||||
string = string.replace("%version%", str(version_version))
|
||||
string = string.replace("%version_typerelease%", str(version_typerelease))
|
||||
string = string.replace("%version_fork%", "" if version_fork == "" else "-" + version_fork)
|
||||
var semantic_version: Array[int] = get_version_semantic()
|
||||
string = string.replace("%version_semantic%", str(semantic_version[0]) + "." + str(semantic_version[1]) + "." + str(semantic_version[2]))
|
||||
match(version_type):
|
||||
|
@ -474,5 +466,4 @@ func _notification(what) -> void:
|
|||
match(what):
|
||||
NOTIFICATION_WM_CLOSE_REQUEST:
|
||||
if config.automatic_shutdown:
|
||||
loggeri.diag("Got close request, shutting down")
|
||||
await quit_safely(0)
|
||||
|
|
Loading…
Reference in a new issue