Renamed mod:spew to mod:debug
This commit is contained in:
parent
253b636c25
commit
73a6b721b0
3 changed files with 12 additions and 13 deletions
|
@ -89,9 +89,9 @@ return {
|
||||||
en = "'Info' output",
|
en = "'Info' output",
|
||||||
ru = "Вывод 'Info'",
|
ru = "Вывод 'Info'",
|
||||||
},
|
},
|
||||||
output_mode_spew = {
|
output_mode_debug = {
|
||||||
en = "'Spew' output",
|
en = "'Debug' Output",
|
||||||
ru = "Вывод 'Spew'",
|
ru = "Вывод 'Debug'",
|
||||||
},
|
},
|
||||||
output_disabled = {
|
output_disabled = {
|
||||||
en = "Disabled",
|
en = "Disabled",
|
||||||
|
|
|
@ -122,20 +122,20 @@ VMFMod.info = function (self, message, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
VMFMod.spew = function (self, message, ...)
|
VMFMod.debug = function (self, message, ...)
|
||||||
|
|
||||||
message = tostring(message)
|
message = tostring(message)
|
||||||
|
|
||||||
message = safe_format(self, message, ...)
|
message = safe_format(self, message, ...)
|
||||||
|
|
||||||
if message then
|
if message then
|
||||||
message = "[" .. self:get_name() .. "][SPEW] " .. message
|
message = "[" .. self:get_name() .. "][DEBUG] " .. message
|
||||||
|
|
||||||
if _LOGGING_SETTINGS.spew.send_to_chat then
|
if _LOGGING_SETTINGS.debug.send_to_chat then
|
||||||
send_to_chat(message)
|
send_to_chat(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
if _LOGGING_SETTINGS.spew.send_to_log then
|
if _LOGGING_SETTINGS.debug.send_to_log then
|
||||||
send_to_log(message)
|
send_to_log(message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -174,7 +174,6 @@ end
|
||||||
-- ##### VMF internal functions and variables #########################################################################
|
-- ##### VMF internal functions and variables #########################################################################
|
||||||
-- ####################################################################################################################
|
-- ####################################################################################################################
|
||||||
|
|
||||||
|
|
||||||
vmf.unsent_chat_messages = _UNSENT_CHAT_MESSAGES
|
vmf.unsent_chat_messages = _UNSENT_CHAT_MESSAGES
|
||||||
|
|
||||||
vmf.load_logging_settings = function ()
|
vmf.load_logging_settings = function ()
|
||||||
|
@ -184,7 +183,7 @@ vmf.load_logging_settings = function ()
|
||||||
error = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_error") or 3,
|
error = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_error") or 3,
|
||||||
warning = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_warning") or 3,
|
warning = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_warning") or 3,
|
||||||
info = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_info") or 1,
|
info = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_info") or 1,
|
||||||
spew = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_spew") or 0,
|
debug = vmf:get("logging_mode") == "custom" and vmf:get("output_mode_debug") or 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
for method_name, logging_mode in pairs(_LOGGING_SETTINGS) do
|
for method_name, logging_mode in pairs(_LOGGING_SETTINGS) do
|
||||||
|
|
|
@ -136,16 +136,16 @@ local options_widgets = {
|
||||||
{
|
{
|
||||||
["show_widget_condition"] = {2},
|
["show_widget_condition"] = {2},
|
||||||
|
|
||||||
["setting_name"] = "output_mode_spew",
|
["setting_name"] = "output_mode_debug",
|
||||||
["widget_type"] = "dropdown",
|
["widget_type"] = "dropdown",
|
||||||
["text"] = vmf:localize("output_mode_spew"),
|
["text"] = vmf:localize("output_mode_debug"),
|
||||||
["options"] = {
|
["options"] = {
|
||||||
{text = vmf:localize("output_disabled"), value = 0},
|
{text = vmf:localize("output_disabled"), value = 0},
|
||||||
{text = vmf:localize("output_log"), value = 1},
|
{text = vmf:localize("output_log"), value = 1},
|
||||||
{text = vmf:localize("output_chat"), value = 2},
|
{text = vmf:localize("output_chat"), value = 2},
|
||||||
{text = vmf:localize("output_log_and_chat"), value = 3},
|
{text = vmf:localize("output_log_and_chat"), value = 3},
|
||||||
},
|
},
|
||||||
["default_value"] = 0
|
["default_value"] = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ vmf.on_setting_changed = function (setting_name)
|
||||||
|
|
||||||
vmf.load_logging_settings()
|
vmf.load_logging_settings()
|
||||||
|
|
||||||
elseif setting_name == "output_mode_spew" then
|
elseif setting_name == "output_mode_debug" then
|
||||||
|
|
||||||
vmf.load_logging_settings()
|
vmf.load_logging_settings()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue