From 164bc8c17cfeb643eec8e2c4fd094a12f30266ab Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 11 Feb 2022 11:32:09 +0100 Subject: [PATCH] [MIRROR] Removes a pointless initial() call from chameleon changing [MDB IGNORE] (#11452) * Removes a pointless initial() call from chameleon changing (#64771) Calling initial() on a local var or proc arg just returns the current value. I added a compiler warning for this in OpenDream, which caught this. * Removes a pointless initial() call from chameleon changing Co-authored-by: ike709 --- code/modules/clothing/chameleon.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index e4d074b899d..316d01015fc 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -231,7 +231,7 @@ item_target.righthand_file = SSgreyscale.GetColoredIconByType(initial(picked_item.greyscale_config_inhand_right), initial(picked_item.greyscale_colors)) item_target.worn_icon_state = initial(picked_item.worn_icon_state) item_target.inhand_icon_state = initial(picked_item.inhand_icon_state) - if(istype(item_target, /obj/item/clothing) && istype(initial(picked_item), /obj/item/clothing)) + if(istype(item_target, /obj/item/clothing) && ispath(picked_item, /obj/item/clothing)) var/obj/item/clothing/clothing_target = item_target var/obj/item/clothing/picked_clothing = picked_item clothing_target.flags_cover = initial(picked_clothing.flags_cover)