mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Expose client version information in non-debug builds (#15708)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com> Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
e6cf08169e
commit
dd0070a6b8
8 changed files with 95 additions and 24 deletions
|
@ -64,6 +64,7 @@
|
|||
[scheduled bump for 5.11.0]
|
||||
*/
|
||||
|
||||
// Note: Also update core.protocol_versions in builtin when bumping
|
||||
const u16 LATEST_PROTOCOL_VERSION = 47;
|
||||
|
||||
// See also formspec [Version History] in doc/lua_api.md
|
||||
|
|
|
@ -239,6 +239,10 @@ int ModApiServer::l_get_player_information(lua_State *L)
|
|||
lua_pushstring(L, info.lang_code.c_str());
|
||||
lua_settable(L, table);
|
||||
|
||||
lua_pushstring(L, "version_string");
|
||||
lua_pushstring(L, info.vers_string.c_str());
|
||||
lua_settable(L, table);
|
||||
|
||||
#ifndef NDEBUG
|
||||
lua_pushstring(L,"serialization_version");
|
||||
lua_pushnumber(L, info.ser_vers);
|
||||
|
@ -256,10 +260,6 @@ int ModApiServer::l_get_player_information(lua_State *L)
|
|||
lua_pushnumber(L, info.patch);
|
||||
lua_settable(L, table);
|
||||
|
||||
lua_pushstring(L,"version_string");
|
||||
lua_pushstring(L, info.vers_string.c_str());
|
||||
lua_settable(L, table);
|
||||
|
||||
lua_pushstring(L,"state");
|
||||
lua_pushstring(L, ClientInterface::state2Name(info.state).c_str());
|
||||
lua_settable(L, table);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue