summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua14
-rw-r--r--src/Bindings/AllToLua.pkg1
-rw-r--r--src/MapManager.h8
3 files changed, 20 insertions, 3 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 296a60640..8265b4e19 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1534,6 +1534,19 @@ a_Player:OpenWindow(Window);
},
}, -- cMap
+ cMapManager =
+ {
+ Desc = [[
+ This class is associated with a single {{cWorld}} instance and manages a list of maps.
+ ]],
+ Functions =
+ {
+ DoWithMap = { Params = "ID, Callback", Return = "bool", Notes = "Calls the callback for the map with the specified ID. Returns true if the map was found and the callback called, false if map not found." },
+ GetNumMaps = { Params = "", Return = "number", Notes = "Returns the number of registered maps." },
+ },
+
+ }, -- cMapManager
+
cMonster =
{
Desc = [[
@@ -2289,6 +2302,7 @@ World:ForEachEntity(
]],
},
}, -- AdditionalInfo
+ Inherits = "cMapManager"
}, -- cWorld
HTTPFormData =
diff --git a/src/Bindings/AllToLua.pkg b/src/Bindings/AllToLua.pkg
index dd45a2aab..4fd5a68b8 100644
--- a/src/Bindings/AllToLua.pkg
+++ b/src/Bindings/AllToLua.pkg
@@ -74,6 +74,7 @@ $cfile "../UI/Window.h"
$cfile "../Mobs/Monster.h"
$cfile "../CompositeChat.h"
$cfile "../Map.h"
+$cfile "../MapManager.h"
diff --git a/src/MapManager.h b/src/MapManager.h
index 05673c694..5da8be035 100644
--- a/src/MapManager.h
+++ b/src/MapManager.h
@@ -21,11 +21,13 @@ typedef cItemCallback<cMap> cMapCallback;
+// tolua_begin
/** Manages the in-game maps of a single world - Thread safe. */
class cMapManager
{
public:
+ // tolua_end
cMapManager(cWorld * a_World);
@@ -43,7 +45,7 @@ public:
* Returns true if the map was found and the callback called, false if map not found.
* Callback return ignored.
*/
- bool DoWithMap(unsigned int a_ID, cMapCallback & a_Callback);
+ bool DoWithMap(unsigned int a_ID, cMapCallback & a_Callback); // tolua_export
/** Calls the callback for each map.
*
@@ -51,7 +53,7 @@ public:
*/
bool ForEachMap(cMapCallback & a_Callback);
- unsigned int GetNumMaps(void) const;
+ unsigned int GetNumMaps(void) const; // tolua_export
/** Loads the map data from the disk */
void LoadMapData(void);
@@ -70,7 +72,7 @@ private:
cWorld * m_World;
-};
+}; // tolua_export