if t.blocking]:
raise PlayError('blocked by other thing')
elif self.thing.game.map[test_pos] != '.':
- raise PlayError('would move into illegal territory')
+ raise PlayError('blocked by impassable tile')
def do(self):
self.thing.position = self.get_move_target()
def check(self):
if self.thing.carrying:
- raise PlayError('already carrying')
+ raise PlayError('already carrying something')
nothing_to_pick_up = True
for t in [t for t in self.thing.game.things
if t != self.thing and t.position == self.thing.position
cmd_PORTAL.argtypes = 'yx_tuple:nonneg string'
def cmd_PLAY_ERROR(game, msg):
+ game.tui.log_msg('? ' + msg)
game.tui.flash()
game.tui.do_refresh = True
cmd_PLAY_ERROR.argtypes = 'string'
} else if (tokens[0] === 'UNHANDLED_INPUT') {
tui.log_msg('? unknown command');
} else if (tokens[0] === 'PLAY_ERROR') {
+ tui.log_msg('? ' + tokens[1]);
terminal.blink_screen();
} else if (tokens[0] === 'ARGUMENT_ERROR') {
tui.log_msg('? syntax error: ' + tokens[1]);