1
0
Commit Graph

28 Commits

Author SHA1 Message Date
madmaxoft
7eae58281a Fixed AddHook() wanting old-style function names.
Error reported by STR_Warrior in the forum http://forum.mc-server.org/showthread.php?tid=1227&pid=9620#pid9620
2013-08-22 21:03:20 +02:00
madmaxoft
f3a0fed724 Hook adding uses the new API.
Multiple hooks per plugin can be added. The cPluginManager.AddHook() has four available signatures, the recommended one is cPluginManager.AddHook(HOOK_TYPE, CallbackFunction)
2013-08-21 21:29:30 +02:00
madmaxoft
dd030fa892 Implemented the OnWorldTick hook.
Triggerred for each world every time it ticks, parameters are the cWorld and the previous tick length (a_Dt)
2013-08-19 09:28:22 +02:00
madmaxoft
dd60f55bcc Added the OnHopperPullingItem and OnHopperPushingItem hooks.
Requested in FS 412, slightly modified the params.
2013-08-11 14:57:07 +02:00
madmaxoft
deeb3a15dc Added OnPlayerAnimation() hook.
Initial patch by @STR_Warrior, updated to account for different animation packets.
2013-08-11 12:29:05 +02:00
madmaxoft
d4a3c451c4 Added OnExploding() and OnExploded() hooks.
As requested in FS 413, with extra parameters:
World, BlockX, BlockY, BlockZ, Size, CanCauseFire, Source, SourceData

OnExploding() can return 3 values:
StopHook, CanCauseFire, ExplosionSize
2013-08-09 14:58:43 +02:00
madmaxoft
6c54650b27 cPlugin: Removed empty default implementation of virtual calls. 2013-08-08 14:08:34 +02:00
madmaxoft
ae9334bd93 Merge pull request #49 from mc-server/RemoveSquirrel
Remove squirrel
2013-08-08 03:14:47 -07:00
madmaxoft
3f4abe8c95 Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.
As requested in FS 418.
2013-08-08 09:13:13 +02:00
madmaxoft
09ebda4d10 Removed Squirrel.
This compiles under Windows, but is untested in Linux.
2013-08-07 22:39:40 +02:00
madmaxoft
3531bdb60b Implemented OnPlayerRightClickingEntity() hook
Fixes FS 425
2013-08-02 08:44:06 +02:00
madmaxoft@gmail.com
37276a4430 Rewritten entity-on-fire management ("forever on fire" bugs)
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
2013-07-01 10:39:56 +00:00
madmaxoft@gmail.com
7b75aaea7c Advanced RCON: Command output is sent to the RCON client.
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
2013-06-29 15:30:05 +00:00
madmaxoft@gmail.com
943dcaea14 Plugins can modify message in the OnChat() hook handler.
FS #376

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1622 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-22 19:08:34 +00:00
madmaxoft@gmail.com
99876ea4ba Added HOOK_EXECUTE_COMMAND for intercepting executed commands and console commands.
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
2013-02-21 13:47:01 +00:00
madmaxoft@gmail.com
34b3c13404 Plugins can now bind console commands
FS #300
Most console commands are now implemented in the Core plugin.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1214 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-15 13:00:59 +00:00
madmaxoft@gmail.com
8b1a8bee34 Added HOOK_WEATHER_CHANGING.
http://www.mc-server.org/support/index.php?do=details&task_id=299

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1210 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-13 19:22:08 +00:00
madmaxoft@gmail.com
dedb414a50 Added new hooks: OnChunkAvailable(), OnChunkUnloaded() and OnChunkUnloading(). Modified OnChunkGenerated() signature.
http://forum.mc-server.org/showthread.php?tid=464&pid=6312#pid6312

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1193 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-05 19:57:22 +00:00
madmaxoft@gmail.com
019c8b5bc7 Moved command API into cPluginManager.
As specified in http://forum.mc-server.org/showthread.php?tid=765 , commands are now bound using a single function, cPluginManager:BindCommand().

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1183 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-01 19:55:42 +00:00
madmaxoft@gmail.com
71bbf2d44b Renamed HOOK_KILLED to HOOK_KILLING to match naming conventions.
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
2013-01-28 16:54:11 +00:00
madmaxoft@gmail.com
05534bbee1 Renamed HOOK_COLLECT_PICKUP to HOOK_COLLECTING_PICKUP to match other hooks' naming.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1180 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-28 16:17:26 +00:00
madmaxoft@gmail.com
1a127f5510 Added the HOOK_BLOCK_TO_PICKUPS hook that fires when a block is dug up and should be converted to pickups.
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
2013-01-27 02:00:33 +00:00
madmaxoft@gmail.com
2960f43782 Merged the usable portion of the "gens" branch.
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
2013-01-25 10:12:29 +00:00
madmaxoft@gmail.com
9fa8c4f45b Fixed missing bindings in cPlugin
FS #291 - crash on "/help" issued via client

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1143 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-14 08:21:13 +00:00
madmaxoft@gmail.com
43e6840719 Merged branch "branches/hooks" into "trunk".
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-12 04:46:01 +00:00
madmaxoft@gmail.com
912a1e7adc Refactored the TakeDamage API to take equipped weapon and armor into consideration (PvP untested)
http://forum.mc-server.org/showthread.php?tid=625

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1087 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21 11:04:08 +00:00
faketruth
41ba1a7642 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
2012-10-13 23:34:47 +00:00
madmaxoft@gmail.com
ecfe6ab65b Source files cleanup: The rest of the files renamed.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23 22:09:57 +00:00