From 706cd73bbf2e74485765bc31b1904974fee2be33 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 26 May 2023 11:16:01 +0100 Subject: [PATCH] [MIRROR] Fixes glove offsets not working with negative numbers [MDB IGNORE] (#21434) * Fixes glove offsets not working with negative numbers (#75638) ## About The Pull Request This was changed in the Golem rework - https://github.com/tgstation/tgstation/pull/74197 If you have a species that have arms that go longer than normal, you can set the offsets of in-hands to negative y value to lower it. This isn't an option for gloves however, because it starts at 0 and only increases if the value is larger. This fixes it by letting it set a negative number, and comparing your other hands' offsets to that. ## Why It's Good For The Game Fixes species that have arms that go longer than normal. ## Changelog :cl: fix: Species that have longer arms than normal can now properly set their glove offset to go low and meet their hand. /:cl: * Fixes glove offsets not working with negative numbers --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_update_icons.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index 53ab0c34542..a619e7115e4 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -213,7 +213,7 @@ There are several things that need to be remembered: var/feature_y_offset = 0 for (var/obj/item/bodypart/arm/my_hand as anything in hand_bodyparts) var/list/glove_offset = my_hand.worn_glove_offset?.get_offset() - if (glove_offset && glove_offset["y"] > feature_y_offset) + if (glove_offset && (!feature_y_offset || glove_offset["y"] > feature_y_offset)) feature_y_offset = glove_offset["y"] gloves_overlay.pixel_y += feature_y_offset