summaryrefslogtreecommitdiffstats
path: root/source/cPlugin_NewLua.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cPlugin_NewLua.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/cPlugin_NewLua.cpp b/source/cPlugin_NewLua.cpp
index dd6b61b9b..7254bef01 100644
--- a/source/cPlugin_NewLua.cpp
+++ b/source/cPlugin_NewLua.cpp
@@ -508,6 +508,29 @@ bool cPlugin_NewLua::OnBlockToPickup(
+bool cPlugin_NewLua::OnWeatherChanged(cWorld * a_World)
+{
+ cCSLock Lock(m_CriticalSection);
+ if (!PushFunction("OnWeatherChanged"))
+ {
+ return false;
+ }
+
+ tolua_pushusertype(m_LuaState, (void *)a_World, "cWorld");
+
+ if (!CallFunction(1, 1, "OnWeatherChanged"))
+ {
+ return false;
+ }
+
+ bool bRetVal = (tolua_toboolean( m_LuaState, -1, 0) > 0);
+ return bRetVal;
+}
+
+
+
+
+
cWebPlugin_Lua* cPlugin_NewLua::CreateWebPlugin(lua_State* a_LuaState)
{
cCSLock Lock( m_CriticalSection );