From b5acec0a3c5701c53854ff7afdf4008863e6e8df Mon Sep 17 00:00:00 2001 From: sapier Date: Tue, 29 Apr 2014 17:47:34 +0200 Subject: Add proper lua api deprecated handling --- src/guiFormSpecMenu.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/guiFormSpecMenu.cpp') 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; } -- cgit v1.2.3