make the docs a little nicer

main changes:
- add parameter and return types where applicable
- use @module and @classmod tags at the top of files
- remove some redundant descriptions of return values, especially for functions that return a boolean

recommended next steps:
- more consistent grammar
- add links to classes and functions in descriptions where appropriate
- be consistent about naming Systems vs. SystemClasses and Components vs. ComponentClasses
This commit is contained in:
Andrew Minnich 2020-01-04 10:31:05 -05:00
parent 55ae5fd987
commit a65f88dd5e
31 changed files with 1474 additions and 1147 deletions

View file

@ -8,7 +8,7 @@ local Type = require(PATH..".type")
local Worlds = {}
--- Registers a World.
-- @param name Name to register under
-- @tparam string name Name to register under
-- @param world World to register
function Worlds.register(name, world)
if (type(name) ~= "string") then
@ -28,14 +28,14 @@ function Worlds.register(name, world)
end
--- Returns true if the containter has the World with the name
-- @param name Name of the World to check
-- @return True if the containter has the World with the name, false otherwise
-- @tparam string name Name of the World to check
-- @treturn boolean
function Worlds.has(name)
return Worlds[name] and true or false
end
--- Returns the World with the name
-- @param name Name of the World to get
-- @tparam string name Name of the World to get
-- @return World with the name
function Worlds.get(name)
return Worlds[name]
@ -45,4 +45,4 @@ return setmetatable(Worlds, {
__index = function(_, name)
error("Attempt to index world '"..tostring(name).."' that does not exist / was not registered", 2)
end
})
})