Fixes 2 Bugs with PR #5416

First bug: Changing your alt head in CMA wouldn't update it correctly.
You had to proc update_body(1, 1) twice in order to do it because of
where the head_organ.handle_alt_icon() proc call was placed in
organ_icons. Resolved

Second bug: Lack of sanity and inability to select head marking styles
with "all" alt heads allowed. Resolved
This commit is contained in:
KasparoVy
2016-10-23 23:14:53 -04:00
parent 67ce840e65
commit b8c6e5c6e5
2 changed files with 5 additions and 5 deletions
@@ -80,13 +80,13 @@
if(head_organ.alt_head && head_organ.alt_head != "None")
var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style]
if(marking.name != "None" && (!H.heads_allowed || !(head_organ.alt_head in H.heads_allowed)))
if(marking.name != "None" && (!H.heads_allowed || (!("All" in H.heads_allowed) && !(head_organ.alt_head in H.heads_allowed))))
return
else
if(!head_organ.alt_head || head_organ.alt_head == "None")
head_organ.alt_head = "None"
var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style]
if(H.heads_allowed )
if(H.heads_allowed && !("All" in H.heads_allowed))
return
if(location == "tail" && marking.name != "None")
@@ -450,7 +450,7 @@
if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head.
continue
else if(H.alt_head && H.alt_head != "None") //If the user's got an alt head, validate markings for that head.
if(!("All" in M.heads_allowed) && !(H.alt_head in M.heads_allowed))
if(!M.heads_allowed || (!("All" in M.heads_allowed) && !(H.alt_head in M.heads_allowed)))
continue
else
if(M.heads_allowed && !("All" in M.heads_allowed))
+2 -2
View File
@@ -159,12 +159,12 @@ var/global/list/limb_icon_cache = list()
gender = "f"
else
gender = "m"
new_icon_state = "[icon_name][gender ? "_[gender]" : ""]"
if(limb_name == "head")
var/obj/item/organ/external/head/head_organ = src
head_organ.handle_alt_icon()
new_icon_state = "[icon_name][gender ? "_[gender]" : ""]"
if(skeletal)
icon_file = 'icons/mob/human_races/r_skeleton.dmi'
else if(status & ORGAN_ROBOT)