1
0
Commit Graph

157 Commits

Author SHA1 Message Date
madmaxoft@gmail.com
7593707713 Pickups are now being saved into Anvil.
Also changed cEntity rotation datatype to double

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09 14:35:43 +00:00
madmaxoft@gmail.com
9d2c841843 IPv6 support + removed cTCPLink from Lua API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1253 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-05 09:53:29 +00:00
madmaxoft@gmail.com
01b24d73ea Player can sit in minecarts (but not move them yet)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03 19:05:11 +00:00
madmaxoft@gmail.com
0e2340ee34 Added missing item types, fixed placing stone walls.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1243 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03 14:00:49 +00:00
madmaxoft@gmail.com
39d5d6b85f Updated cEntity API; removed functions that are unusable from Lua, added a few query functions.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1231 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-01 15:49:24 +00:00
madmaxoft@gmail.com
4ce0c5a983 Moved the Speed member into cEntity class instead of its descendants.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1222 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-21 21:55:36 +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
32ee4aaf1e Removed all E_ITEM_ symbols equivalent to E_BLOCK_, and all obsolete item and block symbols.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1218 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-16 11:12:56 +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
6aadbef815 Exported forgotten API functions in cPluginManager: ExecuteCommand(), ForceExecuteCommand()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1212 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-13 20:05:57 +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
cb22e195e2 More API functions in cBlockArea: Create(), Fill(), FillRelArea()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1208 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-11 12:27:02 +00:00
madmaxoft@gmail.com
345da37e96 Added cBlockArea:Merge() API function to merge two block areas using different strategies.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1207 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-10 15:15:41 +00:00
madmaxoft@gmail.com
bda7c4ac13 Added cBlockArea:Expand() API function (untested)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1203 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-09 11:03:22 +00:00
madmaxoft@gmail.com
b55afc940b cChunkDesc can now read and write cBlockAreas.
A simple example is provided in the Debuggers plugin.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1201 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-08 20:57:42 +00:00
madmaxoft@gmail.com
7c0a7d662d Prepared cChunkDesc for further API extension; used it as the sole container for generated chunk data, including entities / block entities.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1200 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-08 16:01:44 +00:00
madmaxoft@gmail.com
fe7e07d69d Added cBlockArea:CopyTo() and :CopyFrom(), so now block areas can be duplicated easily.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1199 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07 10:45:30 +00:00
madmaxoft@gmail.com
ed47a8e409 cBlockArea can now be saved as a .schematic file.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1198 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07 10:09:42 +00:00
madmaxoft@gmail.com
afdbb1d71b cBlockArea can now be loaded from a .schematic file.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1195 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-06 22:29:29 +00:00
madmaxoft@gmail.com
a091413125 Added a new API call to cBlockArea: Crop().
Also fixed cBlockArea:MakeIndex(), the indexing was wrong.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1194 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-06 18:22:30 +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
67048ee057 Added cItems to Lua API.
Now HOOK_BLOCK_TO_PICKUPS is fully functional, as demonstrated by HookNotify.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1178 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-27 03:45:40 +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
1a9960a396 Removed cMCLogger from Lua API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1175 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-27 01:58:23 +00:00
madmaxoft@gmail.com
7a6ec4fb17 Changed HOOK_PLAYER_MOVED to HOOK_PLAYER_MOVING to match the scheme used for names.
-ING means the event is being processed and may be refused by a plugin, -ED means it has already happenned and the plugin cannot do anything about it.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1174 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-26 07:50:06 +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
7632b5ed62 Renamed rclk hook to HOOK_PLAYER_RIGHT_CLICK.
http://forum.mc-server.org/showthread.php?tid=464&pid=6163#pid6163

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1158 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-18 18:28:27 +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
7860d5156a cBlockArea now has a GetBlockTypeMeta() and GetRelBlockTypeMeta() methods
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1118 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-04 05:20:14 +00:00
madmaxoft@gmail.com
0cc3ab7c1e cPickup now uses full cItem, instead of a pointer
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1114 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-28 02:45:20 +00:00
madmaxoft@gmail.com
b29af701b9 MTRand reference is now passed as a Tick() parameter so that it isn't created and destroyed over and over again. All entities will handle physics (empty callback for now)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-22 10:15:53 +00:00
madmaxoft@gmail.com
afaf104b40 Added more constants into eEntityType; made them a compulsory parameter to the constructor, so that all entities have proper type.
Also added a few utility functions to cEntity for distinguishing the types (IsPlayer(), IsPickup() etc.)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1092 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21 12:52:14 +00:00
madmaxoft@gmail.com
033af999ba Reworked the IsA() / GetClass() framework to actually be useful. Added GetParentClass().
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1090 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21 12:21:20 +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
madmaxoft@gmail.com
2fcdbfd428 Added primary server version interface to cRoot and "primaryserverversion" console command.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1059 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-20 21:28:43 +00:00
madmaxoft@gmail.com
6b34a94477 Cleanup: Removed deprecated functions from Lua API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1033 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-11 14:05:48 +00:00
madmaxoft@gmail.com
e34f097543 Hopefully a fix for crash when chunks are added to a client being destroyed.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1032 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-11 14:00:58 +00:00
madmaxoft@gmail.com
4cebaa99f8 Refactored the world time.
Now it is stored in two values - WorldAge (only incremented, plugins cannot change) and TimeOfDay (plugins can change). Since sub-tick precision is needed in Tick(), we store it both as number of seconds (double) and number of ticks (Int64) is calculated off of that.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1022 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-01 21:38:20 +00:00
madmaxoft@gmail.com
08a20492ef Added the [Server].PrimaryServerVersion setting to settings.ini; 1.4.2 gets the correct version
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1018 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-31 19:54:42 +00:00
madmaxoft@gmail.com
96f7246df1 Added cWorld:SpawnMob(PosX, PosY, PosZ, EntityType) to Lua API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1014 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-28 14:57:35 +00:00
madmaxoft@gmail.com
e30bec4fd6 Double chests are now working, and with sound. (FS #69)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@993 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-20 21:53:09 +00:00
madmaxoft@gmail.com
d006ea5337 Made cWorld's block query functions more orthogonal, added GetBlockInfo() returning all info on a block.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@986 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-20 11:40:34 +00:00
faketruth
2a197705ac Converted some const char*s and std::strings to AStrings
Added a cPlayer:RemoveFromGroup() so players can be removed from groups programmatically
Added a cClientHandle:SetUsername to be used by Lua. I'm curious what ThuGie can do with his plugin.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@978 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-18 21:54:56 +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
a2f6243b21 Added delayed ticking to Lua API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@953 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-13 08:56:12 +00:00
madmaxoft@gmail.com
4c370798d5 BlockArea writing support (BlockTypes with BlockMeta only)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@933 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-06 16:58:31 +00:00