diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index ceec2c0a704..4797f45b007 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -46,9 +46,6 @@ build_from_parts = TRUE var/obj/item/card/id/front_id = null - var/flipped = null - var/flippable = 1 - var/wear_over_suit = 0 /obj/item/storage/wallet/Initialize() . = ..() @@ -96,7 +93,6 @@ else icon_state = "[initial(icon_state)]" . = ..() - mob_icon_update() /obj/item/storage/wallet/GetID() return front_id @@ -127,42 +123,6 @@ if(istype(id) && is_adjacent) id.show(user) -/obj/item/storage/wallet/proc/mob_icon_update() - if (ismob(src.loc)) - var/mob/M = src.loc - M.update_inv_wear_id() - -/obj/item/storage/wallet/verb/flip_side() - set name = "Flip wallet side" - set category = "Object" - set src in usr - if(use_check_and_message(usr, use_flags = USE_DISALLOW_SILICONS)) - return - if (!flippable) - to_chat(usr, "You cannot flip \the [src] as it is not a flippable item.") - return - - src.flipped = !src.flipped - if(src.flipped) - src.overlay_state = "[overlay_state]_flip" - else - src.overlay_state = initial(overlay_state) - to_chat(usr, "You change \the [src] to be on your [src.flipped ? "left" : "right"] side.") - mob_icon_update() - -/obj/item/storage/wallet/verb/toggle_icon_layer() - set name = "Switch Wallet Layer" - set category = "Object" - set src in usr - - if(use_check_and_message(usr, use_flags = USE_DISALLOW_SILICONS)) - return - if(wear_over_suit == -1) - to_chat(usr, SPAN_NOTICE("\The [src] cannot be worn above your suit!")) - return - wear_over_suit = !wear_over_suit - mob_icon_update() - /obj/item/storage/wallet/colourable icon_state = "wallet" @@ -190,14 +150,13 @@ /obj/item/paper_bundle, /obj/item/pen, /obj/item/photo) - flippable = 0 //until a cleaner way is implemented to just simply have the verb not show up at all - var/plastic_film_overlay_state = "plasticfilm" - var/front_id_overlay_state - drop_sound = 'sound/items/drop/cloth.ogg' pickup_sound = 'sound/items/pickup/cloth.ogg' + var/front_id_overlay_state var/image/plastic_film + var/plastic_film_overlay_state = "plasticfilm" + var/wear_over_suit = 0 /obj/item/storage/wallet/lanyard/update_icon() if(front_id) @@ -206,6 +165,7 @@ if(("[initial(icon_state)]-film") in icon_states(icon)) var/image/film_image = overlay_image(icon, "[initial(icon_state)]-film", flags = RESET_COLOR) AddOverlays(film_image) + mob_icon_update() /obj/item/storage/wallet/lanyard/get_mob_overlay(mob/living/carbon/human/H, mob_icon, mob_state, slot) var/image/I = ..() @@ -217,6 +177,24 @@ I.AddOverlays(plastic_film) return I +/obj/item/storage/wallet/lanyard/proc/mob_icon_update() + if(ismob(src.loc)) + var/mob/M = src.loc + M.update_inv_wear_id() + +/obj/item/storage/wallet/lanyard/verb/toggle_icon_layer() + set name = "Switch Lanyard Layer" + set category = "Object" + set src in usr + + if(use_check_and_message(usr, use_flags = USE_DISALLOW_SILICONS)) + return + if(wear_over_suit == -1) + to_chat(usr, SPAN_NOTICE("\The [src] cannot be worn above your suit!")) + return + wear_over_suit = !wear_over_suit + mob_icon_update() + // wallet subtypes /obj/item/storage/wallet/random/fill() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 82d6e9794d8..e328c6ea64f 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -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 diff --git a/html/changelogs/SleepyGemmy-wallet_mob_sprite.yml b/html/changelogs/SleepyGemmy-wallet_mob_sprite.yml new file mode 100644 index 00000000000..f602846dc83 --- /dev/null +++ b/html/changelogs/SleepyGemmy-wallet_mob_sprite.yml @@ -0,0 +1,7 @@ +author: SleepyGemmy + +delete-after: True + +changes: + - bugfix: "Fixed wallets having a mob overlay." + - bugfix: "Fixed lanyards having a duplicate overlay." diff --git a/icons/mob/card.dmi b/icons/mob/card.dmi index 4aa655b65a3..f6d458cdf2b 100644 Binary files a/icons/mob/card.dmi and b/icons/mob/card.dmi differ