madmaxoft
b8a2793228
Fixed bindings for cHopperEntity:GetOutputBlockPos().
2013-10-23 12:09:11 +02:00
madmaxoft
455d33963f
Re-added the cWorld:GetSignLines() to the API.
...
Somehow this got lost somewhere.
2013-10-13 14:13:15 +02:00
madmaxoft
0352e45898
Fixed and exported cWorld:QueueTask().
...
This implements #220 .
2013-10-12 22:24:59 +02:00
madmaxoft
a2d5f86769
Improved error message in cPlugin:AddWebTab() API.
2013-09-18 22:30:36 +02:00
madmaxoft
403e0d5be4
cPluginManager:BindConsoleCommand can be called with the dot operator, too.
2013-09-18 20:40:09 +02:00
madmaxoft
b66031de65
cPluginManager:BindCommand can be called with the dot operator, too.
2013-09-18 20:40:09 +02:00
madmaxoft
5d2d0fe109
Fixed previous commit.
2013-09-15 21:52:25 +02:00
madmaxoft
f8947ce18e
Fixed API bindings of cWorld:GetSignLines(), exported cWorld:UseBlockEntity().
2013-09-15 21:47:56 +02:00
madmaxoft
9a35c1c150
Fixed cWorld bindings for GetBlockInfo() and GetBlockTypeMeta().
...
They no longer require the superficial arguments.
2013-09-15 20:29:20 +02:00
madmaxoft
791ced42cc
Added StringSplitAndTrim() to Lua API
2013-09-11 21:22:25 +02:00
madmaxoft
6677a5e8ca
Implemented basic physics for projectiles.
2013-08-27 19:57:37 +02:00
madmaxoft
3957ca94e7
cPluginManager.AddHook old-style API usage prints the stack trace.
...
This eases migration to #121 API.
2013-08-21 21:41:34 +02:00
madmaxoft
e263fc7c72
Added a deprecation warning to the old style API.
...
This completes #121 .
2013-08-21 21:32:40 +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
1a7912744f
Moved entities into the Entities subfolder.
2013-08-19 11:39:13 +02:00
madmaxoft
493100bdb0
Finished renaming cPlugin_NewLua to cPluginLua.
2013-08-19 09:39:18 +02:00
madmaxoft
c85acd4ece
Renamed Plugin_NewLua to PluginLua.
2013-08-10 08:22:52 +02:00
madmaxoft
198b221997
LuaState refactoring: using templates for hook function calls.
...
This simplifies calling Lua functions considerably, it's almost like calling a C++ function, only with an extra argument to delimit args from returned values.
2013-08-08 14:08:35 +02:00
madmaxoft
58a76a90dc
Added cLineBlockTracer to the API
2013-08-07 14:34:00 +02:00
madmaxoft
0281b1db6e
Fixed compilation in ManualBindings
2013-08-06 19:27:48 +02:00
madmaxoft
4034136922
cLuaState is used for pushing splits in ManualBindings
2013-08-06 17:17:26 +02:00
madmaxoft
c0066e7260
Merge branch 'master' into BlockTracing
2013-08-05 16:02:41 +02:00
madmaxoft
73fcd7ad1c
Exported the cWorld:TryGetHeight() function
2013-08-05 15:54:10 +02:00
madmaxoft
d83e4369d3
Exported cWorld:DoWithEntityByID() to Lua API
2013-08-05 15:41:24 +02:00
madmaxoft
3b418c7695
Alpha-sorted the manual bindings' functions.
2013-08-05 15:26:43 +02:00
madmaxoft
71bb41ee86
LuaState refactoring: initial part.
...
The cLuaState class is a wrapper for the lua_State * and for the common functions on it. The cPlugin_NewLua has been rewritten to use it instead of the raw pointer. Part of #33
2013-08-04 23:11:25 +02:00
FakeTruth
5a9d4f89c2
WebAdmin templates can use Lua
...
New WebAdmin templates can use Lua to completely compose the pages
themselves. This should allow infinite WebAdmin design possibilities.
2013-07-29 02:37:59 +02:00
madmaxoft@gmail.com
fe3712284e
Added cWorld::SetSignLines(), re-exported to Lua manually to avoid ghost return values
...
FS #364
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1582 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-12 07:14:06 +00:00
madmaxoft@gmail.com
4d441e9ec7
Added LOGWARNING() function to Lua API, as a synonym to LOGWARN()
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1558 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-05 20:15:19 +00:00
madmaxoft@gmail.com
a9d221b74b
ToLuaDoxy: initial import
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1544 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-04 09:46:32 +00:00
madmaxoft@gmail.com
bf7c2fe783
Added cLuaWindow:SetOnSlotChanged(); the callback is called only for non-inventory slots
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1535 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-31 07:16:14 +00:00
madmaxoft@gmail.com
2eb1240e14
Added the OnClosing callback to cLuaWindow API
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1534 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30 20:40:43 +00:00
madmaxoft@gmail.com
9684f90f83
LuaWindow: Initial code, the window can be opened, but not much manipulated
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30 19:34:09 +00:00
madmaxoft@gmail.com
9be27992e2
Moved BlockEntities to a separate folder
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28 19:12:47 +00:00
madmaxoft@gmail.com
5c3235ecdc
Implemented droppers
...
Added a common ancestor class "DropSpenser" that has the common code for dropper and dispenser and is Lua-accessible, too. The Debuggers plugin now triggers both droppers and dispensers when rclking them with a redstone torch.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1514 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26 14:39:04 +00:00
madmaxoft@gmail.com
e3136c2d0f
Fixed the cWorld:DoWithChestAt(), DoWithDispenserAt() and DoWithFurnaceAt() callbacks binding.
...
They are now doing what the comment said they are doing.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1506 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-25 11:57:28 +00:00
madmaxoft@gmail.com
90e0656c75
Slight cleanup in the cInventory / cItemGrid API
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-24 09:16:09 +00:00
madmaxoft@gmail.com
1fbc77f9ed
Fixed gcc build
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1382 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10 21:25:26 +00:00
madmaxoft@gmail.com
cc26f16463
Added cItemGrid to represent an XY grid of items; converted chests to use cItemGrid.
...
http://forum.mc-server.org/showthread.php?tid=831
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1380 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10 19:52:03 +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
c497a34536
Fixed ASSERT / VERIFY mismatch in ManualBindings' error handling
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1206 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-10 14:37:23 +00:00
faketruth
fdcad8a72d
Added a GetClassStatic function to all entities, as well as cFurnaceEntity, cChestEntity and cWorld
...
Using templates to generate ForEach* functions instead of MACROS
Better error reporting in ForEach* functions
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1191 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-02 23:55:29 +00:00
madmaxoft@gmail.com
d6af6b353d
Fixed GCC error in ManualBindings
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1189 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-02 16:16:35 +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
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
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
87b60df058
Fixed manual bindings' ForEachXXX mapping not checking the object instance for validity.
...
( http://forum.mc-server.org/showthread.php?tid=591&pid=5007#pid5007 )
git-svn-id: http://mc-server.googlecode.com/svn/trunk@996 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-21 08:14:27 +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
faketruth
4eaafbd70f
Got rid of "self" in plugins, which is deprecated anyway
...
Fixed bug in many On* hooks that did not pop the return values from the stack
Fixed Plugin:Call() that removed one too many items from the stack
git-svn-id: http://mc-server.googlecode.com/svn/trunk@950 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-11 20:49:18 +00:00
faketruth
e421e9077c
Can now send usertypes (cPlayer, cEntity, cCuboid) along with a plugin:Call()
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@946 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-11 14:02:09 +00:00