dev console fix (duplicating strings after reloading)

This commit is contained in:
Azumgi 2018-01-24 18:01:27 +03:00
parent 6dcca6c594
commit 4cc3a49153

View file

@ -1,5 +1,7 @@
DEV_CONSOLE_ENABLED = DEV_CONSOLE_ENABLED or false DEV_CONSOLE_ENABLED = DEV_CONSOLE_ENABLED or false
if DEV_CONSOLE_ENABLED == false then
local print_original_function = print local print_original_function = print
local print_hook_function = function(func, ...) local print_hook_function = function(func, ...)
@ -15,7 +17,6 @@ print = function(...)
print_hook_function(print_original_function, ...) print_hook_function(print_original_function, ...)
end end
if DEV_CONSOLE_ENABLED == false then
CommandWindow.open("Developer console") CommandWindow.open("Developer console")
DEV_CONSOLE_ENABLED = true DEV_CONSOLE_ENABLED = true
end end