]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix misleading chat messages of /clearobjects (#10690)
authorWuzzy <wuzzy2@mail.ru>
Mon, 8 Mar 2021 19:27:32 +0000 (19:27 +0000)
committerGitHub <noreply@github.com>
Mon, 8 Mar 2021 19:27:32 +0000 (20:27 +0100)
builtin/game/chat.lua

index eb3364d60352df5917b1ca161ce968e7f4779dd8..e05e83a275e1208d348f3cd902ebc1fb5852d5d1 100644 (file)
@@ -1075,10 +1075,12 @@ core.register_chatcommand("clearobjects", {
                        return false, S("Invalid usage, see /help clearobjects.")
                end
 
-               core.log("action", name .. " clears all objects ("
+               core.log("action", name .. " clears objects ("
                                .. options.mode .. " mode).")
-               core.chat_send_all(S("Clearing all objects. This may take a long time. "
-                       .. "You may experience a timeout. (by @1)", name))
+               if options.mode == "full" then
+                       core.chat_send_all(S("Clearing all objects. This may take a long time. "
+                               .. "You may experience a timeout. (by @1)", name))
+               end
                core.clear_objects(options)
                core.log("action", "Object clearing done.")
                core.chat_send_all("*** "..S("Cleared all objects."))