Advertisement
neutale

Simplified Equip

Jun 13th, 2019
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.90 KB | None | 0 0
  1. #==============================================================================
  2. # ■ Simplified Equip
  3. #   @version 0.1 11/12/18
  4. #   @author sabakan
  5. #   @license: MIT License
  6. #------------------------------------------------------------------------------
  7. #  Removes equipment command window on equip
  8. #==============================================================================
  9. class Scene_Equip < Scene_MenuBase
  10.   #--------------------------------------------------------------------------
  11.   # ● Create command window
  12.   #--------------------------------------------------------------------------
  13.   def create_command_window
  14.     wy = @help_window.height
  15.     @command_window = Window_Base.new(0, wy, 0, 0)
  16.     @command_window.visible = false
  17.   end
  18.   #--------------------------------------------------------------------------
  19.   # ● Create slot window
  20.   #--------------------------------------------------------------------------
  21.   alias saba_nooptimize_create_slot_window create_slot_window
  22.   def create_slot_window
  23.     saba_nooptimize_create_slot_window
  24.     @slot_window.set_handler(:cancel,   method(:return_scene))
  25.     @slot_window.set_handler(:pagedown, method(:next_actor))
  26.     @slot_window.set_handler(:pageup,   method(:prev_actor))
  27.     @slot_window.select(0)
  28.     @slot_window.activate
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● Actor change
  32.   #--------------------------------------------------------------------------
  33.   alias saba_nooptimize_on_actor_change on_actor_change
  34.   def on_actor_change
  35.     saba_nooptimize_on_actor_change
  36.     @slot_window.activate
  37.   end
  38. end
  39.  
  40. class Window_EquipSlot
  41.   #--------------------------------------------------------------------------
  42.   # ● Visible lines number displayed
  43.   #--------------------------------------------------------------------------
  44.   def visible_line_number
  45.     return 7
  46.   end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement