summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-13 16:04:32 +0200
committermadmaxoft <github@xoft.cz>2013-09-13 16:04:32 +0200
commitd2deb381c2ef9ef9b39a587cd53271ddcd51b511 (patch)
treeb76cfbc77e78949e0cb7dde9925d0d974d9790ec /MCServer
parentAPIDump: Added support for ignoring functions; ignoring the lua/tolua internals. (diff)
downloadcuberite-d2deb381c2ef9ef9b39a587cd53271ddcd51b511.tar
cuberite-d2deb381c2ef9ef9b39a587cd53271ddcd51b511.tar.gz
cuberite-d2deb381c2ef9ef9b39a587cd53271ddcd51b511.tar.bz2
cuberite-d2deb381c2ef9ef9b39a587cd53271ddcd51b511.tar.lz
cuberite-d2deb381c2ef9ef9b39a587cd53271ddcd51b511.tar.xz
cuberite-d2deb381c2ef9ef9b39a587cd53271ddcd51b511.tar.zst
cuberite-d2deb381c2ef9ef9b39a587cd53271ddcd51b511.zip
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua1
-rw-r--r--MCServer/Plugins/APIDump/main.lua8
2 files changed, 7 insertions, 2 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index c5ae0f890..e7b759505 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -43,6 +43,7 @@ g_APIDesc =
]],
Functions =
{
+ constructor = { Params = "", Return = "cBlockArea", Notes = "Creates a new empty cBlockArea object" },
Clear = { Params = "", Return = "", Notes = "Clears the object, resets it to zero size" },
CopyFrom = { Params = "BlockAreaSrc", Return = "", Notes = "Copies contents from BlockAreaSrc into self" },
CopyTo = { Params = "BlockAreaDst", Return = "", Notes = "Copies contents from self into BlockAreaDst." },
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index 5f8dc64b7..136a8d12f 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -246,8 +246,12 @@ function ReadDescriptions(a_API)
if (APIDesc.Functions ~= nil) then
-- Assign function descriptions:
for j, func in ipairs(cls.Functions) do
- -- func is {"FuncName"}, add Parameters, Return and Notes from g_APIDesc
- local FnDesc = APIDesc.Functions[func.Name];
+ local FnName = func.Name;
+ if (FnName == ".call") then
+ FnName = "constructor";
+ func.Name = "() <i>(constructor)</i>";
+ end
+ local FnDesc = APIDesc.Functions[FnName];
if (FnDesc ~= nil) then
func.Params = FnDesc.Params;
func.Return = FnDesc.Return;