Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** Window_EquipSlot
- #------------------------------------------------------------------------------
- # This window displays items the actor is currently equipped with on the
- # equipment screen.
- #==============================================================================
- class Window_EquipSlot < Window_Selectable
- #--------------------------------------------------------------------------
- # * Get Number of Items
- #--------------------------------------------------------------------------
- def item_max
- @actor ? @actor.equip_slots.size - 1 : 0
- end
- #--------------------------------------------------------------------------
- # * Get Item
- #--------------------------------------------------------------------------
- def item
- @actor ? @actor.equips[index + 1] : nil
- end
- #--------------------------------------------------------------------------
- # * Draw Item
- #--------------------------------------------------------------------------
- def draw_item(index)
- return unless @actor
- rect = item_rect_for_text(index)
- change_color(system_color, enable?(index))
- draw_text(rect.x, rect.y, 92, line_height, slot_name(index))
- draw_item_name(@actor.equips[index+1], rect.x + 92, rect.y, enable?(index))
- end
- #--------------------------------------------------------------------------
- # * Get Equipment Slot Name
- #--------------------------------------------------------------------------
- def slot_name(index)
- @actor ? Vocab::etype(@actor.equip_slots[index + 1]) : ""
- end
- #--------------------------------------------------------------------------
- # * Display Equipment Slot in Enabled State?
- #--------------------------------------------------------------------------
- def enable?(index)
- @actor ? @actor.equip_change_ok?(index + 1) : false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement