mcgluszak

[Author: Aleworks] AIM Add On v1.00

Jul 31st, 2011
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.22 KB | None | 0 0
  1. #=============================================================================
  2. # *** Aleworks Input Module Add On 1(AIM Add On 1)
  3. #=============================================================================
  4. # Created by Aleworks
  5. # Version: 1.00
  6. # Last Update: 29/03/2007 (day/month/year)
  7. #=============================================================================
  8. #==== Description ====
  9. # This add on, is for making AIM, to save/load the combos data when the game
  10. # is saved by the default save script.
  11. #=============================================================================
  12. #==== Requeriments ====
  13. # * Aleworks Input Module
  14. #   - Version: 2.00
  15. #=============================================================================
  16. #==== Classes & Methods ====
  17. # ** Class Scene_Save
  18. #   * Alias Method:
  19. #     - write_save_data; Alias Name: aleworks_aim_sceneload_writesavedata
  20. # ** Class Scene_Load
  21. #   * Alias Method:
  22. #     - read_save_data; Alias Name: aleworks_aim_scenesave_readsavedata
  23. #=============================================================================
  24.  
  25. #==============================================================================
  26. # ** Scene_Save
  27. #==============================================================================
  28. class Scene_Save < Scene_File
  29.   #--------------------------------------------------------------------------
  30.   # * Write Data
  31.   #--------------------------------------------------------------------------
  32.   alias_method(:aleworks_aim_sceneload_writesavedata, :write_save_data)
  33.   def write_save_data(file)
  34.     aleworks_aim_sceneload_writesavedata(file)
  35.     Marshal.dump(Input.combos, file)
  36.   end
  37. end
  38.  
  39. #==============================================================================
  40. # ** Scene_Load
  41. #==============================================================================
  42. class Scene_Load < Scene_File
  43.   #--------------------------------------------------------------------------
  44.   # * Read Data
  45.   #--------------------------------------------------------------------------
  46.  
  47.   alias_method(:aleworks_aim_scenesave_readsavedata, :read_save_data)
  48.   def read_save_data(file)
  49.     aleworks_aim_scenesave_readsavedata(file)
  50.     Input.combos = Marshal.load(file)
  51.   end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment