| 1 | # |
| 2 | # (C) Copyright 2002 Kai Sterker <[email protected]> |
| 3 | # Part of the Adonthell Project http://adonthell.linuxgames.com |
| 4 | # |
| 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License. |
| 7 | # This program is distributed in the hope that it will be useful, |
| 8 | # but WITHOUT ANY WARRANTY. |
| 9 | # |
| 10 | # See the COPYING file for more details |
| 11 | # |
| 12 | |
| 13 | # -- Map Event for initiating dialogue with a character. |
| 14 | |
| 15 | import adonthell |
| 16 | |
| 17 | class speak(object): |
| 18 | |
| 19 | # Parameters: |
| 20 | # speaker: name of character that shall speak |
| 21 | def __init__ (self, eventinstance, speaker): |
| 22 | self.speaker = adonthell.gamedata_get_character (speaker) |
| 23 | |
| 24 | def run (self, submap, x, y, dir, name): |
| 25 | self.speaker.launch_action (adonthell.gamedata_player ()) |