Fixes forged agent id cards breaking wallets (#63069)

Forged agent ids no longer prevent access from being combines from cards in a wallet
This commit is contained in:
HarseTheef
2021-12-03 15:33:00 +01:00
committed by GitHub
parent 81b292e52f
commit a0fdf2bceb
+9 -6
View File
@@ -56,16 +56,19 @@
front_id = null
var/winning_tally = 0
var/is_magnetic_found = FALSE
for(var/obj/item/card/id/id_card in contents)
// Certain IDs can forcibly jump to the front so they can disguise other cards in wallets. Chameleon/Agent ID cards are an example of this.
if(HAS_TRAIT(id_card, TRAIT_MAGNETIC_ID_CARD))
if(!is_magnetic_found && HAS_TRAIT(id_card, TRAIT_MAGNETIC_ID_CARD))
front_id = id_card
break
is_magnetic_found = TRUE
if(!is_magnetic_found)
var/card_tally = SSid_access.tally_access(id_card, ACCESS_FLAG_COMMAND)
if(card_tally > winning_tally)
winning_tally = card_tally
front_id = id_card
var/card_tally = SSid_access.tally_access(id_card, ACCESS_FLAG_COMMAND)
if(card_tally > winning_tally)
winning_tally = card_tally
front_id = id_card
LAZYINITLIST(combined_access)
combined_access |= id_card.access