summaryrefslogtreecommitdiff
path: root/src/scripting/script.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-14 15:10:06 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-14 15:10:06 +0200
commit080ddbe822b03416934a875b2d949e3afc84fb96 (patch)
tree8915d1c92fdd0e609952afc492cbc3ea1152d1ae /src/scripting/script.h
parent3a132996f798dbf552ac858b06fa656b6790a501 (diff)
downloadmanaserv-080ddbe822b03416934a875b2d949e3afc84fb96.tar.gz
manaserv-080ddbe822b03416934a875b2d949e3afc84fb96.tar.bz2
manaserv-080ddbe822b03416934a875b2d949e3afc84fb96.tar.xz
manaserv-080ddbe822b03416934a875b2d949e3afc84fb96.zip
Removed NPC and character parameters from NPC functions
These functions can only be used in the context of a character talking to an NPC, so these parameters can be deduced from that context rather than passing them explicitly all the time. Simplifies NPC scripting.
Diffstat (limited to 'src/scripting/script.h')
-rw-r--r--src/scripting/script.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/scripting/script.h b/src/scripting/script.h
index 694deed6..7cf457cc 100644
--- a/src/scripting/script.h
+++ b/src/scripting/script.h
@@ -43,9 +43,13 @@ class Script : public sigc::trackable
struct Context
{
MapComposite *map;
+ Entity *npc;
+ Entity *character;
Context()
: map(0)
+ , npc(0)
+ , character(0)
{}
};