summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-04-29 17:47:34 +0200
committersapier <Sapier at GMX dot net>2014-04-29 22:49:04 +0200
commitb5acec0a3c5701c53854ff7afdf4008863e6e8df (patch)
tree19ed8671c3b56e82e803c51eaad92948b806d13a /src/guiFormSpecMenu.cpp
parentc03d7dc8a7c35708a39f9c14e2df243e212b283b (diff)
downloadminetest-b5acec0a3c5701c53854ff7afdf4008863e6e8df.tar.gz
minetest-b5acec0a3c5701c53854ff7afdf4008863e6e8df.tar.bz2
minetest-b5acec0a3c5701c53854ff7afdf4008863e6e8df.zip
Add proper lua api deprecated handling
Diffstat (limited to 'src/guiFormSpecMenu.cpp')
-rw-r--r--src/guiFormSpecMenu.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 962d15188..129ab0259 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -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;
}