Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def make_item_list(sort)
- # // Method to make item list.
- @data = $game_party.all_items.select { |item| include?(item) }
- case sort
- when :price_high then @data.sort_by!(&:price).reverse!
- when :price_low then @data.sort_by!(&:price)
- when :a_z then @data.sort_by! { |a| a.name.downcase }
- when :z_a then @data.sort_by! { |a| a.name.downcase }.reverse!
- end
- @data.push(nil) if include?(nil)
- end
Advertisement
Add Comment
Please, Sign In to add comment