diff options
author | Samuel Barney <samjbarney@gmail.com> | 2013-10-02 01:48:06 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2013-10-02 01:48:06 +0200 |
commit | 523c6b4b94a7b52ffa588f7448a0b1e4e6371517 (patch) | |
tree | 5b31bf8e5b46e7e2520ba6bfb94fe899226b58e1 /MCServer/Plugins/APIDump/main.lua | |
parent | Added glass pane as transparent. Removed excess g_BlockOneHitDig[E_BLOCK_REDSTONE_WIRE]. (diff) | |
parent | Merge pull request #193 from tigerw/bugfixes (diff) | |
download | cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.gz cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.bz2 cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.lz cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.xz cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.zst cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/APIDump/main.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua index 7c200712d..300a4d9ce 100644 --- a/MCServer/Plugins/APIDump/main.lua +++ b/MCServer/Plugins/APIDump/main.lua @@ -291,6 +291,19 @@ end function ReadDescriptions(a_API) + -- Returns true if the class of the specified name is to be ignored + local function IsClassIgnored(a_ClsName) + if (g_APIDesc.IgnoreClasses == nil) then + return false; + end + for i, name in ipairs(g_APIDesc.IgnoreClasses) do + if (a_ClsName:match(name)) then + return true; + end + end + return false; + end + -- Returns true if the function (specified by its fully qualified name) is to be ignored local function IsFunctionIgnored(a_FnName) if (g_APIDesc.IgnoreFunctions == nil) then @@ -317,6 +330,20 @@ function ReadDescriptions(a_API) return false; end + -- Remove ignored classes from a_API: + local APICopy = {}; + for i, cls in ipairs(a_API) do + if not(IsClassIgnored(cls.Name)) then + table.insert(APICopy, cls); + else + LOG("Ignoring class " .. cls.Name); + end + end + for i = 1, #a_API do + a_API[i] = APICopy[i]; + end; + + -- Process the documentation for each class: for i, cls in ipairs(a_API) do -- Rename special functions: for j, fn in ipairs(cls.Functions) do @@ -335,6 +362,9 @@ function ReadDescriptions(a_API) elseif (fn.Name == ".sub") then fn.DocID = "operator_sub"; fn.Name = "<i>operator -</i>"; + elseif (fn.Name == ".eq") then + fn.DocID = "operator_sub"; + fn.Name = "<i>operator ==</i>"; end end |