Advertisement
Archeia

Command Change Test

Dec 26th, 2014
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.75 KB | None | 0 0
  1. #==============================================================================
  2. # ** Window_MenuCommand
  3. #------------------------------------------------------------------------------
  4. #  This command window appears on the menu screen.
  5. #==============================================================================
  6.  
  7. class Window_MenuCommand < Window_Command
  8.   #--------------------------------------------------------------------------
  9.   # * For Adding Original Commands
  10.   #--------------------------------------------------------------------------
  11.   def add_original_commands
  12.     @list.insert(0, {:name => "Tack", :symbol => :tack, :enabled => true, :ext =>  nil})
  13.     @list.insert(1, {:name => "Supplies", :symbol => :item, :enabled => true, :ext =>  nil})
  14.   end
  15. end
  16.  
  17. #==============================================================================
  18. # ** Scene_Menu
  19. #------------------------------------------------------------------------------
  20. #  This class performs the menu screen processing.
  21. #==============================================================================
  22.  
  23. class Scene_Menu < Scene_MenuBase
  24.   #--------------------------------------------------------------------------
  25.   # * Alias Listing
  26.   #--------------------------------------------------------------------------    
  27.   alias archeia_scene_menu_command                      create_command_window
  28.   #--------------------------------------------------------------------------
  29.   # * Create Command Window
  30.   #--------------------------------------------------------------------------
  31.   def create_command_window
  32.     # Run Original Method
  33.     archeia_scene_menu_command
  34.     # Add Custom Handler
  35.     @command_window.set_handler(:tack, lambda { SceneManager.goto(Scene_Map) })    
  36.   end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement