From 9668209fde594c941070e68e8bdb925eee72ef8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 1 Sep 2020 15:02:13 +0200 Subject: bin : add debug_bot --- bin/ColonialTwilight.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/ColonialTwilight.rb b/bin/ColonialTwilight.rb index 9a376c9..3a9839b 100755 --- a/bin/ColonialTwilight.rb +++ b/bin/ColonialTwilight.rb @@ -9,9 +9,10 @@ class OptParser class Options - attr_accessor :verbose, :clearscreen + attr_accessor :debug_bot, :clearscreen, :verbose def initialize + @debug_bot = false @verbose = false @gui = false @clearscreen = false @@ -22,6 +23,7 @@ class OptParser parser.separator "" parser.separator "Specific options:" + add_debug_bot(parser) add_verbose(parser) add_gui(parser) add_clearscreen(parser) @@ -38,13 +40,18 @@ class OptParser end end + def add_debug_bot(parser) + parser.on("-d", "--debug_bot", "Run with FLN bot debug messages") do |v| + @debug_bot = v + end + end def add_verbose(parser) - parser.on("-v", "--[no-]verbose", "Run verbosely") do |v| - @verbose = v + parser.on("-v", "--verbose", "Run more verbose ui") do |v| + @verbose = true end end def add_gui(parser) - parser.on("-g", "--gui", "Run verbosely") do + parser.on("-g", "--gui", "Run in gui mode") do @gui = true puts "gui is not implemented yet ..." exit -- cgit v1.1-2-g2b99