mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user