Update welcome message and add version indicator

This commit is contained in:
JeremyStar™ 2024-04-26 19:55:16 +02:00
parent bfd53f46b1
commit 95aef2ea48
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -172,13 +172,16 @@ 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
logger._log(CoreTypes.LoggerLevel.SPECIAL, basepath.replace("res://", "") + "src/core.gd", """_________________________________ __________ ______
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% ______
__ ____/_ __ \\__ __ \\__ ____/ ___ ____/____________ _______ ___________ _________________ /__
_ / _ / / /_ /_/ /_ __/ __ /_ __ ___/ __ `/_ __ `__ \\ _ \\_ | /| / / __ \\_ ___/_ //_/
/ /___ / /_/ /_ _, _/_ /___ _ __/ _ / / /_/ /_ / / / / / __/_ |/ |/ // /_/ / / _ ,<
@ -189,11 +192,13 @@ 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!""")
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)")
Thank you for using the CORE Framework to develop your application or game!""".replace("%version%", version_welcome))
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.
func reload_configuration(new_config: CoreConfiguration = CoreConfiguration.new()) -> void:
@ -469,4 +474,5 @@ 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)