Crossfire Server, Trunk
rotate-tower.py
Go to the documentation of this file.
1 import Crossfire
2 
3 import CFTowerDefense as td
4 
5 player = Crossfire.WhoIsActivator()
6 wrench = Crossfire.WhoAmI()
7 current_map = Crossfire.WhoIsActivator().Map
8 tile = td.player_objects(player, current_map)
9 
10 Crossfire.SetReturnValue(1)
11 
12 if tile and current_map.Path == '/darcap/darcap/circus/fz_tower_defense':
13  result = False
14  result |= td.replace_tower(current_map, tile, td.bulletwall)
15  result |= td.replace_tower(current_map, tile, td.firewall, 40)
16  result |= td.replace_tower(current_map, tile, td.lightningwall)
17  if not result:
18  player.Message("There is no tower in the direction you are facing to rotate.")
19 else:
20  player.Message("Nothing happens here.")