Selectively randomisable characters (#46108)

* Selectively randomisable characters

* it's a list now

* this doesn't work

* it's totally fucking fucked mate big time

* it works

* so sick of this goddamn pull request and yes i know this is a retarded way to do this it didn't work the other way

* anturk forestalls the inevitable suicide

'associative lists are more performant'

* final changes anturk requested

'remove all the "in randomise" and it's ready'
This commit is contained in:
cacogen
2019-09-06 18:50:12 +12:00
committed by AnturK
parent 37c5663b5b
commit 1f010e7144
35 changed files with 378 additions and 309 deletions
+2 -2
View File
@@ -78,8 +78,8 @@
#define DNA_SKIN_TONE_BLOCK 3
#define DNA_EYE_COLOR_BLOCK 4
#define DNA_GENDER_BLOCK 5
#define DNA_FACIAL_HAIR_STYLE_BLOCK 6
#define DNA_HAIR_STYLE_BLOCK 7
#define DNA_FACIAL_HAIRSTYLE_BLOCK 6
#define DNA_HAIRSTYLE_BLOCK 7
#define DNA_SEQUENCE_LENGTH 4
#define DNA_MUTATION_BLOCKS 8
+20 -1
View File
@@ -81,4 +81,23 @@
//Job preferences levels
#define JP_LOW 1
#define JP_MEDIUM 2
#define JP_HIGH 3
#define JP_HIGH 3
//randomised elements
#define RANDOM_NAME "random_name"
#define RANDOM_BODY "random_body"
#define RANDOM_SPECIES "random_species"
#define RANDOM_GENDER "random_gender"
#define RANDOM_AGE "random_age"
#define RANDOM_UNDERWEAR "random_underwear"
#define RANDOM_UNDERWEAR_COLOR "random_underwear_color"
#define RANDOM_UNDERSHIRT "random_undershirt"
#define RANDOM_SOCKS "random_socks"
#define RANDOM_BACKPACK "random_backpack"
#define RANDOM_JUMPSUIT_STYLE "random_jumpsuit_style"
#define RANDOM_HAIRSTYLE "random_hairstyle"
#define RANDOM_HAIR_COLOR "random_hair_color"
#define RANDOM_FACIAL_HAIR_COLOR "random_facial_hair_color"
#define RANDOM_FACIAL_HAIRSTYLE "random_facial_hairstyle"
#define RANDOM_SKIN_TONE "random_skin_tone"
#define RANDOM_EYE_COLOR "random_eye_color"
+2 -2
View File
@@ -4,9 +4,9 @@
/proc/make_datum_references_lists()
//hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hairstyles_list, GLOB.hairstyles_male_list, GLOB.hairstyles_female_list)
//facial hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hairstyles_list, GLOB.facial_hairstyles_male_list, GLOB.facial_hairstyles_female_list)
//underwear
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
//undershirt
+11 -8
View File
@@ -47,6 +47,9 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
return pick(GLOB.socks_list)
/proc/random_backpack()
return pick(GLOB.backpacklist)
/proc/random_features()
if(!GLOB.tails_list_human.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
@@ -75,23 +78,23 @@
//For now we will always return none for tail_human and ears.
return(list("mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),"ethcolor" = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)], "tail_lizard" = pick(GLOB.tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(GLOB.snouts_list), "horns" = pick(GLOB.horns_list), "ears" = "None", "frills" = pick(GLOB.frills_list), "spines" = pick(GLOB.spines_list), "body_markings" = pick(GLOB.body_markings_list), "legs" = "Normal Legs", "caps" = pick(GLOB.caps_list), "moth_wings" = pick(GLOB.moth_wings_list), "moth_markings" = pick(GLOB.moth_markings_list)))
/proc/random_hair_style(gender)
/proc/random_hairstyle(gender)
switch(gender)
if(MALE)
return pick(GLOB.hair_styles_male_list)
return pick(GLOB.hairstyles_male_list)
if(FEMALE)
return pick(GLOB.hair_styles_female_list)
return pick(GLOB.hairstyles_female_list)
else
return pick(GLOB.hair_styles_list)
return pick(GLOB.hairstyles_list)
/proc/random_facial_hair_style(gender)
/proc/random_facial_hairstyle(gender)
switch(gender)
if(MALE)
return pick(GLOB.facial_hair_styles_male_list)
return pick(GLOB.facial_hairstyles_male_list)
if(FEMALE)
return pick(GLOB.facial_hair_styles_female_list)
return pick(GLOB.facial_hairstyles_female_list)
else
return pick(GLOB.facial_hair_styles_list)
return pick(GLOB.facial_hairstyles_list)
/proc/random_unique_name(gender, attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
+7 -7
View File
@@ -1,11 +1,11 @@
//Preferences stuff
//Hairstyles
GLOBAL_LIST_EMPTY(hair_styles_list) //stores /datum/sprite_accessory/hair indexed by name
GLOBAL_LIST_EMPTY(hair_styles_male_list) //stores only hair names
GLOBAL_LIST_EMPTY(hair_styles_female_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/facial_hair indexed by name
GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) //stores only hair names
GLOBAL_LIST_EMPTY(hairstyles_list) //stores /datum/sprite_accessory/hair indexed by name
GLOBAL_LIST_EMPTY(hairstyles_male_list) //stores only hair names
GLOBAL_LIST_EMPTY(hairstyles_female_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hairstyles_list) //stores /datum/sprite_accessory/facial_hair indexed by name
GLOBAL_LIST_EMPTY(facial_hairstyles_male_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hairstyles_female_list) //stores only hair names
//Underwear
GLOBAL_LIST_EMPTY(underwear_list) //stores /datum/sprite_accessory/underwear indexed by name
GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name
@@ -100,7 +100,7 @@ GLOBAL_LIST_INIT(security_depts_prefs, list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_
#define DBACKPACK "Department Backpack"
#define DSATCHEL "Department Satchel"
#define DDUFFELBAG "Department Duffel Bag"
GLOBAL_LIST_INIT(backbaglist, list(DBACKPACK, DSATCHEL, DDUFFELBAG, GBACKPACK, GSATCHEL, GDUFFELBAG, LSATCHEL))
GLOBAL_LIST_INIT(backpacklist, list(DBACKPACK, DSATCHEL, DDUFFELBAG, GBACKPACK, GSATCHEL, GDUFFELBAG, LSATCHEL))
//Suit/Skirt
#define PREF_SUIT "Jumpsuit"
@@ -35,9 +35,9 @@ BONUS
var/mob/living/M = A.affected_mob
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/index = min(max(beard_order.Find(H.facial_hair_style)+1, A.stage-1), beard_order.len)
if(index > 0 && H.facial_hair_style != beard_order[index])
var/index = min(max(beard_order.Find(H.facial_hairstyle)+1, A.stage-1), beard_order.len)
if(index > 0 && H.facial_hairstyle != beard_order[index])
to_chat(H, "<span class='warning'>Your chin itches.</span>")
H.facial_hair_style = beard_order[index]
H.facial_hairstyle = beard_order[index]
H.update_hair()
@@ -38,18 +38,18 @@ BONUS
var/mob/living/carbon/human/H = M
switch(A.stage)
if(3, 4)
if(!(H.hair_style == "Bald") && !(H.hair_style == "Balding Hair"))
if(!(H.hairstyle == "Bald") && !(H.hairstyle == "Balding Hair"))
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
addtimer(CALLBACK(src, .proc/Shed, H, FALSE), 50)
if(5)
if(!(H.facial_hair_style == "Shaved") || !(H.hair_style == "Bald"))
if(!(H.facial_hairstyle == "Shaved") || !(H.hairstyle == "Bald"))
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
addtimer(CALLBACK(src, .proc/Shed, H, TRUE), 50)
/datum/symptom/shedding/proc/Shed(mob/living/carbon/human/H, fullbald)
if(fullbald)
H.facial_hair_style = "Shaved"
H.hair_style = "Bald"
H.facial_hairstyle = "Shaved"
H.hairstyle = "Bald"
else
H.hair_style = "Balding Hair"
H.hairstyle = "Balding Hair"
H.update_hair()
+12 -12
View File
@@ -99,13 +99,13 @@
L[DNA_GENDER_BLOCK] = construct_block(G_PLURAL, 3)
if(ishuman(holder))
var/mob/living/carbon/human/H = holder
if(!GLOB.hair_styles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair,GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
L[DNA_HAIR_STYLE_BLOCK] = construct_block(GLOB.hair_styles_list.Find(H.hair_style), GLOB.hair_styles_list.len)
if(!GLOB.hairstyles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair,GLOB.hairstyles_list, GLOB.hairstyles_male_list, GLOB.hairstyles_female_list)
L[DNA_HAIRSTYLE_BLOCK] = construct_block(GLOB.hairstyles_list.Find(H.hairstyle), GLOB.hairstyles_list.len)
L[DNA_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.hair_color)
if(!GLOB.facial_hair_styles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
L[DNA_FACIAL_HAIR_STYLE_BLOCK] = construct_block(GLOB.facial_hair_styles_list.Find(H.facial_hair_style), GLOB.facial_hair_styles_list.len)
if(!GLOB.facial_hairstyles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hairstyles_list, GLOB.facial_hairstyles_male_list, GLOB.facial_hairstyles_female_list)
L[DNA_FACIAL_HAIRSTYLE_BLOCK] = construct_block(GLOB.facial_hairstyles_list.Find(H.facial_hairstyle), GLOB.facial_hairstyles_list.len)
L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.facial_hair_color)
L[DNA_SKIN_TONE_BLOCK] = construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len)
L[DNA_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.eye_color)
@@ -191,10 +191,10 @@
setblock(uni_identity, blocknumber, construct_block(G_FEMALE, 3))
else
setblock(uni_identity, blocknumber, construct_block(G_PLURAL, 3))
if(DNA_FACIAL_HAIR_STYLE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(GLOB.facial_hair_styles_list.Find(H.facial_hair_style), GLOB.facial_hair_styles_list.len))
if(DNA_HAIR_STYLE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(GLOB.hair_styles_list.Find(H.hair_style), GLOB.hair_styles_list.len))
if(DNA_FACIAL_HAIRSTYLE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(GLOB.facial_hairstyles_list.Find(H.facial_hairstyle), GLOB.facial_hairstyles_list.len))
if(DNA_HAIRSTYLE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(GLOB.hairstyles_list.Find(H.hairstyle), GLOB.hairstyles_list.len))
//Please use add_mutation or activate_mutation instead
/datum/dna/proc/force_give(datum/mutation/human/HM)
@@ -385,8 +385,8 @@
facial_hair_color = sanitize_hexcolor(getblock(structure, DNA_FACIAL_HAIR_COLOR_BLOCK))
skin_tone = GLOB.skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), GLOB.skin_tones.len)]
eye_color = sanitize_hexcolor(getblock(structure, DNA_EYE_COLOR_BLOCK))
facial_hair_style = GLOB.facial_hair_styles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIR_STYLE_BLOCK), GLOB.facial_hair_styles_list.len)]
hair_style = GLOB.hair_styles_list[deconstruct_block(getblock(structure, DNA_HAIR_STYLE_BLOCK), GLOB.hair_styles_list.len)]
facial_hairstyle = GLOB.facial_hairstyles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), GLOB.facial_hairstyles_list.len)]
hairstyle = GLOB.hairstyles_list[deconstruct_block(getblock(structure, DNA_HAIRSTYLE_BLOCK), GLOB.hairstyles_list.len)]
if(icon_update)
update_body()
update_hair()
+10 -10
View File
@@ -115,9 +115,9 @@
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = BODY_ZONE_PRECISE_MOUTH)
if(location == BODY_ZONE_PRECISE_MOUTH)
H.facial_hair_style = "Shaved"
H.facial_hairstyle = "Shaved"
else
H.hair_style = "Skinhead"
H.hairstyle = "Skinhead"
H.update_hair()
playsound(loc, 'sound/items/welder2.ogg', 20, TRUE)
@@ -138,14 +138,14 @@
return
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list
var/new_style = input(user, "Select a facial hairstyle", "Grooming") as null|anything in GLOB.facial_hairstyles_list
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
return
user.visible_message("<span class='notice'>[user] tries to change [H]'s facial hair style using [src].</span>", "<span class='notice'>You try to change [H]'s facial hair style using [src].</span>")
user.visible_message("<span class='notice'>[user] tries to change [H]'s facial hairstyle using [src].</span>", "<span class='notice'>You try to change [H]'s facial hairstyle using [src].</span>")
if(new_style && do_after(user, 60, target = H))
user.visible_message("<span class='notice'>[user] successfully changes [H]'s facial hair style using [src].</span>", "<span class='notice'>You successfully change [H]'s facial hair style using [src].</span>")
H.facial_hair_style = new_style
user.visible_message("<span class='notice'>[user] successfully changes [H]'s facial hairstyle using [src].</span>", "<span class='notice'>You successfully change [H]'s facial hairstyle using [src].</span>")
H.facial_hairstyle = new_style
H.update_hair()
return
else
@@ -158,7 +158,7 @@
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
return
if(H.facial_hair_style == "Shaved")
if(H.facial_hairstyle == "Shaved")
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
return
@@ -184,14 +184,14 @@
return
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list
var/new_style = input(user, "Select a hairstyle", "Grooming") as null|anything in GLOB.hairstyles_list
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
return
user.visible_message("<span class='notice'>[user] tries to change [H]'s hairstyle using [src].</span>", "<span class='notice'>You try to change [H]'s hairstyle using [src].</span>")
if(new_style && do_after(user, 60, target = H))
user.visible_message("<span class='notice'>[user] successfully changes [H]'s hairstyle using [src].</span>", "<span class='notice'>You successfully change [H]'s hairstyle using [src].</span>")
H.hair_style = new_style
H.hairstyle = new_style
H.update_hair()
return
@@ -202,7 +202,7 @@
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
return
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
if(H.hairstyle == "Bald" || H.hairstyle == "Balding Hair" || H.hairstyle == "Skinhead")
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
return
+6 -6
View File
@@ -29,20 +29,20 @@
//handle facial hair (if necessary)
if(H.gender != FEMALE)
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list
var/new_style = input(user, "Select a facial hairstyle", "Grooming") as null|anything in GLOB.facial_hairstyles_list
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return //no tele-grooming
if(new_style)
H.facial_hair_style = new_style
H.facial_hairstyle = new_style
else
H.facial_hair_style = "Shaved"
H.facial_hairstyle = "Shaved"
//handle normal hair
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list
var/new_style = input(user, "Select a hairstyle", "Grooming") as null|anything in GLOB.hairstyles_list
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return //no tele-grooming
if(new_style)
H.hair_style = new_style
H.hairstyle = new_style
H.update_hair()
@@ -211,7 +211,7 @@
H.update_mutations_overlay() //(hulk male/female)
if("hair")
var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
var/hairchoice = alert(H, "Hairstyle or hair color?", "Change Hair", "Style", "Color")
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(hairchoice == "Style") //So you just want to use a mirror then?
+4 -4
View File
@@ -17,8 +17,8 @@
H.underwear = random_underwear(H.gender)
H.underwear_color = random_short_color()
H.skin_tone = random_skin_tone()
H.hair_style = random_hair_style(H.gender)
H.facial_hair_style = random_facial_hair_style(H.gender)
H.hairstyle = random_hairstyle(H.gender)
H.facial_hairstyle = random_facial_hairstyle(H.gender)
H.hair_color = random_short_color()
H.facial_hair_color = H.hair_color
H.eye_color = random_eye_color()
@@ -28,8 +28,8 @@
H.dna.features["mcolor"] = random_short_color()
H.dna.features["ethcolor"] = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)]
H.dna.features["tail_lizard"] = pick(GLOB.tails_list_lizard)
H.dna.features["snout"] = pick(GLOB.snouts_list)
H.dna.features["horns"] = pick(GLOB.horns_list)
H.dna.features["snout"] = pick(GLOB.snouts_list)
H.dna.features["horns"] = pick(GLOB.horns_list)
H.dna.features["frills"] = pick(GLOB.frills_list)
H.dna.features["spines"] = pick(GLOB.spines_list)
H.dna.features["body_markings"] = pick(GLOB.body_markings_list)
+1 -1
View File
@@ -528,7 +528,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Dwarf Beards"))
for(var/mob/living/carbon/human/B in GLOB.carbon_list)
B.facial_hair_style = "Dward Beard"
B.facial_hairstyle = "Dward Beard"
B.update_hair()
message_admins("[key_name_admin(usr)] activated dorf mode")
@@ -75,13 +75,13 @@
eyes.Blend("#[H.eye_color]", ICON_MULTIPLY)
var/datum/sprite_accessory/S
S = GLOB.hair_styles_list[H.hair_style]
S = GLOB.hairstyles_list[H.hairstyle]
if(S && (HAIR in H.dna.species.species_traits))
var/icon/hair = icon("icon" = S.icon, "icon_state" = "[S.icon_state]")
hair.Blend("#[H.hair_color]", ICON_MULTIPLY)
eyes.Blend(hair, ICON_OVERLAY)
S = GLOB.facial_hair_styles_list[H.facial_hair_style]
S = GLOB.facial_hairstyles_list[H.facial_hairstyle]
if(S && (FACEHAIR in H.dna.species.species_traits))
var/icon/facial = icon("icon" = S.icon, "icon_state" = "[S.icon_state]")
facial.Blend("#[H.facial_hair_color]", ICON_MULTIPLY)
+1 -1
View File
@@ -127,7 +127,7 @@
death_cloud_size = 0
icon = H.icon
icon_state = "zombie"
H.hair_style = null
H.hairstyle = null
H.update_hair()
H.forceMove(src)
oldguy = H
@@ -33,8 +33,8 @@
H.eye_color = "000"
H.gender = MALE
H.skin_tone = "caucasian3"
H.hair_style = "Business Hair 3"
H.facial_hair_style = "Shaved"
H.hairstyle = "Business Hair 3"
H.facial_hairstyle = "Shaved"
H.hair_color = "000"
H.facial_hair_color = H.hair_color
H.update_body()
+8 -8
View File
@@ -153,8 +153,8 @@
var/backpack_contents = -1
var/suit_store = -1
var/hair_style
var/facial_hair_style
var/hairstyle
var/facial_hairstyle
var/skin_tone
/obj/effect/mob_spawn/human/Initialize()
@@ -174,14 +174,14 @@
H.underwear = "Nude"
H.undershirt = "Nude"
H.socks = "Nude"
if(hair_style)
H.hair_style = hair_style
if(hairstyle)
H.hairstyle = hairstyle
else
H.hair_style = random_hair_style(gender)
if(facial_hair_style)
H.facial_hair_style = facial_hair_style
H.hairstyle = random_hairstyle(gender)
if(facial_hairstyle)
H.facial_hairstyle = facial_hairstyle
else
H.facial_hair_style = random_facial_hair_style(gender)
H.facial_hairstyle = random_facial_hairstyle(gender)
if(skin_tone)
H.skin_tone = skin_tone
else
+120 -101
View File
@@ -49,25 +49,23 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//character preferences
var/real_name //our character's name
var/be_random_name = 0 //whether we'll have a random name every round
var/be_random_body = 0 //whether we'll have a random body every round
var/be_random_species = 0 //whether we'll be a random species every round
var/gender = MALE //gender of character (well duh)
var/age = 30 //age of character
var/underwear = "Nude" //underwear type
var/underwear_color = "000" //underwear color
var/undershirt = "Nude" //undershirt type
var/socks = "Nude" //socks type
var/backbag = DBACKPACK //backpack type
var/backpack = DBACKPACK //backpack type
var/jumpsuit_style = PREF_SUIT //suit/skirt
var/hair_style = "Bald" //Hair type
var/hairstyle = "Bald" //Hair type
var/hair_color = "000" //Hair color
var/facial_hair_style = "Shaved" //Face hair type
var/facial_hairstyle = "Shaved" //Face hair type
var/facial_hair_color = "000" //Facial hair color
var/skin_tone = "caucasian1" //Skin color
var/eye_color = "000" //Eye color
var/datum/species/pref_species = new /datum/species/human() //Mutant race
var/list/features = list("mcolor" = "FFF", "ethcolor" = "9c3030", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs", "moth_wings" = "Plain", "moth_markings" = "None")
var/list/randomise = list(RANDOM_UNDERWEAR = TRUE, RANDOM_UNDERWEAR_COLOR = TRUE, RANDOM_UNDERSHIRT = TRUE, RANDOM_SOCKS = TRUE, RANDOM_BACKPACK = TRUE, RANDOM_JUMPSUIT_STYLE = TRUE, RANDOM_HAIRSTYLE = TRUE, RANDOM_HAIR_COLOR = TRUE, RANDOM_FACIAL_HAIRSTYLE = TRUE, RANDOM_FACIAL_HAIR_COLOR = TRUE, RANDOM_SKIN_TONE = TRUE, RANDOM_EYE_COLOR = TRUE)
var/list/genders = list(MALE, FEMALE, PLURAL)
var/list/friendlyGenders = list("Male" = "male", "Female" = "female", "Other" = "plural")
@@ -182,13 +180,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<table width='100%'><tr><td width='75%' valign='top'>"
if(is_banned_from(user.ckey, "Appearance"))
dat += "<b>You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.</b><br>"
if (!be_random_species) // don't let random species choose their name
dat += "<a href='?_src_=prefs;preference=name;task=random'>Random Name</A> "
dat += "<a href='?_src_=prefs;preference=name'>Always Random Name: [be_random_name ? "Yes" : "No"]</a><BR>"
dat += "<b>Name:</b> "
dat += "<a href='?_src_=prefs;preference=name;task=input'>[real_name]</a><BR>"
else
dat += "<b>Name Randomized (always random species)</b><br>"
dat += "<a href='?_src_=prefs;preference=name;task=random'>Random Name</A> "
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_NAME]'>Always Random Name: [(randomise[RANDOM_NAME]) ? "Yes" : "No"]</a><BR>"
dat += "<b>Name:</b> "
dat += "<a href='?_src_=prefs;preference=name;task=input'>[real_name]</a><BR>"
if(!(AGENDER in pref_species.species_traits))
var/dispGender
@@ -198,10 +193,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dispGender = "Female"
else
dispGender = "Other"
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[dispGender]</a><BR>"
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a><BR>"
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[dispGender]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_GENDER]'>Always Random Gender: [(randomise[RANDOM_GENDER]) ? "Yes" : "No"]</A>"
dat += "<b>Special Names:</b><BR>"
dat += "<br><b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_AGE]'>Always Random Age: [(randomise[RANDOM_AGE]) ? "Yes" : "No"]</A>"
dat += "<br><br><b>Special Names:</b><BR>"
var/old_group
for(var/custom_name_id in GLOB.preferences_custom_names)
var/namedata = GLOB.preferences_custom_names[custom_name_id]
@@ -221,21 +219,37 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<h2>Body</h2>"
dat += "<a href='?_src_=prefs;preference=all;task=random'>Random Body</A> "
dat += "<a href='?_src_=prefs;preference=all'>Always Random Body: [be_random_body ? "Yes" : "No"]</A><br>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_BODY]'>Always Random Body: [(randomise[RANDOM_BODY]) ? "Yes" : "No"]</A><br>"
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
dat += "<a href='?_src_=prefs;preference=rand_species;task=random_race'>Random Species</A> "
dat += "<a href='?_src_=prefs;preference=rand_species'>Always Random Species: [be_random_species ? "Yes" : "No"]</A><br>"
dat += "<a href='?_src_=prefs;preference=species;task=random'>Random Species</A> "
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_SPECIES]'>Always Random Species: [(randomise[RANDOM_SPECIES]) ? "Yes" : "No"]</A><br>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
dat += "<b>Underwear Color:</b><BR><span style='border: 1px solid #161616; background-color: #[underwear_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=underwear_color;task=input'>Change</a><BR>"
dat += "<b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
dat += "<b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbag]</a><BR>"
dat += "<b>Jumpsuit:</b><BR><a href ='?_src_=prefs;preference=suit;task=input'>[jumpsuit_style]</a><BR>"
dat += "<b>Uplink Spawn Location:</b><BR><a href ='?_src_=prefs;preference=uplink_loc;task=input'>[uplink_spawn_loc]</a><BR></td>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_UNDERWEAR]'>[(randomise[RANDOM_UNDERWEAR]) ? "Lock" : "Unlock"]</A>"
dat += "<br><b>Underwear Color:</b><BR><span style='border: 1px solid #161616; background-color: #[underwear_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=underwear_color;task=input'>Change</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_UNDERWEAR_COLOR]'>[(randomise[RANDOM_UNDERWEAR_COLOR]) ? "Lock" : "Unlock"]</A>"
dat += "<BR><b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_UNDERSHIRT]'>[(randomise[RANDOM_UNDERSHIRT]) ? "Lock" : "Unlock"]</A>"
dat += "<br><b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_SOCKS]'>[(randomise[RANDOM_SOCKS]) ? "Lock" : "Unlock"]</A>"
dat += "<br><b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backpack]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_BACKPACK]'>[(randomise[RANDOM_BACKPACK]) ? "Lock" : "Unlock"]</A>"
dat += "<br><b>Jumpsuit Style:</b><BR><a href ='?_src_=prefs;preference=suit;task=input'>[jumpsuit_style]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_JUMPSUIT_STYLE]'>[(randomise[RANDOM_JUMPSUIT_STYLE]) ? "Lock" : "Unlock"]</A>"
dat += "<br><b>Uplink Spawn Location:</b><BR><a href ='?_src_=prefs;preference=uplink_loc;task=input'>[uplink_spawn_loc]</a><BR></td>"
var/use_skintones = pref_species.use_skintones
if(use_skintones)
@@ -244,7 +258,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<h3>Skin Tone</h3>"
dat += "<a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_SKIN_TONE]'>[(randomise[RANDOM_SKIN_TONE]) ? "Lock" : "Unlock"]</A>"
dat += "<br>"
var/mutant_colors
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
@@ -274,10 +290,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += APPEARANCE_CATEGORY_COLUMN
dat += "<h3>Eye Color</h3>"
dat += "<span style='border: 1px solid #161616; background-color: #[eye_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_EYE_COLOR]'>[(randomise[RANDOM_EYE_COLOR]) ? "Lock" : "Unlock"]</A>"
dat += "<span style='border: 1px solid #161616; background-color: #[eye_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
dat += "</td>"
dat += "<br></td>"
else if(use_skintones || mutant_colors)
dat += "</td>"
@@ -285,19 +301,24 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += APPEARANCE_CATEGORY_COLUMN
dat += "<h3>Hair Style</h3>"
dat += "<h3>Hairstyle</h3>"
dat += "<a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
dat += "<a href='?_src_=prefs;preference=previous_hair_style;task=input'>&lt;</a> <a href='?_src_=prefs;preference=next_hair_style;task=input'>&gt;</a><BR>"
dat += "<span style='border:1px solid #161616; background-color: #[hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
dat += "<a href='?_src_=prefs;preference=hairstyle;task=input'>[hairstyle]</a>"
dat += "<a href='?_src_=prefs;preference=previous_hairstyle;task=input'>&lt;</a> <a href='?_src_=prefs;preference=next_hairstyle;task=input'>&gt;</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_HAIRSTYLE]'>[(randomise[RANDOM_HAIRSTYLE]) ? "Lock" : "Unlock"]</A>"
dat += "<h3>Facial Hair Style</h3>"
dat += "<br><span style='border:1px solid #161616; background-color: #[hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_HAIR_COLOR]'>[(randomise[RANDOM_HAIR_COLOR]) ? "Lock" : "Unlock"]</A>"
dat += "<a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
dat += "<a href='?_src_=prefs;preference=previous_facehair_style;task=input'>&lt;</a> <a href='?_src_=prefs;preference=next_facehair_style;task=input'>&gt;</a><BR>"
dat += "<span style='border: 1px solid #161616; background-color: #[facial_hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
dat += "<BR><h3>Facial Hairstyle</h3>"
dat += "</td>"
dat += "<a href='?_src_=prefs;preference=facial_hairstyle;task=input'>[facial_hairstyle]</a>"
dat += "<a href='?_src_=prefs;preference=previous_facehairstyle;task=input'>&lt;</a> <a href='?_src_=prefs;preference=next_facehairstyle;task=input'>&gt;</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_FACIAL_HAIRSTYLE]'>[(randomise[RANDOM_FACIAL_HAIRSTYLE]) ? "Lock" : "Unlock"]</A>"
dat += "<br><span style='border: 1px solid #161616; background-color: #[facial_hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a>"
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_FACIAL_HAIR_COLOR]'>[(randomise[RANDOM_FACIAL_HAIR_COLOR]) ? "Lock" : "Unlock"]</A>"
dat += "<br></td>"
//Mutant stuff
var/mutant_category = 0
@@ -1006,9 +1027,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
return TRUE
switch(href_list["task"])
if ("random_race")
random_species()
if("random")
switch(href_list["preference"])
if("name")
@@ -1017,12 +1035,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
age = rand(AGE_MIN, AGE_MAX)
if("hair")
hair_color = random_short_color()
if("hair_style")
hair_style = random_hair_style(gender)
if("hairstyle")
hairstyle = random_hairstyle(gender)
if("facial")
facial_hair_color = random_short_color()
if("facial_hair_style")
facial_hair_style = random_facial_hair_style(gender)
if("facial_hairstyle")
facial_hairstyle = random_facial_hairstyle(gender)
if("underwear")
underwear = random_underwear(gender)
if("underwear_color")
@@ -1035,12 +1053,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
eye_color = random_eye_color()
if("s_tone")
skin_tone = random_skin_tone()
if("species")
random_species()
if("bag")
backbag = pick(GLOB.backbaglist)
backpack = pick(GLOB.backpacklist)
if("suit")
jumpsuit_style = pick(GLOB.jumpsuitlist)
if("all")
random_character()
random_character(gender)
if("input")
@@ -1099,64 +1119,64 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(new_hair)
hair_color = sanitize_hexcolor(new_hair)
if("hair_style")
var/new_hair_style
if("hairstyle")
var/new_hairstyle
if(gender == MALE)
new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_male_list
new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_male_list
else if(gender == FEMALE)
new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_female_list
new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_female_list
else
new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_list
if(new_hair_style)
hair_style = new_hair_style
new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_list
if(new_hairstyle)
hairstyle = new_hairstyle
if("next_hair_style")
if("next_hairstyle")
if (gender == MALE)
hair_style = next_list_item(hair_style, GLOB.hair_styles_male_list)
hairstyle = next_list_item(hairstyle, GLOB.hairstyles_male_list)
else if(gender == FEMALE)
hair_style = next_list_item(hair_style, GLOB.hair_styles_female_list)
hairstyle = next_list_item(hairstyle, GLOB.hairstyles_female_list)
else
hair_style = next_list_item(hair_style, GLOB.hair_styles_list)
hairstyle = next_list_item(hairstyle, GLOB.hairstyles_list)
if("previous_hair_style")
if("previous_hairstyle")
if (gender == MALE)
hair_style = previous_list_item(hair_style, GLOB.hair_styles_male_list)
hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_male_list)
else if(gender == FEMALE)
hair_style = previous_list_item(hair_style, GLOB.hair_styles_female_list)
hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_female_list)
else
hair_style = previous_list_item(hair_style, GLOB.hair_styles_list)
hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_list)
if("facial")
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference","#"+facial_hair_color) as color|null
if(new_facial)
facial_hair_color = sanitize_hexcolor(new_facial)
if("facial_hair_style")
var/new_facial_hair_style
if("facial_hairstyle")
var/new_facial_hairstyle
if(gender == MALE)
new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_male_list
new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_male_list
else if(gender == FEMALE)
new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_female_list
new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_female_list
else
new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_list
if(new_facial_hair_style)
facial_hair_style = new_facial_hair_style
new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_list
if(new_facial_hairstyle)
facial_hairstyle = new_facial_hairstyle
if("next_facehair_style")
if("next_facehairstyle")
if (gender == MALE)
facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list)
facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_male_list)
else if(gender == FEMALE)
facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list)
facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_female_list)
else
facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_list)
facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_list)
if("previous_facehair_style")
if("previous_facehairstyle")
if (gender == MALE)
facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list)
facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_male_list)
else if (gender == FEMALE)
facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list)
facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_female_list)
else
facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_list)
facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_list)
if("underwear")
var/new_underwear
@@ -1207,6 +1227,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/temp_hsv = RGBtoHSV(features["mcolor"])
if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
features["mcolor"] = pref_species.default_color
if(randomise[RANDOM_NAME])
real_name = pref_species.random_name(gender)
if("mutant_color")
var/new_mutantcolor = input(user, "Choose your character's alien/mutant color:", "Character Preference","#"+features["mcolor"]) as color|null
@@ -1313,9 +1335,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
asaycolor = new_asaycolor
if("bag")
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist
if(new_backbag)
backbag = new_backbag
var/new_backpack = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backpacklist
if(new_backpack)
backpack = new_backpack
if("suit")
if(jumpsuit_style == PREF_SUIT)
@@ -1388,8 +1410,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
underwear = random_underwear(gender)
undershirt = random_undershirt(gender)
socks = random_socks()
facial_hair_style = random_facial_hair_style(gender)
hair_style = random_hair_style(gender)
facial_hairstyle = random_facial_hairstyle(gender)
hairstyle = random_hairstyle(gender)
if("hotkeys")
hotkeys = !hotkeys
@@ -1440,14 +1462,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
else
be_special += be_special_type
if("rand_species")
be_random_species = !be_random_species
if("name")
be_random_name = !be_random_name
if("all")
be_random_body = !be_random_body
if("toggle_random")
var/random_type = href_list["random_type"]
if(randomise[random_type])
randomise -= random_type
else
randomise[random_type] = TRUE
if("hear_midis")
toggles ^= SOUND_MIDI
@@ -1529,18 +1549,17 @@ GLOBAL_LIST_EMPTY(preferences_datums)
ShowChoices(user)
return 1
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1, roundstart_checks = TRUE)
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1, roundstart_checks = TRUE, character_setup = FALSE)
if(be_random_species)
be_random_name = 1
if(randomise[RANDOM_SPECIES] && !character_setup)
random_species()
if(be_random_name)
real_name = pref_species.random_name(gender)
if(be_random_body)
if(randomise[RANDOM_BODY] && !character_setup)
random_character(gender)
if(randomise[RANDOM_NAME] && !character_setup)
real_name = pref_species.random_name(gender)
if(roundstart_checks)
if(CONFIG_GET(flag/humans_need_surnames) && (pref_species.id == "human"))
var/firstspace = findtext(real_name, " ")
@@ -1566,14 +1585,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
character.facial_hair_color = facial_hair_color
character.skin_tone = skin_tone
character.hair_style = hair_style
character.facial_hair_style = facial_hair_style
character.hairstyle = hairstyle
character.facial_hairstyle = facial_hairstyle
character.underwear = underwear
character.underwear_color = underwear_color
character.undershirt = undershirt
character.socks = socks
character.backbag = backbag
character.backpack = backpack
character.jumpsuit_style = jumpsuit_style
+37 -30
View File
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 24
#define SAVEFILE_VERSION_MAX 25
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -112,6 +112,20 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(current_version < 24)
if (!(underwear in GLOB.underwear_list))
underwear = "Nude"
if(current_version < 25)
randomise = list(RANDOM_UNDERWEAR = TRUE, RANDOM_UNDERWEAR_COLOR = TRUE, RANDOM_UNDERSHIRT = TRUE, RANDOM_SOCKS = TRUE, RANDOM_BACKPACK = TRUE, RANDOM_JUMPSUIT_STYLE = TRUE, RANDOM_HAIRSTYLE = TRUE, RANDOM_HAIR_COLOR = TRUE, RANDOM_FACIAL_HAIRSTYLE = TRUE, RANDOM_FACIAL_HAIR_COLOR = TRUE, RANDOM_SKIN_TONE = TRUE, RANDOM_EYE_COLOR = TRUE)
if(S["name_is_always_random"] == 1)
randomise[RANDOM_NAME] = TRUE
if(S["body_is_always_random"] == 1)
randomise[RANDOM_BODY] = TRUE
if(S["species_is_always_random"] == 1)
randomise[RANDOM_SPECIES] = TRUE
if(S["backbag"])
S["backbag"] >> backpack
if(S["hair_style_name"])
S["hair_style_name"] >> hairstyle
if(S["facial_style_name"])
S["facial_style_name"] >> facial_hairstyle
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
@@ -284,24 +298,22 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Character
S["real_name"] >> real_name
S["name_is_always_random"] >> be_random_name
S["body_is_always_random"] >> be_random_body
S["species_is_always_random"] >> be_random_species
S["gender"] >> gender
S["age"] >> age
S["hair_color"] >> hair_color
S["facial_hair_color"] >> facial_hair_color
S["eye_color"] >> eye_color
S["skin_tone"] >> skin_tone
S["hair_style_name"] >> hair_style
S["facial_style_name"] >> facial_hair_style
S["hairstyle_name"] >> hairstyle
S["facial_style_name"] >> facial_hairstyle
S["underwear"] >> underwear
S["underwear_color"] >> underwear_color
S["undershirt"] >> undershirt
S["socks"] >> socks
S["backbag"] >> backbag
S["backpack"] >> backpack
S["jumpsuit_style"] >> jumpsuit_style
S["uplink_loc"] >> uplink_spawn_loc
S["randomise"] >> randomise
S["feature_mcolor"] >> features["mcolor"]
S["feature_ethcolor"] >> features["ethcolor"]
S["feature_lizard_tail"] >> features["tail_lizard"]
@@ -359,27 +371,24 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(!features["ethcolor"] || features["ethcolor"] == "#000")
features["ethcolor"] = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)]
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
be_random_body = sanitize_integer(be_random_body, 0, 1, initial(be_random_body))
be_random_species = sanitize_integer(be_random_species, 0, 1, initial(be_random_species))
randomise = SANITIZE_LIST(randomise)
if(gender == MALE)
hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_male_list)
facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_male_list)
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_male_list)
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_male_list)
underwear = sanitize_inlist(underwear, GLOB.underwear_m)
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m)
else if(gender == FEMALE)
hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_female_list)
facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_female_list)
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_female_list)
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_female_list)
underwear = sanitize_inlist(underwear, GLOB.underwear_f)
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f)
else
hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_list)
facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_list)
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_list)
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_list)
underwear = sanitize_inlist(underwear, GLOB.underwear_list)
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list)
socks = sanitize_inlist(socks, GLOB.socks_list)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
hair_color = sanitize_hexcolor(hair_color, 3, 0)
@@ -387,7 +396,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
underwear_color = sanitize_hexcolor(underwear_color, 3, 0)
eye_color = sanitize_hexcolor(eye_color, 3, 0)
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))
backpack = sanitize_inlist(backpack, GLOB.backpacklist, initial(backpack))
jumpsuit_style = sanitize_inlist(jumpsuit_style, GLOB.jumpsuitlist, initial(jumpsuit_style))
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc))
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
@@ -426,24 +435,22 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Character
WRITE_FILE(S["real_name"] , real_name)
WRITE_FILE(S["name_is_always_random"] , be_random_name)
WRITE_FILE(S["body_is_always_random"] , be_random_body)
WRITE_FILE(S["species_is_always_random"] , be_random_species)
WRITE_FILE(S["gender"] , gender)
WRITE_FILE(S["age"] , age)
WRITE_FILE(S["gender"] , gender)
WRITE_FILE(S["age"] , age)
WRITE_FILE(S["hair_color"] , hair_color)
WRITE_FILE(S["facial_hair_color"] , facial_hair_color)
WRITE_FILE(S["facial_hair_color"] , facial_hair_color)
WRITE_FILE(S["eye_color"] , eye_color)
WRITE_FILE(S["skin_tone"] , skin_tone)
WRITE_FILE(S["hair_style_name"] , hair_style)
WRITE_FILE(S["facial_style_name"] , facial_hair_style)
WRITE_FILE(S["hairstyle_name"] , hairstyle)
WRITE_FILE(S["facial_style_name"] , facial_hairstyle)
WRITE_FILE(S["underwear"] , underwear)
WRITE_FILE(S["underwear_color"] , underwear_color)
WRITE_FILE(S["underwear_color"] , underwear_color)
WRITE_FILE(S["undershirt"] , undershirt)
WRITE_FILE(S["socks"] , socks)
WRITE_FILE(S["backbag"] , backbag)
WRITE_FILE(S["jumpsuit_style"] , jumpsuit_style)
WRITE_FILE(S["socks"] , socks)
WRITE_FILE(S["backpack"] , backpack)
WRITE_FILE(S["jumpsuit_style"] , jumpsuit_style)
WRITE_FILE(S["uplink_loc"] , uplink_spawn_loc)
WRITE_FILE(S["randomise"] , randomise)
WRITE_FILE(S["species"] , pref_species.id)
WRITE_FILE(S["feature_mcolor"] , features["mcolor"])
WRITE_FILE(S["feature_ethcolor"] , features["ethcolor"])
+1 -1
View File
@@ -221,7 +221,7 @@
user.visible_message("<span class='suicide'>[user] is donning [src]! It looks like [user.p_theyre()] trying to be nice to girls.</span>")
user.say("M'lady.", forced = "fedora suicide")
sleep(10)
H.facial_hair_style = "Neckbeard"
H.facial_hairstyle = "Neckbeard"
return(BRUTELOSS)
/obj/item/clothing/head/sombrero
+8 -8
View File
@@ -192,7 +192,7 @@
item_state = "pwig"
flags_inv = HIDEHAIR
color = "#000"
var/hair_style = "Very Long Hair"
var/hairstyle = "Very Long Hair"
var/adjustablecolor = TRUE //can color be changed manually?
/obj/item/clothing/head/wig/Initialize(mapload)
@@ -200,7 +200,7 @@
update_icon()
/obj/item/clothing/head/wig/update_icon()
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
var/datum/sprite_accessory/S = GLOB.hairstyles_list[hairstyle]
if(!S)
icon = 'icons/obj/clothing/hats.dmi'
icon_state = "pwig"
@@ -211,7 +211,7 @@
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, file2use)
. = list()
if(!isinhands)
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
var/datum/sprite_accessory/S = GLOB.hairstyles_list[hairstyle]
if(!S)
return
var/mutable_appearance/M = mutable_appearance(S.icon, S.icon_state,layer = -HAIR_LAYER)
@@ -220,18 +220,18 @@
. += M
/obj/item/clothing/head/wig/attack_self(mob/user)
var/new_style = input(user, "Select a hair style", "Wig Styling") as null|anything in (GLOB.hair_styles_list - "Bald")
var/new_style = input(user, "Select a hairstyle", "Wig Styling") as null|anything in (GLOB.hairstyles_list - "Bald")
if(!user.canUseTopic(src, BE_CLOSE))
return
if(new_style && new_style != hair_style)
hair_style = new_style
if(new_style && new_style != hairstyle)
hairstyle = new_style
user.visible_message("<span class='notice'>[user] changes \the [src]'s hairstyle to [new_style].</span>", "<span class='notice'>You change \the [src]'s hairstyle to [new_style].</span>")
if(adjustablecolor)
color = input(usr,"","Choose Color",color) as color|null
update_icon()
/obj/item/clothing/head/wig/random/Initialize(mapload)
hair_style = pick(GLOB.hair_styles_list - "Bald") //Don't want invisible wig
hairstyle = pick(GLOB.hairstyles_list - "Bald") //Don't want invisible wig
color = "#[random_short_color()]"
. = ..()
@@ -243,7 +243,7 @@
custom_price = 25
/obj/item/clothing/head/wig/natural/Initialize(mapload)
hair_style = pick(GLOB.hair_styles_list - "Bald")
hairstyle = pick(GLOB.hairstyles_list - "Bald")
. = ..()
/obj/item/clothing/head/wig/natural/equipped(mob/living/carbon/human/user, slot)
+2 -2
View File
@@ -19,8 +19,8 @@
H.mind.assigned_role = "Santa"
H.mind.special_role = "Santa"
H.hair_style = "Long Hair 3"
H.facial_hair_style = "Beard (Full)"
H.hairstyle = "Long Hair 3"
H.facial_hairstyle = "Beard (Full)"
H.hair_color = "FFF"
H.facial_hair_color = "FFF"
H.update_hair()
+1 -1
View File
@@ -175,7 +175,7 @@
var/pda_slot = SLOT_BELT
/datum/outfit/job/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
switch(H.backbag)
switch(H.backpack)
if(GBACKPACK)
back = /obj/item/storage/backpack //Grey backpack
if(GSATCHEL)
@@ -1,29 +1,50 @@
//The mob should have a gender you want before running this proc. Will run fine without H
/datum/preferences/proc/random_character(gender_override)
if(gender_override)
if(randomise[RANDOM_SPECIES])
random_species()
else if(randomise[RANDOM_NAME])
real_name = pref_species.random_name(gender,1)
if(gender_override && !(randomise[RANDOM_GENDER]))
gender = gender_override
else
gender = pick(MALE,FEMALE)
underwear = random_underwear(gender)
underwear_color = random_short_color()
undershirt = random_undershirt(gender)
socks = random_socks()
skin_tone = random_skin_tone()
hair_style = random_hair_style(gender)
facial_hair_style = random_facial_hair_style(gender)
hair_color = random_short_color()
facial_hair_color = hair_color
eye_color = random_eye_color()
if(randomise[RANDOM_AGE])
age = rand(AGE_MIN,AGE_MAX)
if(randomise[RANDOM_UNDERWEAR])
underwear = random_underwear(gender)
if(randomise[RANDOM_UNDERWEAR_COLOR])
underwear_color = random_short_color()
if(randomise[RANDOM_UNDERSHIRT])
undershirt = random_undershirt(gender)
if(randomise[RANDOM_SOCKS])
socks = random_socks()
if(randomise[RANDOM_BACKPACK])
backpack = random_backpack()
if(randomise[RANDOM_JUMPSUIT_STYLE])
jumpsuit_style = pick(GLOB.jumpsuitlist)
if(randomise[RANDOM_HAIRSTYLE])
hairstyle = random_hairstyle(gender)
if(randomise[RANDOM_FACIAL_HAIRSTYLE])
facial_hairstyle = random_facial_hairstyle(gender)
if(randomise[RANDOM_HAIR_COLOR])
hair_color = random_short_color()
if(randomise[RANDOM_FACIAL_HAIR_COLOR])
facial_hair_color = random_short_color()
if(randomise[RANDOM_SKIN_TONE])
skin_tone = random_skin_tone()
if(randomise[RANDOM_EYE_COLOR])
eye_color = random_eye_color()
if(!pref_species)
var/rando_race = pick(GLOB.roundstart_races)
pref_species = new rando_race()
features = random_features()
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/random_species()
var/random_species_type = GLOB.species_list[pick(GLOB.roundstart_races)]
pref_species = new random_species_type
if(randomise[RANDOM_NAME])
real_name = pref_species.random_name(gender,1)
/datum/preferences/proc/update_preview_icon()
// Determine what job is marked as 'High' priority, and dress them up as such.
@@ -45,7 +66,7 @@
// Set up the dummy for its photoshoot
var/mob/living/carbon/human/dummy/mannequin = generate_or_wait_for_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES)
copy_to(mannequin)
copy_to(mannequin, 1, TRUE, TRUE)
if(previewJob)
mannequin.job = previewJob.title
@@ -53,4 +74,4 @@
COMPILE_OVERLAYS(mannequin)
parent.show_character_previews(new /mutable_appearance(mannequin))
unset_busy_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES)
unset_busy_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES)
+13 -13
View File
@@ -37,10 +37,10 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
var/ghost_orbit = GHOST_ORBIT_CIRCLE
//These variables store hair data if the ghost originates from a species with head and/or facial hair.
var/hair_style
var/hairstyle
var/hair_color
var/mutable_appearance/hair_overlay
var/facial_hair_style
var/facial_hairstyle
var/facial_hair_color
var/mutable_appearance/facial_hair_overlay
@@ -98,10 +98,10 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(ishuman(body))
var/mob/living/carbon/human/body_human = body
if(HAIR in body_human.dna.species.species_traits)
hair_style = body_human.hair_style
hairstyle = body_human.hairstyle
hair_color = brighten_color(body_human.hair_color)
if(FACEHAIR in body_human.dna.species.species_traits)
facial_hair_style = body_human.facial_hair_style
facial_hairstyle = body_human.facial_hairstyle
facial_hair_color = brighten_color(body_human.facial_hair_color)
update_icon()
@@ -206,16 +206,16 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(ghost_accs == GHOST_ACCS_FULL && icon_state in GLOB.ghost_forms_with_accessories_list) //check if this form supports accessories and if the client wants to show them
var/datum/sprite_accessory/S
if(facial_hair_style)
S = GLOB.facial_hair_styles_list[facial_hair_style]
if(facial_hairstyle)
S = GLOB.facial_hairstyles_list[facial_hairstyle]
if(S)
facial_hair_overlay = mutable_appearance(S.icon, "[S.icon_state]", -HAIR_LAYER)
if(facial_hair_color)
facial_hair_overlay.color = "#" + facial_hair_color
facial_hair_overlay.alpha = 200
add_overlay(facial_hair_overlay)
if(hair_style)
S = GLOB.hair_styles_list[hair_style]
if(hairstyle)
S = GLOB.hairstyles_list[hairstyle]
if(S)
hair_overlay = mutable_appearance(S.icon, "[S.icon_state]", -HAIR_LAYER)
if(hair_color)
@@ -351,7 +351,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/response = alert(src, "Are you sure you want to prevent (almost) all means of resuscitation? This cannot be undone. ","Are you sure you want to stay dead?","DNR","Save Me")
if(response != "DNR")
return
return
can_reenter_corpse = FALSE
to_chat(src, "You can no longer be brought back into your body.")
@@ -738,16 +738,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if((!client) || (!client.prefs))
return
if(client.prefs.be_random_name)
if(client.prefs.randomise[RANDOM_NAME])
client.prefs.real_name = random_unique_name(gender)
if(client.prefs.be_random_body)
if(client.prefs.randomise[RANDOM_BODY])
client.prefs.random_character(gender)
if(HAIR in client.prefs.pref_species.species_traits)
hair_style = client.prefs.hair_style
hairstyle = client.prefs.hairstyle
hair_color = brighten_color(client.prefs.hair_color)
if(FACEHAIR in client.prefs.pref_species.species_traits)
facial_hair_style = client.prefs.facial_hair_style
facial_hairstyle = client.prefs.facial_hairstyle
facial_hair_color = brighten_color(client.prefs.facial_hair_color)
update_icon()
@@ -597,10 +597,10 @@
//Used for new human mobs created by cloning/goleming/podding
/mob/living/carbon/human/proc/set_cloned_appearance()
if(gender == MALE)
facial_hair_style = "Full Beard"
facial_hairstyle = "Full Beard"
else
facial_hair_style = "Shaved"
hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
facial_hairstyle = "Shaved"
hairstyle = pick("Bedhead", "Bedhead 2", "Bedhead 3")
underwear = "Nude"
update_body()
update_hair()
@@ -614,8 +614,8 @@
if(prob(min(acidpwr*acid_volume/10, 90))) //Applies disfigurement
affecting.receive_damage(acidity, 2*acidity)
emote("scream")
facial_hair_style = "Shaved"
hair_style = "Bald"
facial_hairstyle = "Shaved"
hairstyle = "Bald"
update_hair()
ADD_TRAIT(src, TRAIT_DISFIGURED, TRAIT_GENERIC)
@@ -8,11 +8,11 @@
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
//Hair colour and style
var/hair_color = "000"
var/hair_style = "Bald"
var/hairstyle = "Bald"
//Facial hair colour and style
var/facial_hair_color = "000"
var/facial_hair_style = "Shaved"
var/facial_hairstyle = "Shaved"
//Eye colour
var/eye_color = "000"
@@ -28,7 +28,7 @@
var/underwear_color = "000"
var/undershirt = "Nude" //Which undershirt the player wants
var/socks = "Nude" //Which socks the player wants
var/backbag = DBACKPACK //Which backpack type the player has chosen.
var/backpack = DBACKPACK //Which backpack type the player has chosen.
var/jumpsuit_style = PREF_SUIT //suit/skirt
//Equipment slots
@@ -391,8 +391,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(M.flags_inv & HIDEFACIALHAIR)
facialhair_hidden = TRUE
if(H.facial_hair_style && (FACEHAIR in species_traits) && (!facialhair_hidden || dynamic_fhair_suffix))
S = GLOB.facial_hair_styles_list[H.facial_hair_style]
if(H.facial_hairstyle && (FACEHAIR in species_traits) && (!facialhair_hidden || dynamic_fhair_suffix))
S = GLOB.facial_hairstyles_list[H.facial_hairstyle]
if(S)
//List of all valid dynamic_fhair_suffixes
@@ -450,8 +450,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
hair_overlay.icon = 'icons/mob/human_face.dmi'
hair_overlay.icon_state = "debrained"
else if(H.hair_style && (HAIR in species_traits))
S = GLOB.hair_styles_list[H.hair_style]
else if(H.hairstyle && (HAIR in species_traits))
S = GLOB.hairstyles_list[H.hairstyle]
if(S)
//List of all valid dynamic_hair_suffixes
@@ -1118,15 +1118,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.domutcheck()
if(radiation > RAD_MOB_HAIRLOSS)
if(prob(15) && !(H.hair_style == "Bald") && (HAIR in species_traits))
if(prob(15) && !(H.hairstyle == "Bald") && (HAIR in species_traits))
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...</span>")
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
/datum/species/proc/go_bald(mob/living/carbon/human/H)
if(QDELETED(H)) //may be called from a timer
return
H.facial_hair_style = "Shaved"
H.hair_style = "Bald"
H.facial_hairstyle = "Shaved"
H.hairstyle = "Bald"
H.update_hair()
////////////////
+19 -19
View File
@@ -11,8 +11,8 @@
/obj/effect/mob_spawn/human/corpse/syndicatesoldier
name = "Syndicate Operative"
id_job = "Operative"
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
outfit = /datum/outfit/syndicatesoldiercorpse
/datum/outfit/syndicatesoldiercorpse
@@ -30,8 +30,8 @@
/obj/effect/mob_spawn/human/corpse/syndicatecommando
name = "Syndicate Commando"
id_job = "Operative"
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
outfit = /datum/outfit/syndicatecommandocorpse
/datum/outfit/syndicatecommandocorpse
@@ -50,8 +50,8 @@
/obj/effect/mob_spawn/human/corpse/syndicatestormtrooper
name = "Syndicate Stormtrooper"
id_job = "Operative"
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
outfit = /datum/outfit/syndicatestormtroopercorpse
/datum/outfit/syndicatestormtroopercorpse
@@ -70,15 +70,15 @@
roundstart = FALSE
instant = TRUE
skin_tone = "caucasian1"
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
/obj/effect/mob_spawn/human/corpse/pirate
name = "Pirate"
skin_tone = "caucasian1" //all pirates are white because it's easier that way
outfit = /datum/outfit/piratecorpse
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
/datum/outfit/piratecorpse
name = "Pirate Corpse"
@@ -101,8 +101,8 @@
/obj/effect/mob_spawn/human/corpse/russian
name = "Russian"
outfit = /datum/outfit/russiancorpse
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
/datum/outfit/russiancorpse
name = "Russian Corpse"
@@ -152,8 +152,8 @@
/obj/effect/mob_spawn/human/corpse/wizard
name = "Space Wizard Corpse"
outfit = /datum/outfit/wizardcorpse
hair_style = "Bald"
facial_hair_style = "Long Beard"
hairstyle = "Bald"
facial_hairstyle = "Long Beard"
skin_tone = "caucasian1"
/datum/outfit/wizardcorpse
@@ -169,8 +169,8 @@
id_job = "Private Security Force"
id_access = "Security Officer"
outfit = /datum/outfit/nanotrasensoldiercorpse2
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
/datum/outfit/nanotrasensoldiercorpse2
name = "NT Private Security Officer Corpse"
@@ -188,8 +188,8 @@
name = "The Cat Surgeon"
id_job = "Cat Surgeon"
id_access_list = list(ACCESS_AWAY_GENERAL, ACCESS_AWAY_MAINT)
hair_style = "Cut Hair"
facial_hair_style = "Watson Mustache"
hairstyle = "Cut Hair"
facial_hairstyle = "Watson Mustache"
skin_tone = "caucasian1"
outfit = /datum/outfit/cat_butcher
@@ -207,7 +207,7 @@
/obj/effect/mob_spawn/human/corpse/bee_terrorist
name = "BLF Operative"
outfit = /datum/outfit/bee_terrorist
/datum/outfit/bee_terrorist
name = "BLF Operative"
uniform = /obj/item/clothing/under/color/yellow
@@ -31,10 +31,10 @@
movement_type = FLYING
pressure_resistance = 300
gold_core_spawnable = NO_SPAWN //too spooky for science
var/ghost_hair_style
var/ghost_hairstyle
var/ghost_hair_color
var/mutable_appearance/ghost_hair
var/ghost_facial_hair_style
var/ghost_facial_hairstyle
var/ghost_facial_hair_color
var/mutable_appearance/ghost_facial_hair
var/random = TRUE //if you want random names for ghosts or not
@@ -52,13 +52,13 @@
/mob/living/simple_animal/hostile/retaliate/ghost/proc/give_hair()
if(ghost_hair_style != null)
ghost_hair = mutable_appearance('icons/mob/human_face.dmi', "hair_[ghost_hair_style]", -HAIR_LAYER)
if(ghost_hairstyle != null)
ghost_hair = mutable_appearance('icons/mob/human_face.dmi', "hair_[ghost_hairstyle]", -HAIR_LAYER)
ghost_hair.alpha = 200
ghost_hair.color = ghost_hair_color
add_overlay(ghost_hair)
if(ghost_facial_hair_style != null)
ghost_facial_hair = mutable_appearance('icons/mob/human_face.dmi', "facial_[ghost_facial_hair_style]", -HAIR_LAYER)
if(ghost_facial_hairstyle != null)
ghost_facial_hair = mutable_appearance('icons/mob/human_face.dmi', "facial_[ghost_facial_hairstyle]", -HAIR_LAYER)
ghost_facial_hair.alpha = 200
ghost_facial_hair.color = ghost_facial_hair_color
add_overlay(ghost_facial_hair)
@@ -31,7 +31,7 @@
/mob/living/simple_animal/hostile/zombie/proc/setup_visuals()
var/datum/preferences/dummy_prefs = new
dummy_prefs.pref_species = new /datum/species/zombie
dummy_prefs.be_random_body = TRUE
dummy_prefs.randomise[RANDOM_BODY] = TRUE
var/datum/job/J = SSjob.GetJob(zombiejob)
var/datum/outfit/O
if(J.outfit)
@@ -2011,7 +2011,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(N.age > 100)
N.become_nearsighted(type)
if(N.gender == MALE)
N.facial_hair_style = "Beard (Very Long)"
N.facial_hairstyle = "Beard (Very Long)"
N.update_hair()
if(N.age > 969) //Best not let people get older than this or i might incur G-ds wrath
@@ -406,8 +406,8 @@
if(ishuman(M))
var/mob/living/carbon/human/N = M
N.hair_style = "Spiky"
N.facial_hair_style = "Shaved"
N.hairstyle = "Spiky"
N.facial_hairstyle = "Shaved"
N.facial_hair_color = "000"
N.hair_color = "000"
if(!(HAIR in N.dna.species.species_traits)) //No hair? No problem!
@@ -1450,10 +1450,10 @@
if(method == TOUCH || method == VAPOR)
if(M && ishuman(M))
var/mob/living/carbon/human/H = M
var/datum/sprite_accessory/hair/picked_hair = pick(GLOB.hair_styles_list)
var/datum/sprite_accessory/facial_hair/picked_beard = pick(GLOB.facial_hair_styles_list)
H.hair_style = picked_hair
H.facial_hair_style = picked_beard
var/datum/sprite_accessory/hair/picked_hair = pick(GLOB.hairstyles_list)
var/datum/sprite_accessory/facial_hair/picked_beard = pick(GLOB.facial_hairstyles_list)
H.hairstyle = picked_hair
H.facial_hairstyle = picked_beard
H.update_hair()
/datum/reagent/concentrated_barbers_aid
@@ -1467,8 +1467,8 @@
if(method == TOUCH || method == VAPOR)
if(M && ishuman(M))
var/mob/living/carbon/human/H = M
H.hair_style = "Very Long Hair"
H.facial_hair_style = "Beard (Very Long)"
H.hairstyle = "Very Long Hair"
H.facial_hairstyle = "Beard (Very Long)"
H.update_hair()
/datum/reagent/saltpetre
@@ -329,9 +329,9 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
H.hair_color = hair_color
H.hair_style = hair_style
H.hairstyle = hairstyle
H.facial_hair_color = facial_hair_color
H.facial_hair_style = facial_hair_style
H.facial_hairstyle = facial_hairstyle
H.lip_style = lip_style
H.lip_color = lip_color
if(real_name)
+13 -13
View File
@@ -24,11 +24,11 @@
var/real_name = "" //Replacement name
//Hair colour and style
var/hair_color = "000"
var/hair_style = "Bald"
var/hairstyle = "Bald"
var/hair_alpha = 255
//Facial hair colour and style
var/facial_hair_color = "000"
var/facial_hair_style = "Shaved"
var/facial_hairstyle = "Shaved"
//Eye Colouring
var/lip_style = null
@@ -133,8 +133,8 @@
real_name = C.real_name
if(HAS_TRAIT(C, TRAIT_HUSK))
real_name = "Unknown"
hair_style = "Bald"
facial_hair_style = "Shaved"
hairstyle = "Bald"
facial_hairstyle = "Shaved"
lip_style = null
else if(!animal_origin)
@@ -142,8 +142,8 @@
var/datum/species/S = H.dna.species
//Facial hair
if(H.facial_hair_style && (FACEHAIR in S.species_traits))
facial_hair_style = H.facial_hair_style
if(H.facial_hairstyle && (FACEHAIR in S.species_traits))
facial_hairstyle = H.facial_hairstyle
if(S.hair_color)
if(S.hair_color == "mutcolor")
facial_hair_color = H.dna.features["mcolor"]
@@ -153,12 +153,12 @@
facial_hair_color = H.facial_hair_color
hair_alpha = S.hair_alpha
else
facial_hair_style = "Shaved"
facial_hairstyle = "Shaved"
facial_hair_color = "000"
hair_alpha = 255
//Hair
if(H.hair_style && (HAIR in S.species_traits))
hair_style = H.hair_style
if(H.hairstyle && (HAIR in S.species_traits))
hairstyle = H.hairstyle
if(S.hair_color)
if(S.hair_color == "mutcolor")
hair_color = H.dna.features["mcolor"]
@@ -168,7 +168,7 @@
hair_color = H.hair_color
hair_alpha = S.hair_alpha
else
hair_style = "Bald"
hairstyle = "Bald"
hair_color = "000"
hair_alpha = initial(hair_alpha)
// lipstick
@@ -197,8 +197,8 @@
if(status != BODYPART_ROBOTIC) //having a robotic head hides certain features.
//facial hair
if(facial_hair_style)
var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facial_hair_style]
if(facial_hairstyle)
var/datum/sprite_accessory/S = GLOB.facial_hairstyles_list[facial_hairstyle]
if(S)
var/image/facial_overlay = image(S.icon, "[S.icon_state]", -HAIR_LAYER, SOUTH)
facial_overlay.color = "#" + facial_hair_color
@@ -219,7 +219,7 @@
debrain_overlay.icon_state = "debrained"
. += debrain_overlay
else
var/datum/sprite_accessory/S2 = GLOB.hair_styles_list[hair_style]
var/datum/sprite_accessory/S2 = GLOB.hairstyles_list[hairstyle]
if(S2)
var/image/hair_overlay = image(S2.icon, "[S2.icon_state]", -HAIR_LAYER, SOUTH)
hair_overlay.color = "#" + hair_color