From 3e95b8a1587ebce9443d4d716645798bfbb630f2 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 4 Dec 2011 03:45:02 +0200 Subject: Determine light_propagates from paramtype --- src/scriptapi.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/scriptapi.cpp') diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index d7382b98b..ffbce9167 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -455,6 +455,18 @@ static void setfloatfield(lua_State *L, int table, lua_setfield(L, table, fieldname); } +static void warn_if_field_exists(lua_State *L, int table, + const char *fieldname, const std::string &message) +{ + lua_getfield(L, table, fieldname); + if(!lua_isnil(L, -1)){ + infostream<