Advertisement
Fomar0153

Fomar0153 - No Unequipping Weapons 1.0

Jul 20th, 2012
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.09 KB | None | 0 0
  1. =begin
  2. No Unequipping Weapons Script
  3. by Fomar0153
  4. Version 1.0
  5. ----------------------
  6. Notes
  7. ----------------------
  8. No requirements
  9. Prevents players from unequipping their weapons.
  10. ----------------------
  11. Instructions
  12. ----------------------
  13. Plug and play
  14. ----------------------
  15. Known bugs
  16. ----------------------
  17. None
  18. =end
  19. class Window_EquipItem < Window_ItemList
  20.   #--------------------------------------------------------------------------
  21.   # * Include in Item List?
  22.   #--------------------------------------------------------------------------
  23.   alias weapons_include? include?
  24.   def include?(item)
  25.     return false if item == nil && @slot_id == 0
  26.     return weapons_include?(item)
  27.   end
  28. end
  29.  
  30. class Scene_Equip < Scene_MenuBase
  31.   #--------------------------------------------------------------------------
  32.   # * Slot [OK]
  33.   #--------------------------------------------------------------------------
  34.   alias weapons_on_slot_ok on_slot_ok
  35.   def on_slot_ok
  36.     if @item_window.item_max == 0
  37.       @slot_window.activate
  38.       return
  39.     end
  40.     weapons_on_slot_ok
  41.   end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement