Merge pull request #4331 from KasparoVy/voxhair

Refactors Hair so it's on the Head + Adds a Vox Hairstyle + Fixes/Refactors Morph + Features to Morph and CMA...
This commit is contained in:
Fox McCloud
2016-05-13 15:36:34 -04:00
37 changed files with 704 additions and 326 deletions
+19 -18
View File
@@ -133,19 +133,20 @@ var/global/list/bad_blocks[0]
ResetUI(1)
// Hair
// FIXME: Species-specific defaults pls
if(!character.h_style)
character.h_style = "Skinhead"
var/hair = hair_styles_list.Find(character.h_style)
var/obj/item/organ/external/head/H = character.get_organ("head")
if(!H.h_style)
H.h_style = "Skinhead"
var/hair = hair_styles_list.Find(H.h_style)
// Facial Hair
if(!character.f_style)
character.f_style = "Shaved"
var/beard = facial_hair_styles_list.Find(character.f_style)
if(!H.f_style)
H.f_style = "Shaved"
var/beard = facial_hair_styles_list.Find(H.f_style)
// Head Accessory
if(!character.ha_style)
character.ha_style = "None"
var/headacc = head_accessory_styles_list.Find(character.ha_style)
if(!H.ha_style)
H.ha_style = "None"
var/headacc = head_accessory_styles_list.Find(H.ha_style)
/*// Body Accessory
if(!character.body_accessory)
@@ -157,13 +158,13 @@ var/global/list/bad_blocks[0]
character.m_style = "None"
var/marks = marking_styles_list.Find(character.m_style)
SetUIValueRange(DNA_UI_HAIR_R, character.r_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_G, character.g_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_B, character.b_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_R, H.r_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_G, H.g_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_B, H.b_hair, 255, 1)
SetUIValueRange(DNA_UI_BEARD_R, character.r_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_G, character.g_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_B, character.b_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_R, H.r_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_G, H.g_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_B, H.b_facial, 255, 1)
SetUIValueRange(DNA_UI_EYES_R, character.r_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_G, character.g_eyes, 255, 1)
@@ -173,9 +174,9 @@ var/global/list/bad_blocks[0]
SetUIValueRange(DNA_UI_SKIN_G, character.g_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_B, character.b_skin, 255, 1)
SetUIValueRange(DNA_UI_HACC_R, character.r_headacc, 255, 1)
SetUIValueRange(DNA_UI_HACC_G, character.g_headacc, 255, 1)
SetUIValueRange(DNA_UI_HACC_B, character.b_headacc, 255, 1)
SetUIValueRange(DNA_UI_HACC_R, H.r_headacc, 255, 1)
SetUIValueRange(DNA_UI_HACC_G, H.g_headacc, 255, 1)
SetUIValueRange(DNA_UI_HACC_B, H.b_headacc, 255, 1)
SetUIValueRange(DNA_UI_MARK_R, character.r_markings, 255, 1)
SetUIValueRange(DNA_UI_MARK_G, character.g_markings, 255, 1)
+13 -12
View File
@@ -131,13 +131,14 @@
src.dna.UpdateUI()
dna.check_integrity()
var/mob/living/carbon/human/H = src
H.r_hair = dna.GetUIValueRange(DNA_UI_HAIR_R, 255)
H.g_hair = dna.GetUIValueRange(DNA_UI_HAIR_G, 255)
H.b_hair = dna.GetUIValueRange(DNA_UI_HAIR_B, 255)
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
head_organ.r_hair = dna.GetUIValueRange(DNA_UI_HAIR_R, 255)
head_organ.g_hair = dna.GetUIValueRange(DNA_UI_HAIR_G, 255)
head_organ.b_hair = dna.GetUIValueRange(DNA_UI_HAIR_B, 255)
H.r_facial = dna.GetUIValueRange(DNA_UI_BEARD_R, 255)
H.g_facial = dna.GetUIValueRange(DNA_UI_BEARD_G, 255)
H.b_facial = dna.GetUIValueRange(DNA_UI_BEARD_B, 255)
head_organ.r_facial = dna.GetUIValueRange(DNA_UI_BEARD_R, 255)
head_organ.g_facial = dna.GetUIValueRange(DNA_UI_BEARD_G, 255)
head_organ.b_facial = dna.GetUIValueRange(DNA_UI_BEARD_B, 255)
H.r_skin = dna.GetUIValueRange(DNA_UI_SKIN_R, 255)
H.g_skin = dna.GetUIValueRange(DNA_UI_SKIN_G, 255)
@@ -147,9 +148,9 @@
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
H.r_headacc = dna.GetUIValueRange(DNA_UI_HACC_R, 255)
H.g_headacc = dna.GetUIValueRange(DNA_UI_HACC_G, 255)
H.b_headacc = dna.GetUIValueRange(DNA_UI_HACC_B, 255)
head_organ.r_headacc = dna.GetUIValueRange(DNA_UI_HACC_R, 255)
head_organ.g_headacc = dna.GetUIValueRange(DNA_UI_HACC_G, 255)
head_organ.b_headacc = dna.GetUIValueRange(DNA_UI_HACC_B, 255)
H.r_markings = dna.GetUIValueRange(DNA_UI_MARK_R, 255)
H.g_markings = dna.GetUIValueRange(DNA_UI_MARK_G, 255)
@@ -168,17 +169,17 @@
//Hair
var/hair = dna.GetUIValueRange(DNA_UI_HAIR_STYLE,hair_styles_list.len)
if((0 < hair) && (hair <= hair_styles_list.len))
H.h_style = hair_styles_list[hair]
head_organ.h_style = hair_styles_list[hair]
//Facial Hair
var/beard = dna.GetUIValueRange(DNA_UI_BEARD_STYLE,facial_hair_styles_list.len)
if((0 < beard) && (beard <= facial_hair_styles_list.len))
H.f_style = facial_hair_styles_list[beard]
head_organ.f_style = facial_hair_styles_list[beard]
//Head Accessories
var/headacc = dna.GetUIValueRange(DNA_UI_HACC_STYLE,head_accessory_styles_list.len)
if((0 < headacc) && (headacc <= head_accessory_styles_list.len))
H.ha_style = head_accessory_styles_list[headacc]
head_organ.ha_style = head_accessory_styles_list[headacc]
//Markings
var/marks = dna.GetUIValueRange(DNA_UI_MARK_STYLE,marking_styles_list.len)
+87 -56
View File
@@ -37,61 +37,7 @@
to_chat(usr, "\red You can't change your appearance right now!")
return
var/mob/living/carbon/human/M=usr
var/new_facial = input("Please select facial hair color.", "Character Generation",rgb(M.r_facial,M.g_facial,M.b_facial)) as null|color
if(new_facial)
M.r_facial = hex2num(copytext(new_facial, 2, 4))
M.g_facial = hex2num(copytext(new_facial, 4, 6))
M.b_facial = hex2num(copytext(new_facial, 6, 8))
var/new_hair = input("Please select hair color.", "Character Generation",rgb(M.r_hair,M.g_hair,M.b_hair)) as null|color
if(new_facial)
M.r_hair = hex2num(copytext(new_hair, 2, 4))
M.g_hair = hex2num(copytext(new_hair, 4, 6))
M.b_hair = hex2num(copytext(new_hair, 6, 8))
var/new_eyes = input("Please select eye color.", "Character Generation",rgb(M.r_eyes,M.g_eyes,M.b_eyes)) as null|color
if(new_eyes)
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", "[35-M.s_tone]") as null|text
if (!new_tone)
new_tone = 35
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
M.s_tone = -M.s_tone + 35
// hair
var/list/all_hairs = subtypesof(/datum/sprite_accessory/hair)
var/list/hairs = list()
// loop through potential hairs
for(var/x in all_hairs)
var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x
hairs.Add(H.name) // add hair name to hairs
qdel(H) // delete the hair after it's all done
var/new_style = input("Please select hair style", "Character Generation",M.h_style) as null|anything in hairs
// if new style selected (not cancel)
if (new_style)
M.h_style = new_style
// facial hair
var/list/all_fhairs = subtypesof(/datum/sprite_accessory/facial_hair)
var/list/fhairs = list()
for(var/x in all_fhairs)
var/datum/sprite_accessory/facial_hair/H = new x
fhairs.Add(H.name)
qdel(H)
new_style = input("Please select facial style", "Character Generation",M.f_style) as null|anything in fhairs
if(new_style)
M.f_style = new_style
var/obj/item/organ/external/head/head_organ = M.get_organ("head")
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female")
if (new_gender)
@@ -99,8 +45,93 @@
M.change_gender(MALE)
else
M.change_gender(FEMALE)
var/new_eyes = input("Please select eye color.", "Character Generation", rgb(M.r_eyes,M.g_eyes,M.b_eyes)) as null|color
if(new_eyes)
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
M.change_eye_color(M.r_eyes, M.g_eyes, M.b_eyes)
// hair
var/list/valid_hairstyles = M.generate_valid_hairstyles()
var/new_style = input("Please select hair style", "Character Generation", head_organ.h_style) as null|anything in valid_hairstyles
// if new style selected (not cancel)
if (new_style)
head_organ.h_style = new_style
var/new_hair = input("Please select hair color.", "Character Generation", rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair)) as null|color
if(new_hair)
head_organ.r_hair = hex2num(copytext(new_hair, 2, 4))
head_organ.g_hair = hex2num(copytext(new_hair, 4, 6))
head_organ.b_hair = hex2num(copytext(new_hair, 6, 8))
// facial hair
var/list/valid_facial_hairstyles = M.generate_valid_facial_hairstyles()
new_style = input("Please select facial style", "Character Generation", head_organ.f_style) as null|anything in valid_facial_hairstyles
if(new_style)
head_organ.f_style = new_style
var/new_facial = input("Please select facial hair color.", "Character Generation", rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial)) as null|color
if(new_facial)
head_organ.r_facial = hex2num(copytext(new_facial, 2, 4))
head_organ.g_facial = hex2num(copytext(new_facial, 4, 6))
head_organ.b_facial = hex2num(copytext(new_facial, 6, 8))
//Head accessory.
if(head_organ.species.bodyflags & HAS_HEAD_ACCESSORY)
var/list/valid_head_accessories = M.generate_valid_head_accessories()
var/new_head_accessory = input("Please select head accessory style", "Character Generation", head_organ.ha_style) as null|anything in valid_head_accessories
if(new_head_accessory)
head_organ.ha_style = new_head_accessory
var/new_head_accessory_colour = input("Please select head accessory colour.", "Character Generation", rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc)) as null|color
if(new_head_accessory_colour)
head_organ.r_headacc = hex2num(copytext(new_head_accessory_colour, 2, 4))
head_organ.g_headacc = hex2num(copytext(new_head_accessory_colour, 4, 6))
head_organ.b_headacc = hex2num(copytext(new_head_accessory_colour, 6, 8))
//Body markings.
if(M.species.bodyflags & HAS_MARKINGS)
var/list/valid_markings = M.generate_valid_markings()
var/new_marking = input("Please select marking style", "Character Generation", M.m_style) as null|anything in valid_markings
if(new_marking)
M.m_style = new_marking
var/new_marking_colour = input("Please select marking colour.", "Character Generation", rgb(M.r_markings, M.g_markings, M.b_markings)) as null|color
if(new_marking_colour)
M.r_markings = hex2num(copytext(new_marking_colour, 2, 4))
M.g_markings = hex2num(copytext(new_marking_colour, 4, 6))
M.b_markings = hex2num(copytext(new_marking_colour, 6, 8))
//Body accessory.
if(M.species.tail && M.species.bodyflags & HAS_TAIL)
var/list/valid_body_accessories = M.generate_valid_body_accessories()
if(valid_body_accessories.len > 1) //By default valid_body_accessories will always have at the very least a 'none' entry populating the list, even if the user's species is not present in any of the list items.
var/new_body_accessory = input("Please select body accessory style", "Character Generation", M.body_accessory) as null|anything in valid_body_accessories
if(new_body_accessory)
M.body_accessory = body_accessory_by_name[new_body_accessory]
//Skin tone.
if(M.species.bodyflags & HAS_SKIN_TONE)
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", "[M.s_tone]") as null|text
if (!new_tone)
new_tone = 35
M.s_tone = 35 - max(min(round(text2num(new_tone)), 220), 1)
//Skin colour.
if(M.species.bodyflags & HAS_SKIN_COLOR)
var/new_body_colour = input("Please select body colour.", "Character Generation", rgb(M.r_skin, M.g_skin, M.b_skin)) as null|color
if(new_body_colour)
M.r_skin = hex2num(copytext(new_body_colour, 2, 4))
M.g_skin = hex2num(copytext(new_body_colour, 4, 6))
M.b_skin = hex2num(copytext(new_body_colour, 6, 8))
M.force_update_limbs()
M.regenerate_icons()
M.check_dna()
M.update_dna()
M.visible_message("\blue \The [src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "\blue You change your appearance!", "\red Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!")
+2 -1
View File
@@ -68,6 +68,7 @@
..()
/mob/living/simple_animal/hostile/blob/blobspore/proc/Zombify(var/mob/living/carbon/human/H)
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
is_zombie = 1
if(H.wear_suit)
var/obj/item/clothing/suit/armor/A = H.wear_suit
@@ -82,7 +83,7 @@
icon = H.icon
speak_emote = list("groans")
icon_state = "zombie2_s"
H.h_style = null
head_organ.h_style = null
H.update_hair()
human_overlays = H.overlays
update_icons()
+3 -2
View File
@@ -94,6 +94,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
newname += pick(list("ti","hi","ki","ya","ta","ha","ka","ya","chi","cha","kah"))
var/mob/living/carbon/human/vox = newraider.current
var/obj/item/organ/external/head/head_organ = vox.get_organ("head")
vox.real_name = capitalize(newname)
vox.name = vox.real_name
@@ -105,8 +106,8 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
vox.add_language("Vox-pidgin")
vox.add_language("Galactic Common")
vox.add_language("Tradeband")
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
head_organ.h_style = "Short Vox Quills"
head_organ.f_style = "Shaved"
for(var/obj/item/organ/external/limb in vox.organs)
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
+10 -8
View File
@@ -133,6 +133,8 @@ proc/issyndicate(mob/living/M as mob)
/datum/game_mode/proc/create_syndicate(var/datum/mind/synd_mind) // So we don't have inferior species as ops - randomize a human
var/mob/living/carbon/human/M = synd_mind.current
var/obj/item/organ/external/head/head_organ = M.get_organ("head")
M.set_species("Human",1)
M.dna.ready_dna(M) // Quadriplegic Nuke Ops won't be participating in the paralympics
@@ -149,18 +151,18 @@ proc/issyndicate(mob/living/M as mob)
if(prob(5))
facial_hair_style = pick(facial_hair_styles_list)
M.r_facial = hex2num(copytext(hair_c, 2, 4))
M.g_facial = hex2num(copytext(hair_c, 4, 6))
M.b_facial = hex2num(copytext(hair_c, 6, 8))
M.r_hair = hex2num(copytext(hair_c, 2, 4))
M.g_hair = hex2num(copytext(hair_c, 4, 6))
M.b_hair = hex2num(copytext(hair_c, 6, 8))
head_organ.r_facial = hex2num(copytext(hair_c, 2, 4))
head_organ.g_facial = hex2num(copytext(hair_c, 4, 6))
head_organ.b_facial = hex2num(copytext(hair_c, 6, 8))
head_organ.r_hair = hex2num(copytext(hair_c, 2, 4))
head_organ.g_hair = hex2num(copytext(hair_c, 4, 6))
head_organ.b_hair = hex2num(copytext(hair_c, 6, 8))
M.r_eyes = hex2num(copytext(eye_c, 2, 4))
M.g_eyes = hex2num(copytext(eye_c, 4, 6))
M.b_eyes = hex2num(copytext(eye_c, 6, 8))
M.s_tone = skin_tone
M.h_style = hair_style
M.f_style = facial_hair_style
head_organ.h_style = hair_style
head_organ.f_style = facial_hair_style
M.body_accessory = null
/datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code)
+9 -9
View File
@@ -91,16 +91,16 @@
/obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.organs_by_name["head"]
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(user.zone_sel.selecting == "mouth")
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
return
if((H.species && H.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.species && C.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of facial hair.</span>")
return
if(H.f_style == "Shaved")
if(C.f_style == "Shaved")
to_chat(user, "<span class='notice'>Already clean-shaven.</span>")
return
if(H == user) //shaving yourself
@@ -109,7 +109,7 @@
if(do_after(user, 50, target = H))
user.visible_message("<span class='notice'>[user] shaves his facial hair clean with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src]. Fast and clean!</span>")
H.f_style = "Shaved"
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
else
@@ -121,17 +121,17 @@
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves off [H]'s facial hair with \the [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
H.f_style = "Shaved"
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
if(user.zone_sel.selecting == "head")
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
return
if((H.species && H.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.species && C.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of hair.</span>")
return
if(H.h_style == "Bald" || H.h_style == "Balding Hair" || H.h_style == "Skinhead")
if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead")
to_chat(user, "<span class='notice'>There is not enough hair left to shave...</span>")
return
if(H == user) //shaving yourself
@@ -140,7 +140,7 @@
if(do_after(user, 50, target = H))
user.visible_message("<span class='notice'>[user] shaves his head with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src].</span>")
H.h_style = "Skinhead"
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1)
else
@@ -152,7 +152,7 @@
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves [H]'s head bald with \the [src]!</span>", \
"<span class='warning'>You shave [H]'s head bald.</span>")
H.h_style = "Skinhead"
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1)
else
+12 -11
View File
@@ -30,21 +30,21 @@
//this is largely copypasted from there.
//handle facial hair (if necessary)
var/list/species_facial_hair = list()
var/obj/item/organ/external/head/C = H.organs_by_name["head"]
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(H.gender == MALE || H.get_species() == "Vulpkanin")
if(H.species)
if(C.species)
for(var/i in facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
if(H.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(H.species.flags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(C.species.flags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_facial_hair += i
else
if(H.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_facial.species_allowed)
species_facial_hair += i
@@ -56,18 +56,18 @@
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
//handle normal hair
var/list/species_hair = list()
if(H.species)
if(C.species)
for(var/i in hair_styles_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
if(H.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(H.species.flags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(C.species.flags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_hair += i
else
if(H.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_hair.species_allowed)
species_hair += i
@@ -84,11 +84,12 @@
user.visible_message("<span class='notice'>[user] stops cutting [M]'s hair.</span>", "<span class='notice'>You stop cutting [M]'s hair.</span>")
return
if(f_new_style)
H.f_style = f_new_style
C.f_style = f_new_style
if(h_new_style)
H.h_style = h_new_style
C.h_style = h_new_style
H.update_hair()
H.update_fhair()
user.visible_message("<span class='notice'>[user] finishes cutting [M]'s hair!</span>")
/obj/item/weapon/scissors/safety //Totally safe, I assure you.
+1
View File
@@ -17,6 +17,7 @@
if(!AC)
AC = new(src, user)
AC.name = "SalonPro Nano-Mirror&trade;"
AC.flags = APPEARANCE_ALL_BODY
ui_users[user] = AC
AC.ui_interact(user)
+9 -8
View File
@@ -148,6 +148,7 @@ var/send_emergency_team
/client/proc/create_response_team(obj/spawn_location)
var/mob/living/carbon/human/M = new(null)
var/obj/item/organ/external/head/head_organ = M.get_organ("head")
response_team_members |= M
var/new_gender = alert(usr, "Please select your gender.", "Character Generation", "Male", "Female")
@@ -173,18 +174,18 @@ var/send_emergency_team
if(prob(5))
facial_hair_style = pick(facial_hair_styles_list)
M.r_facial = hex2num(copytext(hair_c, 2, 4))
M.g_facial = hex2num(copytext(hair_c, 4, 6))
M.b_facial = hex2num(copytext(hair_c, 6, 8))
M.r_hair = hex2num(copytext(hair_c, 2, 4))
M.g_hair = hex2num(copytext(hair_c, 4, 6))
M.b_hair = hex2num(copytext(hair_c, 6, 8))
head_organ.r_facial = hex2num(copytext(hair_c, 2, 4))
head_organ.g_facial = hex2num(copytext(hair_c, 4, 6))
head_organ.b_facial = hex2num(copytext(hair_c, 6, 8))
head_organ.r_hair = hex2num(copytext(hair_c, 2, 4))
head_organ.g_hair = hex2num(copytext(hair_c, 4, 6))
head_organ.b_hair = hex2num(copytext(hair_c, 6, 8))
M.r_eyes = hex2num(copytext(eye_c, 2, 4))
M.g_eyes = hex2num(copytext(eye_c, 4, 6))
M.b_eyes = hex2num(copytext(eye_c, 6, 8))
M.s_tone = skin_tone
M.h_style = hair_style
M.f_style = facial_hair_style
head_organ.h_style = hair_style
head_organ.f_style = facial_hair_style
M.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]"
M.name = M.real_name