summaryrefslogtreecommitdiff
path: root/src/scripting/script.hpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-09 21:24:56 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-09 21:24:56 +0000
commit031709fc8f63bd6fa2399361bbce96667b767e36 (patch)
treea861adad005952920c6ab2f4123ed168aba9bf3b /src/scripting/script.hpp
parent8b6b751ab16c212078dbebc15c7250cad16c4d8d (diff)
downloadmanaserv-031709fc8f63bd6fa2399361bbce96667b767e36.tar.gz
manaserv-031709fc8f63bd6fa2399361bbce96667b767e36.tar.bz2
manaserv-031709fc8f63bd6fa2399361bbce96667b767e36.tar.xz
manaserv-031709fc8f63bd6fa2399361bbce96667b767e36.zip
Moved creation of testing NPC from C++ to Lua.
Diffstat (limited to 'src/scripting/script.hpp')
-rw-r--r--src/scripting/script.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/scripting/script.hpp b/src/scripting/script.hpp
index 5862e50c..8ab89c25 100644
--- a/src/scripting/script.hpp
+++ b/src/scripting/script.hpp
@@ -26,6 +26,7 @@
#include <string>
+class MapComposite;
class Thing;
/**
@@ -47,6 +48,8 @@ class Script
*/
static Script *create(std::string const &engine, std::string const &file);
+ Script(): mMap(NULL) {}
+
virtual ~Script() {}
/**
@@ -79,6 +82,21 @@ class Script
* @return the value returned by the script.
*/
virtual int execute() = 0;
+
+ /**
+ * Sets associated map.
+ */
+ void setMap(MapComposite *m)
+ { mMap = m; }
+
+ /**
+ * Gets associated map.
+ */
+ MapComposite *getMap() const
+ { return mMap; }
+
+ private:
+ MapComposite *mMap;
};
#endif