Crossfire Server, Trunk
block-player.py
Go to the documentation of this file.
1 import Crossfire
2 
3 player = Crossfire.WhoIsActivator()
4 pedestal = Crossfire.WhoAmI()
5 
6 # key/value: direction player is facing/direction player should be moved
7 directions = {
8  Crossfire.Direction.NORTH: Crossfire.Direction.SOUTH,
9  Crossfire.Direction.SOUTH: Crossfire.Direction.NORTH,
10  Crossfire.Direction.EAST: Crossfire.Direction.WEST,
11  Crossfire.Direction.WEST: Crossfire.Direction.EAST,
12  Crossfire.Direction.NORTHWEST: Crossfire.Direction.SOUTHEAST,
13  Crossfire.Direction.NORTHEAST: Crossfire.Direction.SOUTHWEST,
14  Crossfire.Direction.SOUTHWEST: Crossfire.Direction.NORTHEAST,
15  Crossfire.Direction.SOUTHEAST: Crossfire.Direction.NORTHWEST
16 }
17 
18 if player and player.Facing:
19  player.Move(directions[player.Facing])