From be996c16626e6f7c8a7c43595f5c6efaacf668eb Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Fri, 18 Oct 2013 23:22:26 +0200
Subject: APIDump: Added cIniFile additional info.
---
MCServer/Plugins/APIDump/APIDesc.lua | 28 ++++++++++++++++++++++++++++
MCServer/Plugins/APIDump/main.lua | 2 +-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 544e02049..a57a7a342 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1003,6 +1003,34 @@ cFile:Delete("/usr/bin/virus.exe");
Constants =
{
},
+ AdditionalInfo =
+ {
+ {
+ Header = "Practical usage",
+ Contents = [[
+ If you want to use cIniFile you need to know a couple of things; what is the key name and what
+ is the value name. Below is a demonstration of what is what.
+
+; Comment line
+[KeyName1]
+ValueName1=Value1
+ValueName2=Value2
+
+[KeyName2]
+ValueName1=Value3
+
+
+ cIniFile is very easy to use. For example, you can find out what port the server is supposed to
+ use according to settings.ini by using this little snippet:
+
+local IniFile = cIniFile("settings.ini");
+if (IniFile:ReadFile()) then
+ ServerPort = IniFile:GetValueI("Server", "Port");
+end
+
+ ]],
+ },
+ },
},
cInventory =
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index fe4df751b..285b0c1c3 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -748,7 +748,7 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
end
if (a_ClassAPI.AdditionalInfo ~= nil) then
for i, additional in ipairs(a_ClassAPI.AdditionalInfo) do
- cf:write(" " .. additional.Header .. "\n");
+ cf:write(" " .. (additional.Header or "(No header)").. "\n");
end
end
cf:write(" \n\n");
--
cgit v1.2.3