Guest User

Untitled

a guest
May 16th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.57 KB | None | 0 0
  1. alias f12_hard_reset_rgss_main rgss_main
  2. def rgss_main(*args, &block)
  3.   f12_hard_reset_rgss_main(*args) do
  4.     if $run_once_f12
  5.       # Name of the game executable (game.exe, game.ini, game.rgssad)
  6.       command = 'Game'
  7.       # Add command line argument so the debug capabilities are kept in Test play
  8.       command += '.exe test'  if $TEST
  9.       # Opens the game executable in a new thread
  10.       Thread.new{system command}
  11.       sleep(0.1)
  12.       # Exits this thread
  13.       exit
  14.     end
  15.     $run_once_f12 = true
  16.     # Run default rgss_main
  17.     block.call
  18.   end
  19. end
Add Comment
Please, Sign In to add comment