summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Bindings/ManualBindings.cpp4
-rw-r--r--src/Map.h5
-rw-r--r--src/MapManager.cpp2
-rw-r--r--src/MapManager.h2
4 files changed, 11 insertions, 2 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index c220e5e0a..f2d21a682 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2511,6 +2511,10 @@ void ManualBindings::Bind(lua_State * tolua_S)
tolua_function(tolua_S, "UpdateSign", tolua_cWorld_SetSignLines);
tolua_endmodule(tolua_S);
+ tolua_beginmodule(tolua_S, "cMapManager");
+ tolua_function(tolua_S, "DoWithMap", tolua_DoWithID<cMapManager, cMap, &cMapManager::DoWithMap>);
+ tolua_endmodule(tolua_S);
+
tolua_beginmodule(tolua_S, "cPlugin");
tolua_function(tolua_S, "Call", tolua_cPlugin_Call);
tolua_endmodule(tolua_S);
diff --git a/src/Map.h b/src/Map.h
index fc754e6eb..a6df7e5f2 100644
--- a/src/Map.h
+++ b/src/Map.h
@@ -185,6 +185,11 @@ public:
const cColorList & GetData(void) const { return m_Data; }
+ static const char * GetClassStatic(void) // Needed for ManualBindings's DoWith templates
+ {
+ return "cMap";
+ }
+
protected:
diff --git a/src/MapManager.cpp b/src/MapManager.cpp
index 2fc44ccc8..9d02eafb4 100644
--- a/src/MapManager.cpp
+++ b/src/MapManager.cpp
@@ -22,7 +22,7 @@ cMapManager::cMapManager(cWorld * a_World)
-bool cMapManager::DoWithMap(unsigned int a_ID, cMapCallback & a_Callback)
+bool cMapManager::DoWithMap(int a_ID, cMapCallback & a_Callback)
{
cCSLock Lock(m_CS);
cMap * Map = GetMapData(a_ID);
diff --git a/src/MapManager.h b/src/MapManager.h
index 5da8be035..80e6d16d1 100644
--- a/src/MapManager.h
+++ b/src/MapManager.h
@@ -45,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); // tolua_export
+ bool DoWithMap(int a_ID, cMapCallback & a_Callback); // Exported in ManualBindings.cpp
/** Calls the callback for each map.
*