mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #3744 from Crazylemon64/human_icons_tweak
Changing a person's appearance now works better
This commit is contained in:
@@ -346,11 +346,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(record_found)//If they have a record we can determine a few things.
|
||||
new_character.real_name = record_found.fields["name"]
|
||||
new_character.gender = record_found.fields["sex"]
|
||||
new_character.change_gender(record_found.fields["sex"])
|
||||
new_character.age = record_found.fields["age"]
|
||||
new_character.b_type = record_found.fields["b_type"]
|
||||
else
|
||||
new_character.gender = pick(MALE,FEMALE)
|
||||
new_character.change_gender(pick(MALE,FEMALE))
|
||||
var/datum/preferences/A = new()
|
||||
A.real_name = G_found.real_name
|
||||
A.copy_to(new_character)
|
||||
|
||||
@@ -1593,7 +1593,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
character.sec_record = sec_record
|
||||
character.gen_record = gen_record
|
||||
|
||||
character.gender = gender
|
||||
character.change_gender(gender)
|
||||
character.age = age
|
||||
character.b_type = b_type
|
||||
|
||||
@@ -1694,7 +1694,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(character.gender in list(PLURAL, NEUTER))
|
||||
if(isliving(src)) //Ghosts get neuter by default
|
||||
message_admins("[key_name_admin(character)] has spawned with their gender as plural or neuter. Please notify coders.")
|
||||
character.gender = MALE
|
||||
character.change_gender(MALE)
|
||||
|
||||
/datum/preferences/proc/open_load_dialog(mob/user)
|
||||
|
||||
|
||||
@@ -17,14 +17,24 @@
|
||||
reset_hair()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/change_gender(var/gender)
|
||||
/mob/living/carbon/human/proc/change_gender(var/gender, var/update_dna = 1)
|
||||
if(src.gender == gender)
|
||||
return
|
||||
|
||||
src.gender = gender
|
||||
reset_hair()
|
||||
|
||||
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()
|
||||
|
||||
if(update_dna)
|
||||
update_dna()
|
||||
sync_organ_dna(assimilate = 0)
|
||||
update_body()
|
||||
update_dna()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/change_hair(var/hair_style)
|
||||
@@ -58,8 +68,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 +80,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)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(!delay_ready_dna && dna)
|
||||
dna.ready_dna(src)
|
||||
dna.real_name = real_name
|
||||
sync_organ_dna() //this shouldn't be necessaaaarrrryyyyyyyy
|
||||
sync_organ_dna(1)
|
||||
|
||||
if(species)
|
||||
species.handle_dna(src)
|
||||
@@ -1406,6 +1406,8 @@
|
||||
/mob/living/carbon/human/generate_name()
|
||||
name = species.makeName(gender,src)
|
||||
real_name = name
|
||||
if(dna)
|
||||
dna.real_name = name
|
||||
return name
|
||||
|
||||
/mob/living/carbon/human/proc/handle_embedded_objects()
|
||||
|
||||
@@ -146,10 +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)
|
||||
O.set_dna(dna)
|
||||
if(assimilate || O.dna.unique_enzymes == dna.unique_enzymes)
|
||||
O.set_dna(dna)
|
||||
|
||||
/*
|
||||
Given the name of an organ, returns the external organ it's contained in
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -286,7 +285,7 @@ var/global/list/damage_icon_parts = list()
|
||||
else
|
||||
//BEGIN CACHED ICON GENERATION.
|
||||
var/obj/item/organ/external/chest = get_organ("chest")
|
||||
base_icon = chest.get_icon()
|
||||
base_icon = chest.get_icon(skeleton)
|
||||
|
||||
for(var/obj/item/organ/external/part in organs)
|
||||
var/icon/temp = part.get_icon(skeleton)
|
||||
|
||||
@@ -477,7 +477,7 @@
|
||||
|
||||
domutcheck(new_character)
|
||||
new_character.dna.UpdateSE()
|
||||
new_character.sync_organ_dna() //just fucking incase I guess
|
||||
new_character.sync_organ_dna(1) //just fucking incase I guess
|
||||
|
||||
// Do the initial caching of the player's body icons.
|
||||
new_character.force_update_limbs()
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
user << "The rune fizzles uselessly. There is no spirit nearby."
|
||||
return
|
||||
var/mob/living/carbon/human/golem/G = new /mob/living/carbon/human/golem
|
||||
if(prob(50)) G.gender = "female"
|
||||
G.change_gender(pick(MALE,FEMALE))
|
||||
G.loc = src.loc
|
||||
G.key = ghost.key
|
||||
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
|
||||
|
||||
Reference in New Issue
Block a user