}
this.draw_face = false;
this.tile_draw = false;
- if (mode_name == 'command_thing' && (!game.player.carrying
- || !game.player.carrying.commandable)) {
+ if (mode_name == 'command_thing' && (!game.player.carrying
+ || !game.player.carrying.commandable)) {
return fail('not carrying anything commandable', 'play');
- };
- if (mode_name == 'take_thing' && game.player.carrying) {
+ } else if (mode_name == 'take_thing' && game.player.carrying) {
return fail('already carrying something', 'play');
- };
- if (mode_name == 'drop_thing' && !game.player.carrying) {
+ } else if (mode_name == 'drop_thing' && !game.player.carrying) {
return fail('not carrying anything droppable', 'play');
+ } else if (mode_name == 'enter_hat' && !game.player.hat) {
+ return fail('not wearing hat to edit', 'edit');
}
if (mode_name == 'admin_enter' && this.is_admin) {
mode_name = 'admin';
return fail('already carrying something')
if mode_name == 'drop_thing' and not self.game.player.carrying:
return fail('not carrying anything droppable')
+ if mode_name == 'enter_hat' and not hasattr(self.game.player, 'hat'):
+ return fail('not wearing hat to edit', 'edit')
if mode_name == 'admin_enter' and self.is_admin:
mode_name = 'admin'
elif mode_name in {'name_thing', 'admin_thing_protect'}: