From 6b17e33b7692d83538f5ecf982964620ee3b1790 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 22 Feb 2024 10:44:03 +0300 Subject: [PATCH] 0.20 development start --- res/content/base/package.json | 2 +- src/constants.h | 5 ++++- src/engine.cpp | 3 +++ src/frontend/menu.cpp | 14 ++++++++++++++ src/frontend/menu.h | 1 + src/logic/scripting/lua/LuaState.cpp | 29 ++++++++++++++++++++++++---- src/logic/scripting/lua/LuaState.h | 4 +++- 7 files changed, 51 insertions(+), 7 deletions(-) diff --git a/res/content/base/package.json b/res/content/base/package.json index 249dd4ee..7da43458 100644 --- a/res/content/base/package.json +++ b/res/content/base/package.json @@ -1,6 +1,6 @@ { "id": "base", "title": "Base", - "version": "0.19", + "version": "0.20", "description": "basic content package" } diff --git a/src/constants.h b/src/constants.h index 56f54c7f..fffa9c22 100644 --- a/src/constants.h +++ b/src/constants.h @@ -2,10 +2,13 @@ #define SRC_CONSTANTS_H_ #include +#include #include "typedefs.h" const int ENGINE_VERSION_MAJOR = 0; -const int ENGINE_VERSION_MINOR = 19; +const int ENGINE_VERSION_MINOR = 20; +const bool ENGINE_VERSION_INDEV = true; +#define ENGINE_VERSION_STRING "0.20" const int BLOCK_AIR = 0; const int ITEM_EMPTY = 0; diff --git a/src/engine.cpp b/src/engine.cpp index 80d9114a..54ae6876 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -75,6 +75,9 @@ Engine::Engine(EngineSettings& settings, EnginePaths* paths) gui = std::make_unique(); if (settings.ui.language == "auto") { settings.ui.language = langs::locale_by_envlocale(platform::detect_locale(), paths->getResources()); + } + if (ENGINE_VERSION_INDEV) { + menus::create_version_label(this); } setLanguage(settings.ui.language); } diff --git a/src/frontend/menu.cpp b/src/frontend/menu.cpp index ce1ab9cc..0879978f 100644 --- a/src/frontend/menu.cpp +++ b/src/frontend/menu.cpp @@ -82,6 +82,20 @@ static std::shared_ptr