Wallet and Lanyard Fixes (#20929)

this PR fixes wallets and lanyards having a stray mob overlay and cleans
up the code a bit.

tested and made sure that ID cards still appear when worn by themselves
and that lanyards still appear with or without an ID card inside.

fixes #18678. fixes #20926.
This commit is contained in:
SleepyGemmy
2025-07-03 10:52:20 +00:00
committed by GitHub
parent bf37fd170c
commit 727c37fa82
4 changed files with 32 additions and 47 deletions
@@ -680,9 +680,9 @@ There are several things that need to be remembered:
//Layering under/over suit
var/id_layer = ID_LAYER
if(istype(wear_id, /obj/item/storage/wallet))
var/obj/item/storage/wallet/wallet = wear_id
if(wallet.wear_over_suit)
if(istype(wear_id, /obj/item/storage/wallet/lanyard))
var/obj/item/storage/wallet/lanyard/lanyard = wear_id
if(lanyard.wear_over_suit)
id_layer = ID_LAYER_ALT
else if(istype(wear_id, /obj/item/card/id))
var/obj/item/card/id/id_card = wear_id