1
0
Commit Graph

84 Commits

Author SHA1 Message Date
madmaxoft@gmail.com
427e582d5f Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@761 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19 19:42:32 +00:00
madmaxoft@gmail.com
eb3ed1aec1 Another handful of packets rewritten.
Also changed cItem::m_ItemID into m_ItemType of type short. Easier handling. m_ItemID kept for compatibility reasons (Lua-interface etc.)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@756 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19 11:51:17 +00:00
madmaxoft@gmail.com
1b5eaa92b5 Chat packet handled in the new way; fixed missing packet sending for inventory slot.
Again, API change! cPlugin:OnChat() has had its parameters swapped, to match all the other callbacks - Player first, Message second

git-svn-id: http://mc-server.googlecode.com/svn/trunk@751 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-18 10:38:15 +00:00
madmaxoft@gmail.com
2691e8daed Packet refactoring, phase two, partial. Rewritten a few packet handling functions not to use cPacket-descendant objects.
This breaks plugin API! Plugins need to modify their hook functions to match those used in the Core plugin

git-svn-id: http://mc-server.googlecode.com/svn/trunk@750 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-18 09:56:28 +00:00
madmaxoft@gmail.com
9e3aadb7d0 Updated Bindings to match the new armor categories and torch metas
git-svn-id: http://mc-server.googlecode.com/svn/trunk@729 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-11 19:49:36 +00:00
madmaxoft@gmail.com
6711fcd636 Fixed a crash in creative inventory (FS 235, patch submitted by l0udPL)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@722 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-10 19:01:36 +00:00
madmaxoft@gmail.com
2a72c5c838 Fixed a few gcc pedantic warnings; made BLOCKTYPE an unsigned char type.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@711 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-03 11:53:11 +00:00
madmaxoft@gmail.com
9dc0e3c233 Fixed warnings in item handlers - items' damage value is a short, but block meta is only a NIBBLETYPE. Also slight cleanup.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@704 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-29 12:07:22 +00:00
lapayo94@gmail.com
14dce23845 A new Block handling system :o
It was really a lot of work :D
Took me the complete weekend :D

Would really like to here your opinion on this =)
The aim of this is to put all the actions for one block in one place so it is not spread around the source. (ToPickup, Action in cWorld, Action in cChunk, Action here, action there :D)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@671 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15 20:36:34 +00:00
madmaxoft@gmail.com
933305fd95 Removed the deprecated confusing E_BLOCK_WOOD
git-svn-id: http://mc-server.googlecode.com/svn/trunk@667 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15 13:35:43 +00:00
lapayo94@gmail.com
d82e2449a0 Improved Squirrel Bindings
Added AddCommand / BindCommand for Squirrel Plugins

git-svn-id: http://mc-server.googlecode.com/svn/trunk@652 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-09 15:53:17 +00:00
lapayo94@gmail.com
083228a10d Squirrel Plugins
I worked a little bit on the squirrel Bindings
They work now on linux and windows :) (OSX is untested, but should work also) but they are very limited at the moment. (Only made OnChat working)
I also fixed some small bugs.


git-svn-id: http://mc-server.googlecode.com/svn/trunk@648 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-08 21:01:08 +00:00
madmaxoft@gmail.com
3cb643c9cb BLOCKTYPE and NIBBLETYPE are finally exported in Lua API as numbers, not usertypes
git-svn-id: http://mc-server.googlecode.com/svn/trunk@642 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02 16:38:30 +00:00
madmaxoft@gmail.com
bf13084f1f cBlockArea object added (with only minimal testing so far)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@641 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02 16:30:17 +00:00
madmaxoft@gmail.com
14584f69e6 Added the cWorld::DoWithPlayer() function and exported it in the Lua API. Removed the obsolete cWorld::GetPlayer() function.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@639 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02 11:21:21 +00:00
madmaxoft@gmail.com
ed5578fd24 Removed json-related methods from Lua API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@634 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-19 21:31:00 +00:00
madmaxoft@gmail.com
e5fdc133bc Removed the deprecated GetBlockEntity(), added several enumerators to replace it.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@629 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-17 19:58:39 +00:00
madmaxoft@gmail.com
3efd8fdabb Fixed lighting for cake, fence, fence gates, glass pane, iron bars, iron door and wooden door
git-svn-id: http://mc-server.googlecode.com/svn/trunk@625 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16 18:44:07 +00:00
madmaxoft@gmail.com
18a99085f4 Added new hooks: UPDATING_SIGN and UPDATED_SIGN. The first one is capable of changing the sign text by returning the new four lines along with the bool value
git-svn-id: http://mc-server.googlecode.com/svn/trunk@622 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16 15:06:14 +00:00
cedeel@gmail.com
c4f785e0be Lua binding for cVine fixed
git-svn-id: http://mc-server.googlecode.com/svn/trunk@619 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15 22:40:51 +00:00
madmaxoft@gmail.com
7d4abe001e Rewritten ForEach using #define-s, new ones can be added as a simple one-liner
git-svn-id: http://mc-server.googlecode.com/svn/trunk@618 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15 21:31:06 +00:00
madmaxoft@gmail.com
e1b5f0af04 Renamed HOOK_WEATHER_CHANGE to HOOK_WEATHER_CHANGED, added the glue code for it to actually work
git-svn-id: http://mc-server.googlecode.com/svn/trunk@610 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 19:20:31 +00:00
madmaxoft@gmail.com
0f39e9b10b Added a world parameter to HOOK_CHUNK_GENERATING.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@609 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 17:30:37 +00:00
cedeel@gmail.com
92c59963f8 Attempt to bring sanity to newlines across systems.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 13:06:06 +00:00
cedeel@gmail.com
0b29b3b3cf Added HOOK_WEATHER_CHANGE.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@605 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 12:24:39 +00:00
faketruth
79f9841449 Exported the ItemCategory functions and added a IsTool() function to it, for easy checking whether an item is a tool
git-svn-id: http://mc-server.googlecode.com/svn/trunk@603 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13 18:14:20 +00:00
madmaxoft@gmail.com
1c60680fba Added a BlockToPickup hook for modifying pickups when a player breaks a block.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@602 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13 17:37:23 +00:00
faketruth
ee9e024bed I think the chunk generation hooks for Lua are pretty good now, though it might still need some tweaking
git-svn-id: http://mc-server.googlecode.com/svn/trunk@600 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13 15:52:28 +00:00
cedeel@gmail.com
900c26dc30 Revamped the weather system.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@599 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13 00:46:23 +00:00
madmaxoft@gmail.com
223967b80d Added working crafting hooks HOOK_PRE_CRAFTING, HOOK_CRAFTING_NO_RECIPE and HOOK_POST_CRAFTING
git-svn-id: http://mc-server.googlecode.com/svn/trunk@598 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-12 21:30:32 +00:00
madmaxoft@gmail.com
5e6c736859 Updated the crafting recipes architecture to better support crafting hooks. Removed the old recipe file and implementation altogether.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@597 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-12 20:03:46 +00:00
faketruth
373dac3204 Added implementation of E_PLUGIN_CHUNK_GENERATING lua hook
It crashes the server when a plugin actually overrides default behavior though...

git-svn-id: http://mc-server.googlecode.com/svn/trunk@594 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-11 19:25:55 +00:00
madmaxoft@gmail.com
a9350c4361 New IniFile functionality: read value and set default if it isn't present (GetValueSet() ); used by cWorld
git-svn-id: http://mc-server.googlecode.com/svn/trunk@586 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 15:12:52 +00:00
madmaxoft@gmail.com
8189487258 Sugarcane and cactus max height can be set in world.ini.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@585 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 13:00:14 +00:00
madmaxoft@gmail.com
2c241bb9a4 Plants growable by bonemeal are settable in the world.ini. Default matches vanilla MC.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@584 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 12:44:02 +00:00
madmaxoft@gmail.com
ec61713221 Cacti grow by themselves and by bonemeal
git-svn-id: http://mc-server.googlecode.com/svn/trunk@583 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 12:03:49 +00:00
cedeel@gmail.com
2295c1d7cb Configurable classic composition generator
git-svn-id: http://mc-server.googlecode.com/svn/trunk@575 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-08 01:56:44 +00:00
madmaxoft@gmail.com
876014b8e8 Bonemeal works on crops, melons, pumpkins, saplings and grass. Plant growing has been refactored into separate functions callable from Lua, too.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@573 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07 21:07:21 +00:00
madmaxoft@gmail.com
1cca9b13b3 Item-dropping code rewritten and centralized - now there's only one place to modify if we want to split or merge same-item drops: cWorld:SpawnItemPickups(). Also, mined blocks can now drop more items, and they recognize if they're being mined by the correct tool.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-06 20:18:50 +00:00
madmaxoft@gmail.com
d832996e19 New hook, E_PLUGIN_CHUNK_GENERATED, called after each chunk is generated (the chunk is already present in cWorld)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@558 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-05 15:20:48 +00:00
madmaxoft@gmail.com
b355bdecce Added the new recipe parser, parsing the crafting.txt file. Included are a few recipes. The old parser still works, but will be replaced soon.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@549 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-04 12:08:20 +00:00
cedeel@gmail.com
b17d12c86f Updated zlib, added chat formatting, fixed upside down stairs and slabs, fixed makefiles, hopefully updated vc project files
git-svn-id: http://mc-server.googlecode.com/svn/trunk@546 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-03 23:35:17 +00:00
madmaxoft@gmail.com
1d6c55afcc Added Lua function cRoot:ForEachWorld(), removed the obsolete cRoot:GetWorld() method (both C++ and Lua)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@534 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-02 09:38:51 +00:00
madmaxoft@gmail.com
c95b11b83a cWorld::UnloadUnusedChunks() exported to Lua
git-svn-id: http://mc-server.googlecode.com/svn/trunk@531 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-31 20:04:32 +00:00
madmaxoft@gmail.com
7af3df03a0 Added support for SetNextBlockTick() function callable from Lua
git-svn-id: http://mc-server.googlecode.com/svn/trunk@527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-30 21:29:51 +00:00
madmaxoft@gmail.com
f8328346b5 Lua plugins can now query the world for various queue sizes ( http://forum.mc-server.org/showthread.php?tid=432 )
git-svn-id: http://mc-server.googlecode.com/svn/trunk@524 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-30 18:20:38 +00:00
madmaxoft@gmail.com
5d4e9e18da Added wool and netherrack block IDs
git-svn-id: http://mc-server.googlecode.com/svn/trunk@509 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-27 14:02:13 +00:00
madmaxoft@gmail.com
a4a418a679 Merged the composable_generator branch into the trunk
git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-25 07:18:52 +00:00
madmaxoft@gmail.com
ba5b6ca751 A globally-accessible OS-independent GetDirectoryContents() function for listing all objects in a folder as an AStringList
git-svn-id: http://mc-server.googlecode.com/svn/trunk@433 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-25 14:24:51 +00:00
madmaxoft@gmail.com
b69ac328c0 Reverted the previous commit - it is useless, since entities still depend heavily on cWorld
git-svn-id: http://mc-server.googlecode.com/svn/trunk@428 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24 11:14:34 +00:00