1
0

Completely removed support for old style Lua plugins (can use both Plugin and NewPlugin in settings.ini for now)

Removed cPlugin_Lua, obviously
cPluginManager stores plugins by their (folder)name
cPluginManager now scans the Plugins folder for potential plugins and adds them as non-loaded plugins
Added a DisablePlugin and LoadPlugin to disable and load plugins on a per-plugin basis instead of all at once
cPluginManager::FindPlugins refreshes the plugin list by removing non-existing plugins and adding new plugins
Made it incredibly easy to use new plugins from the WebAdmin
Exposed some food/hunger related functions in cPlayer to Lua

git-svn-id: http://mc-server.googlecode.com/svn/trunk@959 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth
2012-10-13 23:34:47 +00:00
parent b4ca06b9d9
commit 41ba1a7642
19 changed files with 638 additions and 570 deletions

View File

@@ -4,7 +4,6 @@
#include "LuaCommandBinder.h"
#include "Player.h"
#include "Plugin.h"
#include "Plugin_Lua.h"
#include "tolua++.h"
@@ -12,7 +11,18 @@
extern bool report_errors(lua_State* lua, int status);
bool report_errors(lua_State* lua, int status)
{
if ( status!=0 )
{
std::string s = lua_tostring(lua, -1);
LOGERROR("-- %s", s.c_str() );
lua_pop(lua, 1);
return true;
}
return false;
}
cLuaCommandBinder::cLuaCommandBinder()
{