diff options
author | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 14:24:39 +0200 |
---|---|---|
committer | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 14:24:39 +0200 |
commit | 0b29b3b3cf3dd1127e567343295f4df1f88664dc (patch) | |
tree | 702a2e6d771deac21d7d4c09379453508384549d /source | |
parent | Moved LuaFunctions.h into the Bindings section of the project (diff) | |
download | cuberite-0b29b3b3cf3dd1127e567343295f4df1f88664dc.tar cuberite-0b29b3b3cf3dd1127e567343295f4df1f88664dc.tar.gz cuberite-0b29b3b3cf3dd1127e567343295f4df1f88664dc.tar.bz2 cuberite-0b29b3b3cf3dd1127e567343295f4df1f88664dc.tar.lz cuberite-0b29b3b3cf3dd1127e567343295f4df1f88664dc.tar.xz cuberite-0b29b3b3cf3dd1127e567343295f4df1f88664dc.tar.zst cuberite-0b29b3b3cf3dd1127e567343295f4df1f88664dc.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/Bindings.cpp | 3 | ||||
-rw-r--r-- | source/Bindings.h | 2 | ||||
-rw-r--r-- | source/cPluginManager.h | 1 | ||||
-rw-r--r-- | source/cWorld.cpp | 3 |
4 files changed, 7 insertions, 2 deletions
diff --git a/source/Bindings.cpp b/source/Bindings.cpp index 8ef5e7f91..a2e7950b4 100644 --- a/source/Bindings.cpp +++ b/source/Bindings.cpp @@ -1,6 +1,6 @@ /*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 06/13/12 20:13:25.
+** Generated automatically by tolua++-1.0.92 on Thu Jun 14 14:20:17 2012.
*/
#ifndef __cplusplus
@@ -20734,6 +20734,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"HOOK_CRAFTING_NO_RECIPE",cPluginManager::HOOK_CRAFTING_NO_RECIPE);
tolua_constant(tolua_S,"HOOK_POST_CRAFTING",cPluginManager::HOOK_POST_CRAFTING);
tolua_constant(tolua_S,"HOOK_BLOCK_TO_PICKUP",cPluginManager::HOOK_BLOCK_TO_PICKUP);
+ tolua_constant(tolua_S,"HOOK_WEATHER_CHANGE",cPluginManager::HOOK_WEATHER_CHANGE);
tolua_constant(tolua_S,"E_PLUGIN_TICK",cPluginManager::E_PLUGIN_TICK);
tolua_constant(tolua_S,"E_PLUGIN_CHAT",cPluginManager::E_PLUGIN_CHAT);
tolua_constant(tolua_S,"E_PLUGIN_COLLECT_ITEM",cPluginManager::E_PLUGIN_COLLECT_ITEM);
diff --git a/source/Bindings.h b/source/Bindings.h index fb8cba644..8bfe98708 100644 --- a/source/Bindings.h +++ b/source/Bindings.h @@ -1,6 +1,6 @@ /*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 06/13/12 20:13:25.
+** Generated automatically by tolua++-1.0.92 on Thu Jun 14 14:20:17 2012.
*/
/* Exported function */
diff --git a/source/cPluginManager.h b/source/cPluginManager.h index 0a98ccd58..59191ecc3 100644 --- a/source/cPluginManager.h +++ b/source/cPluginManager.h @@ -49,6 +49,7 @@ public: //tolua_export HOOK_CRAFTING_NO_RECIPE, /// cPlayer, cCraftingGrid, cCraftingRecipe
HOOK_POST_CRAFTING, /// cPlayer, cCraftingGrid, cCraftingRecipe
HOOK_BLOCK_TO_PICKUP, /// BlockType, BlockMeta, cPlayer, cItem, cItems
+ HOOK_WEATHER_CHANGE,
// E_PLUGIN_ names are obsolete, but are kept for compatibility reasons
E_PLUGIN_TICK = HOOK_TICK,
diff --git a/source/cWorld.cpp b/source/cWorld.cpp index 41915926f..27f85bf90 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -41,6 +41,7 @@ #include "MersenneTwister.h"
#include "cTracer.h"
#include "Trees.h"
+#include "cPluginManager.h"
#include "packets/cPacket_TimeUpdate.h"
@@ -676,6 +677,8 @@ void cWorld::TickWeather(float a_Dt) {
ChangeWeather();
+ cRoot::Get()->GetPluginManager()->CallHook( cPluginManager::HOOK_WEATHER_CHANGE, 0 );
+
switch(GetWeather())
{
case eWeather_Sunny:
|