Advertisement
TheoAllen

Removed Weapon in Equip Scene

Aug 3rd, 2015
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.90 KB | None | 0 0
  1. #==============================================================================
  2. # ** Window_EquipSlot
  3. #------------------------------------------------------------------------------
  4. #  This window displays items the actor is currently equipped with on the
  5. # equipment screen.
  6. #==============================================================================
  7.  
  8. class Window_EquipSlot < Window_Selectable
  9.   #--------------------------------------------------------------------------
  10.   # * Get Number of Items
  11.   #--------------------------------------------------------------------------
  12.   def item_max
  13.     @actor ? @actor.equip_slots.size - 1 : 0
  14.   end
  15.   #--------------------------------------------------------------------------
  16.   # * Get Item
  17.   #--------------------------------------------------------------------------
  18.   def item
  19.     @actor ? @actor.equips[index + 1] : nil
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # * Draw Item
  23.   #--------------------------------------------------------------------------
  24.   def draw_item(index)
  25.     return unless @actor
  26.     rect = item_rect_for_text(index)
  27.     change_color(system_color, enable?(index))
  28.     draw_text(rect.x, rect.y, 92, line_height, slot_name(index))
  29.     draw_item_name(@actor.equips[index+1], rect.x + 92, rect.y, enable?(index))
  30.   end
  31.   #--------------------------------------------------------------------------
  32.   # * Get Equipment Slot Name
  33.   #--------------------------------------------------------------------------
  34.   def slot_name(index)
  35.     @actor ? Vocab::etype(@actor.equip_slots[index + 1]) : ""
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # * Display Equipment Slot in Enabled State?
  39.   #--------------------------------------------------------------------------
  40.   def enable?(index)
  41.     @actor ? @actor.equip_change_ok?(index + 1) : false
  42.   end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement