Files
infinitefusion-e18/Data/Scripts/001_Technical/006_DebugConsole.rb
Roza 1f2309c4d2 Remove Win32API calls & upgrade to modern Ruby (#96)
* Win32API removal + Ruby 3 updates
* Update binaries to match mkxp-z 2.1
2021-02-25 22:09:59 +00:00

55 lines
1.4 KiB
Ruby

# To use the console, use the executable explicitly built
# with the console enabled on Windows. On Linux and macOS,
# just launch the executable directly from a terminal.
module Console
def self.setup_console
return unless $DEBUG
echo "#{System.game_title} Output Window\n"
echo "-------------------------------\n"
echo "If you are seeing this window, you are running\n"
echo "#{System.game_title} in Debug Mode. This means\n"
echo "that you're either playing a Debug Version, or\n"
echo "you are playing from within RPG Maker XP.\n"
echo "\n"
echo "Closing this window will close the game. If \n"
echo "you want to get rid of this window, run the\n"
echo "program from the Shell, or download a Release\n"
echo "version.\n"
echo "\n"
echo "Gameplay will be paused while the console has\n"
echo "focus. To resume playing, switch to the Game\n"
echo "Window.\n"
echo "-------------------------------\n"
echo "Debug Output:\n"
echo "-------------------------------\n\n"
end
def self.readInput
return gets.strip
end
def self.readInput2
return self.readInput
end
def self.get_input
echo self.readInput2
end
end
module Kernel
def echo(string)
unless $DEBUG
return
end
printf(string.is_a?(String) ? string : string.inspect)
end
def echoln(string)
echo(string)
echo("\r\n")
end
end