there is a proc called GetID() in /obj/item. It will return the main ID of an item. PDAs will return the ID inside it and wallets will return the facing id inside it.

Please change this so it uses GetID() instead of manually checking everything; this is bad coding and leads to problems when we have to go back and fix things, as we'll have to do it more than once and it can cause more problems if we forget a single area.