From e65306c325e81f9562c57995502129640cf33aff Mon Sep 17 00:00:00 2001 From: Ratstail91 Date: Sun, 23 Nov 2014 06:45:35 -0800 Subject: [PATCH] Basic outline for the room's API functions. --- lua-API-CreateRoom().md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua-API-CreateRoom().md diff --git a/lua-API-CreateRoom().md b/lua-API-CreateRoom().md new file mode 100644 index 0000000..c2b42ec --- /dev/null +++ b/lua-API-CreateRoom().md @@ -0,0 +1,37 @@ +## Calling + +This is a breakdown of the parameters needed for CreateRoom(). + +There are three ways to use this function: + + --string as the sole parameter + local room = CreateRoom("room name") + --the room can be initialized later + Initialize(room, arguments...) + +or + + --the list of parameters + local room = CreateRoom("room name", arguments...) + +or + + --a table containing the parameters, with the room name as element 1 + local argTable = { + "room name", + arguments... + } + local room = CreateRoom(argTable) + +Rooms can be initialized with `Initialize()` at any time, but doing so will overwrite the old settings of that room, and at this stage, the side effects can't be predicted. + +## Parameter List + +In each of the above examples, a list of parameters is needed. The mandatory parameters are listed here in order: + +* Room Name: a string indicating the name of the room; this cannot be changed after the room's creation +* Tileset Name: a string indicating the tileset the clients should use for this room +* Pager load: The function used for loading Region data +* Pager load: The function used for saving Region data +* Pager load: The function used for creating Region data +* Pager load: The function used for unloading Region data