Advertisement
Dekita

F12 Off

Nov 2nd, 2014
1,958
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. if true # make false to disable script, true to enable.
  2. #===============================================================================
  3. # www.dekyde.com
  4. # www.dekitarpg.wordpress.com
  5. #===============================================================================
  6. # This small snippet simply tells the system to ignore the RGSSReset call when
  7. # triggered.
  8. # Unfortunately, this cannot be completely removed so instead the system will
  9. # just stop whilst the F12 key is being pressed.
  10. #
  11. # v1.1+ keeps the scene updating whilst F12 is being pressed.
  12. #
  13. #===============================================================================
  14. # Updates:
  15. # o3/11/2o14 - Stopped scene(s) from freezing when F12 is pressed. (v1.1)
  16. # o2/11/2o14 - Started, Finished,
  17. #
  18. #===============================================================================
  19. # Free to use in all commercial and non commercial projects.
  20. #===============================================================================
  21. class Scene_Base
  22. #===============================================================================
  23. #-----------------------------------------------------------------------------
  24. #
  25. #-----------------------------------------------------------------------------
  26. alias :fuckofff12youcunt_updt! :update
  27. #-----------------------------------------------------------------------------
  28. #
  29. #-----------------------------------------------------------------------------
  30. FRAME_SKIP_F12 = 21
  31. #-----------------------------------------------------------------------------
  32. #
  33. #-----------------------------------------------------------------------------
  34. def update
  35. begin
  36. fuckofff12youcunt_updt!
  37. rescue RGSSReset
  38. update_rgss_shit
  39. end
  40. end
  41. #-----------------------------------------------------------------------------
  42. #
  43. #-----------------------------------------------------------------------------
  44. def update_rgss_shit
  45. @rgss_shit_updater ||= 0
  46. @rgss_shit_updater += 1
  47. return unless @rgss_shit_updater % FRAME_SKIP_F12 == 0
  48. instance_variables.each do |varname|
  49. ivar = instance_variable_get(varname)
  50. if ivar.respond_to?(:update)
  51. ivar.update
  52. end
  53. end
  54. end
  55. #-----------------------------------------------------------------------------
  56. # [ end class ]
  57. #-----------------------------------------------------------------------------
  58. end
  59. #===============================================================================
  60. # www.dekyde.com
  61. # www.dekitarpg.wordpress.com
  62. #===============================================================================
  63. end # end if false/ true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement