Multiple hooks per plugin can be added. The cPluginManager.AddHook() has four available signatures, the recommended one is cPluginManager.AddHook(HOOK_TYPE, CallbackFunction)
As requested in FS 413, with extra parameters:
World, BlockX, BlockY, BlockZ, Size, CanCauseFire, Source, SourceData
OnExploding() can return 3 values:
StopHook, CanCauseFire, ExplosionSize
Fixes FS #297 and part of FS #403.
Added sizes to all entities.
Moved all damage-related functions from cPawn to cEntity
API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
RCON authentication is now required before executing commands.
Console command handlers now return two values, bool (IsHandled) and string (CommandOutput).
API change: removed cRoot:ExecuteConsoleCommand(), added cRoot:QueueExecuteConsoleCommand().
API change: removed cPluginManager:ExecuteConsoleCommand(), use cRoot:QueueExecuteConsoleCommand() instead
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1631 0a769ca7-a7f5-676a-18bf-c427514a06d6
Note that built-in console commands are exempt to this hook - they are always performed and the hook is not called. Also note that, for reasons unknown, the HookNotify plugin doesn't list the callback arguments.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1221 0a769ca7-a7f5-676a-18bf-c427514a06d6
Also tweaked the mechanics so that plugins may revive without dropping other plugins out of the picture.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1182 0a769ca7-a7f5-676a-18bf-c427514a06d6
Note that cItems is used in the function signature but not yet exported in the API, TODO!
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1176 0a769ca7-a7f5-676a-18bf-c427514a06d6
Splitting off the Composable generator and fiddling with LuaChunk / ChunkDesc is good, other generators not good yet.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1171 0a769ca7-a7f5-676a-18bf-c427514a06d6
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