Debian Codegraph @

scripts/game_events/lft_to_vnd.py

raw symbols SCIP
1 #
2 # (C) Copyright 2001 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 to teleport a character from the barn onto
14 # the veranda
15
16 import adonthell
17 import events
18
19 class lft_to_vnd(object):
20
21 # Parameters:
22 # smdest: destination submap
23 # xdest: X position on smdest
24 # ydest: Y position on smdest
25 # destdir: direction where to look at after the teleport
26 def __init__ (self, eventinstance, smdest, xdest, ydest, destdir):
27 self.smdest = smdest
28 self.xdest = xdest
29 self.ydest = ydest
30 self.destdir = destdir
31
32 def run (self, submap, x, y, dir, name):
33 p = adonthell.gamedata_get_character (name)
34 p.set_val ("on_veranda", 1)
35
36 events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir)