1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Add proper lua api deprecated handling

This commit is contained in:
sapier 2014-04-29 17:47:34 +02:00
parent c03d7dc8a7
commit b5acec0a3c
11 changed files with 75 additions and 3 deletions

View file

@ -45,6 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "filesys.h"
#include "gettime.h"
#include "gettext.h"
#include "scripting_game.h"
#define MY_CHECKPOS(a,b) \
if (v_pos.size() != 2) { \
@ -1478,7 +1479,13 @@ void GUIFormSpecMenu::parseElement(parserData* data,std::string element)
std::string type = trim(parts[0]);
std::string description = trim(parts[1]);
if ((type == "size") || (type == "invsize")){
if (type == "size") {
parseSize(data,description);
return;
}
if (type == "invsize") {
log_deprecated("Deprecated formspec element \"invsize\" is used");
parseSize(data,description);
return;
}