Advertisement
dsiver144

DSI Battle Equip

Mar 14th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. #===============================================================================
  2. # * DSI Battle Equip
  3. # by dsiver144
  4. #===============================================================================
  5. class Scene_Battle
  6. #--------------------------------------------------------------------------
  7. # * Create Actor Commands Window
  8. #--------------------------------------------------------------------------
  9. alias_method(:dsiver_create_actor_command_window_equip, :create_actor_command_window)
  10. def create_actor_command_window
  11. dsiver_create_actor_command_window_equip
  12. @actor_command_window.set_handler(:equip, method(:command_equip))
  13. end
  14. #--------------------------------------------------------------------------
  15. # * new method: command_equip
  16. #--------------------------------------------------------------------------
  17. def command_equip
  18. SceneManager.call(Scene_Equip)
  19. SceneManager.scene.prepare(@actor_command_window.actor)
  20. SceneManager.scene.main
  21. SceneManager.force_recall(self)
  22. SceneManager.scene.perform_transition
  23. @actor_command_window.activate
  24. end
  25. end # Scene_Battle
  26.  
  27. class Scene_Equip < Scene_MenuBase
  28. #--------------------------------------------------------------------------
  29. # * new method: prepare
  30. #--------------------------------------------------------------------------
  31. def prepare(actor)
  32. @battle_actor = actor
  33. end
  34. #--------------------------------------------------------------------------
  35. # * Start Processing
  36. #--------------------------------------------------------------------------
  37. def start
  38. super
  39. create_background
  40. if @battle_actor
  41. @actor = @battle_actor
  42. else
  43. @actor = $game_party.menu_actor
  44. end
  45. create_help_window
  46. create_status_window
  47. create_command_window
  48. create_slot_window
  49. create_item_window
  50. end
  51. end # Scene_Equip
  52.  
  53. class Window_ActorCommand < Window_Command
  54. attr_accessor :actor
  55. #--------------------------------------------------------------------------
  56. # * Create Command List
  57. #--------------------------------------------------------------------------
  58. alias_method(:dsiver_make_command_list_equip, :make_command_list)
  59. def make_command_list
  60. dsiver_make_command_list_equip # Call alias method
  61. add_equip_command
  62. end
  63. #--------------------------------------------------------------------------
  64. # * Add Attack Command to List
  65. #--------------------------------------------------------------------------
  66. def add_equip_command
  67. add_command("Equip", :equip)
  68. end
  69. end # Window_ActorCommand
  70.  
  71. module SceneManager
  72. #--------------------------------------------------------------------------
  73. # * new method: force_recall
  74. #--------------------------------------------------------------------------
  75. def self.force_recall(scene_class)
  76. @scene = scene_class
  77. end
  78. end # SceneManager
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement