Tidied and coloured console messages

This commit is contained in:
Maruno17
2021-10-23 21:55:42 +01:00
parent 10a1fc4430
commit e417e4c659
7 changed files with 210 additions and 50 deletions

View File

@@ -44,6 +44,27 @@ module Kernel
echo string
echo "\r\n"
end
def echoln_good(string)
echo "\e[32m" # Green text
echo string
echo "\e[0m" # Back to default text color
echo "\r\n"
end
def echoln_bad(string)
echo "\e[31m" # Red text
echo string
echo "\e[0m" # Back to default text color
echo "\r\n"
end
def echoln_warn(string)
echo "\e[33m" # Brown/yellow text
echo string
echo "\e[0m" # Back to default text color
echo "\r\n"
end
end
Console.setup_console

View File

@@ -676,7 +676,7 @@ module PluginManager
File.open("Data/PluginScripts.rxdata", 'wb') { |f| Marshal.dump(scripts, f) }
# collect garbage
GC.start
echoln " done."
echoln_good "done"
echoln ""
end
#-----------------------------------------------------------------------------