Improved the Lua documentation

- Lua documentation now needs a string giving the arguments list.
- When generating documentation first prints the command list and then prints
  the documentation for each command.
- Supports fixed max line length (set to 80)
- Uses four blank spaces as padding (easily replacable)
This commit is contained in:
Jonas Strandstedt
2014-12-03 14:13:53 +01:00
parent fc6fbf1587
commit a5e122b822
7 changed files with 113 additions and 58 deletions
+11 -6
View File
@@ -212,19 +212,22 @@ scripting::ScriptEngine::LuaLibrary Time::luaLibrary() {
{
"setDeltaTime",
&luascriptfunctions::time_setDeltaTime,
"setDeltaTime(number): Sets the amount of simulation time that happens "
"number",
"Sets the amount of simulation time that happens "
"in one second of real time"
},
{
"deltaTime",
&luascriptfunctions::time_deltaTime,
"deltaTime: Returns the amount of simulated time that passes in one "
"",
"Returns the amount of simulated time that passes in one "
"second of real time"
},
{
"setTime",
&luascriptfunctions::time_setTime,
"setTime({number, string}): Sets the current simulation time to the "
"{number, string}",
"Sets the current simulation time to the "
"specified value. If the parameter is a number, the value is the number "
"of seconds past the J2000 epoch. If it is a string, it has to be a "
"valid ISO 8601 date string (YYYY-MM-DDTHH:MN:SS)"
@@ -232,14 +235,16 @@ scripting::ScriptEngine::LuaLibrary Time::luaLibrary() {
{
"currentTime",
&luascriptfunctions::time_currentTime,
"currentTime(): Returns the current time as the number of seconds since "
"",
"Returns the current time as the number of seconds since "
"the J2000 epoch"
},
{
"currentTimeUTC",
&luascriptfunctions::time_currentTimeUTC,
"currentTimeUTC: Returns the current time as an ISO 8601 date string "
"(YYYY-MM-DDTHH:MN:SS"
"",
"Returns the current time as an ISO 8601 date string "
"(YYYY-MM-DDTHH:MN:SS)"
}
}
};