Fixes Inhand Sprite Sheeting Bug

Caused by #11978, the bug presented where a species that was in the sprite_sheets of an item but didn't have a custom inhand item for it picked up an item like a uniform and suddenly a grey jumpsuit was rendered on them. Happened for Vox when picking up regular uniforms because they have species-specific uniform sprites but not species-specific inhands, so it triggered the conditional and caused silly issues.
This commit is contained in:
KasparoVy
2019-08-25 22:29:16 -04:00
parent ca495b2b9b
commit 285df0d994
3 changed files with 6 additions and 5 deletions
@@ -1020,9 +1020,9 @@ var/global/list/damage_icon_parts = list()
t_state = r_hand.icon_state
var/mutable_appearance/standing
if(r_hand.sprite_sheets && r_hand.sprite_sheets[dna.species.name])
if(r_hand.sprite_sheets_inhand && r_hand.sprite_sheets_inhand[dna.species.name])
t_state = "[t_state]_r"
standing = mutable_appearance(r_hand.sprite_sheets[dna.species.name], "[t_state]", layer = -R_HAND_LAYER)
standing = mutable_appearance(r_hand.sprite_sheets_inhand[dna.species.name], "[t_state]", layer = -R_HAND_LAYER)
else
standing = mutable_appearance(r_hand.righthand_file, "[t_state]", layer = -R_HAND_LAYER)
standing = center_image(standing, r_hand.inhand_x_dimension, r_hand.inhand_y_dimension)
@@ -1039,9 +1039,9 @@ var/global/list/damage_icon_parts = list()
t_state = l_hand.icon_state
var/mutable_appearance/standing
if(l_hand.sprite_sheets && l_hand.sprite_sheets[dna.species.name])
if(l_hand.sprite_sheets_inhand && l_hand.sprite_sheets_inhand[dna.species.name])
t_state = "[t_state]_l"
standing = mutable_appearance(l_hand.sprite_sheets[dna.species.name], "[t_state]", layer = -L_HAND_LAYER)
standing = mutable_appearance(l_hand.sprite_sheets_inhand[dna.species.name], "[t_state]", layer = -L_HAND_LAYER)
else
standing = mutable_appearance(l_hand.lefthand_file, "[t_state]", layer = -L_HAND_LAYER)
standing = center_image(standing, l_hand.inhand_x_dimension, l_hand.inhand_y_dimension)