feat: 'Debug Chat Messages' sub-setting under Debug Mode (default OFF) gates mod:echo chat spam; chat stays quiet with debug on, file diagnostics unaffected
This commit is contained in:
@@ -167,7 +167,14 @@ local widgets = {
|
|||||||
{
|
{
|
||||||
setting_id = "debug_mode",
|
setting_id = "debug_mode",
|
||||||
type = "checkbox",
|
type = "checkbox",
|
||||||
default_value = false
|
default_value = false,
|
||||||
|
sub_widgets = {
|
||||||
|
{
|
||||||
|
setting_id = "debug_chat",
|
||||||
|
type = "checkbox",
|
||||||
|
default_value = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
setting_id = "omni_mark",
|
setting_id = "omni_mark",
|
||||||
|
|||||||
@@ -57,6 +57,16 @@ local localization = {
|
|||||||
["zh-cn"] = "调试模式",
|
["zh-cn"] = "调试模式",
|
||||||
["zh-tw"] = "除錯模式",
|
["zh-tw"] = "除錯模式",
|
||||||
},
|
},
|
||||||
|
debug_chat = {
|
||||||
|
en = "Debug Chat Messages",
|
||||||
|
["zh-cn"] = "调试聊天消息",
|
||||||
|
["zh-tw"] = "除錯聊天訊息",
|
||||||
|
},
|
||||||
|
debug_chat_tooltip = {
|
||||||
|
en = "Print debug messages in the chat window. Leave off for a quiet game; diagnostics keep working in the background either way.",
|
||||||
|
["zh-cn"] = "在聊天窗口中打印调试消息。关闭可保持游戏界面安静;后台诊断不受影响。",
|
||||||
|
["zh-tw"] = "在聊天視窗中打印除錯訊息。關閉可保持遊戲介面安靜;背景診斷不受影響。",
|
||||||
|
},
|
||||||
omni_mark = {
|
omni_mark = {
|
||||||
en = "360° Marking",
|
en = "360° Marking",
|
||||||
["zh-cn"] = "全向标记",
|
["zh-cn"] = "全向标记",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ local Managers = Managers
|
|||||||
|
|
||||||
-- Debug Print
|
-- Debug Print
|
||||||
function mod:print_debug(...)
|
function mod:print_debug(...)
|
||||||
if mod_settings.debug_mode then
|
if mod_settings.debug_mode and mod_settings.debug_chat then
|
||||||
local n = select("#", ...)
|
local n = select("#", ...)
|
||||||
if n == 0 then
|
if n == 0 then
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user