- tile_class = self.thing.game.map_control[self.thing.position]
- if tile_class in self.thing.game.map_control_passwords:
- tile_pw = self.thing.game.map_control_passwords[tile_class]
- if self.args[1] != tile_pw:
- raise GameError('wrong password for tile')
+ if not self.thing.game.can_do_tile_with_pw(self.thing.position,
+ self.args[1]):
+ raise GameError('wrong password for tile')