mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Changing a person's appearance now works better
Also fixes some problems on changing gender
This commit is contained in:
@@ -22,9 +22,18 @@
|
||||
return
|
||||
|
||||
src.gender = gender
|
||||
reset_hair()
|
||||
update_body()
|
||||
|
||||
var/datum/sprite_accessory/hair/current_hair = hair_styles_list[h_style]
|
||||
if(current_hair.gender != NEUTER && current_hair.gender != src.gender)
|
||||
reset_head_hair()
|
||||
|
||||
var/datum/sprite_accessory/hair/current_fhair = facial_hair_styles_list[f_style]
|
||||
if(current_fhair.gender != NEUTER && current_fhair.gender != src.gender)
|
||||
reset_facial_hair()
|
||||
|
||||
update_dna()
|
||||
sync_organ_dna(assimilate = 0)
|
||||
update_body()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/change_hair(var/hair_style)
|
||||
@@ -58,8 +67,11 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/reset_hair()
|
||||
reset_head_hair()
|
||||
reset_facial_hair()
|
||||
|
||||
/mob/living/carbon/human/proc/reset_head_hair()
|
||||
var/list/valid_hairstyles = generate_valid_hairstyles()
|
||||
var/list/valid_facial_hairstyles = generate_valid_facial_hairstyles()
|
||||
|
||||
if(valid_hairstyles.len)
|
||||
h_style = pick(valid_hairstyles)
|
||||
@@ -67,13 +79,15 @@
|
||||
//this shouldn't happen
|
||||
h_style = "Bald"
|
||||
|
||||
update_hair()
|
||||
|
||||
/mob/living/carbon/human/proc/reset_facial_hair()
|
||||
var/list/valid_facial_hairstyles = generate_valid_facial_hairstyles()
|
||||
if(valid_facial_hairstyles.len)
|
||||
f_style = pick(valid_facial_hairstyles)
|
||||
else
|
||||
//this shouldn't happen
|
||||
f_style = "Shaved"
|
||||
|
||||
update_hair()
|
||||
update_fhair()
|
||||
|
||||
/mob/living/carbon/human/proc/change_eye_color(var/red, var/green, var/blue)
|
||||
|
||||
@@ -146,9 +146,15 @@
|
||||
var/obj/item/organ/O = pick(organs)
|
||||
O.trace_chemicals[A.name] = 100
|
||||
|
||||
/mob/living/carbon/human/proc/sync_organ_dna()
|
||||
/*
|
||||
When assimilate is 1, organs that have a different UE will still have their DNA overriden by that of the host
|
||||
Otherwise, this restricts itself to organs that share the UE of the host.
|
||||
*/
|
||||
/mob/living/carbon/human/proc/sync_organ_dna(var/assimilate = 1)
|
||||
var/list/all_bits = internal_organs|organs
|
||||
for(var/obj/item/organ/O in all_bits)
|
||||
if(!assimilate && O.dna.unique_enzymes != dna.unique_enzymes)
|
||||
continue
|
||||
O.set_dna(dna)
|
||||
|
||||
/*
|
||||
|
||||
@@ -177,11 +177,10 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
if(istype(I)) overlays += I
|
||||
else
|
||||
icon = stand_icon
|
||||
if(overlays.len != overlays_standing.len)
|
||||
overlays.Cut()
|
||||
overlays.Cut()
|
||||
|
||||
for(var/thing in overlays_standing)
|
||||
if(thing) overlays += thing
|
||||
for(var/thing in overlays_standing)
|
||||
if(thing) overlays += thing
|
||||
|
||||
update_transform()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user