[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 <ike709@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-02-11 11:32:09 +01:00
committed by GitHub
parent db47120af7
commit 164bc8c17c

View File

@@ -231,7 +231,7 @@
item_target.righthand_file = SSgreyscale.GetColoredIconByType(initial(picked_item.greyscale_config_inhand_right), initial(picked_item.greyscale_colors)) 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.worn_icon_state = initial(picked_item.worn_icon_state)
item_target.inhand_icon_state = initial(picked_item.inhand_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/clothing_target = item_target
var/obj/item/clothing/picked_clothing = picked_item var/obj/item/clothing/picked_clothing = picked_item
clothing_target.flags_cover = initial(picked_clothing.flags_cover) clothing_target.flags_cover = initial(picked_clothing.flags_cover)