summaryrefslogtreecommitdiffstats
path: root/src/model/Entity.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/Entity.hpp')
-rw-r--r--src/model/Entity.hpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/model/Entity.hpp b/src/model/Entity.hpp
index fc1debb..b14e122 100644
--- a/src/model/Entity.hpp
+++ b/src/model/Entity.hpp
@@ -28,19 +28,23 @@
#include "Direction.hpp"
+#include "Scriptable.hpp"
#include <string>
+#include <utility>
namespace RPGEdit {
namespace Model {
-class Entity {
+class Entity : public Scriptable {
private:
std::string name;
+ std::pair<std::string, std::string> scriptInteract;
+
Direction direction;
public:
@@ -60,8 +64,13 @@ public:
direction = dir;
}
- void interact(uint64_t time) {
- std::fprintf(stderr, "Tried to interact with `%s' entity at %llu\n", name.c_str(), (unsigned long long)time);
+ const std::pair<std::string, std::string> & getScriptInteract() const {
+ return scriptInteract;
+ }
+
+ void setScriptInteract(const std::string &script, const std::string &name) {
+ scriptInteract.first = script;
+ scriptInteract.second = name;
}
};