From 618cd58b293857779e6810ee9ca831a383822c66 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 18 Dec 2020 21:27:06 +0100
Subject: [PATCH] On re-naming failure, return to world edit mode.

---
 rogue_chat.html      | 2 +-
 rogue_chat_curses.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rogue_chat.html b/rogue_chat.html
index e2cd53c..a09892d 100644
--- a/rogue_chat.html
+++ b/rogue_chat.html
@@ -813,7 +813,7 @@ let tui = {
                                          || !game.player.carrying.commandable)) {
         return fail('not carrying anything commandable');
     } else if (mode_name == 'name_thing' && !game.player.carrying) {
-        return fail('not carrying anything to re-name');
+        return fail('not carrying anything to re-name', 'edit');
     } else if (mode_name == 'admin_thing_protect' && !game.player.carrying) {
         return fail('not carrying anything to protect')
     } else if (mode_name == 'take_thing' && game.player.carrying) {
diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py
index a58b842..caf688a 100755
--- a/rogue_chat_curses.py
+++ b/rogue_chat_curses.py
@@ -703,7 +703,7 @@ class TUI:
             not self.game.player.carrying.commandable):
             return fail('not carrying anything commandable')
         if mode_name == 'name_thing' and not self.game.player.carrying:
-            return fail('not carrying anything to re-name')
+            return fail('not carrying anything to re-name', 'edit')
         if mode_name == 'admin_thing_protect' and not self.game.player.carrying:
             return fail('not carrying anything to protect')
         if mode_name == 'take_thing' and self.game.player.carrying:
-- 
2.30.2