1
0
Commit Graph

129 Commits

Author SHA1 Message Date
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
madmaxoft@gmail.com
ea2ed2c918 Moved blockticking into blockhandler classes.
Also slightly refactored the variable / argument names (BlockID is deprecated, use BlockType instead)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@921 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03 08:52:11 +00:00
madmaxoft@gmail.com
0130e73316 Added BLOCK_FACE_NONE into the plugin API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@919 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03 07:23:39 +00:00
madmaxoft@gmail.com
cade71ff68 Fixed Lua bindings for file renaming in previous commits
git-svn-id: http://mc-server.googlecode.com/svn/trunk@889 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23 22:25:33 +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
madmaxoft@gmail.com
7abb5f7604 Source files cleanup: OSSupport-related files in a separate subfolder, renamed.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@885 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23 21:23:33 +00:00
madmaxoft@gmail.com
3953277568 Source files cleanup: Removed unused cBlockToPickup
git-svn-id: http://mc-server.googlecode.com/svn/trunk@884 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23 21:09:13 +00:00
faketruth
6bc916fc3c Added cPlugin_NewLua::GetLocalDirectory() and exported it to Lua so plugins can store their settings in their own folder.
Core now stores banned players and whitelist data in its own directory

git-svn-id: http://mc-server.googlecode.com/svn/trunk@850 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-08 20:49:29 +00:00
madmaxoft@gmail.com
8c43857b73 Added the ItemToString() and ItemTypeToString() functions.
Ref.: http://forum.mc-server.org/showthread.php?tid=434&pid=4506#pid4506

git-svn-id: http://mc-server.googlecode.com/svn/trunk@847 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-08 16:08:29 +00:00
faketruth
f075bed23c ToLua does not like the override keyword :(
git-svn-id: http://mc-server.googlecode.com/svn/trunk@821 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-02 13:54:33 +00:00
faketruth
9db307bb53 Exported cWorld::DoWithChestAt to Lua
Exported cChestEntity to Lua for handling in DoWithChestAt

git-svn-id: http://mc-server.googlecode.com/svn/trunk@820 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-02 13:34:59 +00:00
madmaxoft@gmail.com
63bd1976cc Added a Player parameter to OnUpdatedSign and OnUpdatingSign Lua callbacks and to the cWorld:UpdateSign method (http://forum.mc-server.org/showthread.php?tid=464&pid=4393#pid4393)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@814 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-01 21:31:20 +00:00
madmaxoft@gmail.com
f1d62b77cd Gotten completely rid of all cPackets. The cProtocol125 class now does all the parsing and writing by itself.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@802 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-29 21:02:39 +00:00
madmaxoft@gmail.com
66f4c9e0c0 Cut out all packet handling to a separate cProtocol descendant
git-svn-id: http://mc-server.googlecode.com/svn/trunk@796 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-27 17:31:16 +00:00
madmaxoft@gmail.com
7cf9ddaa48 cSocket doesn't use cPackets.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@790 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-25 21:59:13 +00:00
madmaxoft@gmail.com
f0fc0edd21 cPickup doesn't use cPackets.
Also, Lua API change, OnCollectItem -> OnCollectPickup; first param is cPlayer to match other callbacks.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@786 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24 09:49:00 +00:00
madmaxoft@gmail.com
e92b9e7ecb Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24 07:58:26 +00:00
madmaxoft@gmail.com
263ce31bd6 Added plugin name to deprecation messages
Removed duplicate inheritance of m_Name in cPlugin_NewLua by making cWebPlugin interface-only

git-svn-id: http://mc-server.googlecode.com/svn/trunk@782 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-23 20:49:21 +00:00
faketruth
7c84349990 WebAdmin should not cause crashes anymore
Got rid of cWebPlugin_Lua
cPlugin_Lua is also a cWebPlugin now, so plugins don't need a separate cWebPlugin object
Changed some stuff to use AString instead of char*

git-svn-id: http://mc-server.googlecode.com/svn/trunk@777 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-22 14:22:21 +00:00
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