Advertisement
Guest User

[RGSS3] F12 Hard Reset fix

a guest
Jan 5th, 2012
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.58 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.       # Adds the working path to the command
  8.       command = Dir.pwd+'/'+command
  9.       # Command with test argument for test play reset
  10.       if !$TEST
  11.         spawn command, 'test'
  12.       else
  13.         spawn command
  14.       end
  15.       # Exits this thread
  16.       exit
  17.     end
  18.     $run_once_f12 = true
  19.     # Run default rgss_main
  20.     block.call
  21.   end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement