From 17a307c0448217a402488dbaae21c25262e9c9d4 Mon Sep 17 00:00:00 2001 From: FloFluoro <3611705+FloFluoro@users.noreply.github.com> Date: Thu, 3 Nov 2022 10:42:35 -0400 Subject: [PATCH] Fixes overlays on cmagged plant disks (#19539) * Fixes overlays on cmagged plant disks * Oops, this wasn't needed * Early returns * Returns --- code/modules/hydroponics/gene_modder.dm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index a2a55529426..b32cd0f7cdd 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -465,7 +465,7 @@ /obj/item/disk/plantgene/New() ..() - overlays += "datadisk_gene" + update_icon(UPDATE_OVERLAYS) pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) @@ -492,15 +492,24 @@ . = ..() if(HAS_TRAIT(src, TRAIT_CMAGGED)) desc = "Better keep this safe." - else - desc = "A disk for storing plant genetic data." + return + + desc = "A disk for storing plant genetic data." /obj/item/disk/plantgene/update_icon_state() . = ..() if(HAS_TRAIT(src, TRAIT_CMAGGED)) icon_state = "nucleardisk" - else - icon_state = "datadisk_hydro" + return + + icon_state = "datadisk_hydro" + +/obj/item/disk/plantgene/update_overlays() + . = ..() + if(HAS_TRAIT(src, TRAIT_CMAGGED)) + return + + . += "datadisk_gene" /obj/item/disk/plantgene/attack_self(mob/user) if(HAS_TRAIT(src, TRAIT_CMAGGED)) @@ -513,6 +522,7 @@ to_chat(user, "The bananium ooze flips a couple bits on the plant disk's display, making it look just like the..!") ADD_TRAIT(src, TRAIT_CMAGGED, "clown_emag") update_appearance(UPDATE_NAME|UPDATE_DESC|UPDATE_ICON) + playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) /obj/item/disk/plantgene/uncmag() update_appearance(UPDATE_NAME|UPDATE_DESC|UPDATE_ICON)