Checking Number of an item Equipped in Shop Scene

Hey all! This question probably has a really simple answer that I just overlooked, but I am working on my Shop scene right now, and I would like to also list how many of a particular weapon/armor are equipped to an actor. The "Possession" field only seems to list items in inventory, not those equipped on actors. This is fine but I'd like to display the number equipped on a second line as well.

Basically I'm planning to make a second line under "Possession" that will read "Equipped", and will list the number of an item currently equipped on any actors. For example, if you have 3 Swords in your inventory, and two equipped on Actors, the Possession field would read 3, and the Equipped field would read 2.  I'm not sure how to go about getting the total number equipped across all actors though. Drawing the text to the shop scene isn't a problem, I just don't know how to get the information itself. Any help would be appreciated. Thanks!
For what it's worth I figured this one out myself for once. If anyone else needs/wants to do this, it's very simple. Just put in the following snippet.

class Window_ShopStatus < Window_Base alias refresh_ry refreshdef refresh  refresh_ry  draw_equipped(4, 0)end def draw_equipped(x, y) rect = Rect.new(x, y, contents.width - 4 - x, line_height * 3) change_color(system_color) draw_text(rect, "Equipped") change_color(normal_color) get_equipped draw_text(rect, @equipped, 2) change_color(normal_color) end def get_equipped @equipped = 0 $game_party.members.each { |party_member| result = party_member.equips.include?(@item) @equipped += 1 if result == true @equipped += 0 if result == false } endend
shopfinal.png


Note that my shop scene doesn't use the default shopstatus for anything but Possession/Equipped, so you might want to move things around if you are using the default one.

Original thread: https://forums.rpgmakerweb.com/threads/checking-number-of-an-item-equipped-in-shop-scene.26192/