Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Just a snippet for changing the order of the equip slots in the equipment menu.
- Made by: Sixth
- Put this below the default scripts, as high as possible relative to your other
- custom scripts!
- =end
- module EqSlotDisp
- # Set the equip slot display order here.
- Order = [0,2,3,1,4]
- end
- class Window_EquipSlot < Window_Selectable
- def rindex(index=@index)
- return EqSlotDisp::Order[index]
- end
- def update
- super
- @item_window.slot_id = rindex(index) if @item_window
- end
- def item
- @actor ? @actor.equips[rindex(index)] : nil
- end
- 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[rindex(index)], rect.x + 92, rect.y, enable?(index))
- end
- def slot_name(index)
- @actor ? Vocab::etype(@actor.equip_slots[rindex(index)]) : ""
- end
- def enable?(index)
- @actor ? @actor.equip_change_ok?(rindex(index)) : false
- end
- end
- class Scene_Equip < Scene_MenuBase
- def on_item_ok
- Sound.play_equip
- @actor.change_equip(@slot_window.rindex, @item_window.item)
- @slot_window.activate
- @slot_window.refresh
- @item_window.unselect
- @item_window.refresh
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement