Added HOOK_WEATHER_CHANGE.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@605 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
be24f193d7
commit
0b29b3b3cf
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user