First commit of manual port of BS12

#13042
and
#13086
This commit is contained in:
Jon
2016-05-29 00:56:11 +01:00
parent 9fba5882d7
commit 21f898e047
20 changed files with 215 additions and 639 deletions

View File

@@ -33,6 +33,8 @@ var/global/list/language_keys[0] // Table of say codes for all languages
var/global/list/whitelisted_species = list("Human") // Species that require a whitelist check.
var/global/list/playable_species = list("Human") // A list of ALL playable species, whitelisted, latejoin or otherwise.
var/list/mannequins_
// Posters
var/global/list/poster_designs = list()
@@ -137,6 +139,14 @@ var/global/list/string_slot_flags = list(
"holster" = SLOT_HOLSTER
)
/proc/get_mannequin(var/ckey)
if(!mannequins_)
mannequins_ = new()
. = mannequins_[ckey]
if(!.)
. = new/mob/living/carbon/human/dummy/mannequin()
mannequins_[ckey] = .
//////////////////////////
/////Initial Building/////
//////////////////////////

View File

@@ -38,3 +38,5 @@
#define isslime(A) istype(A, /mob/living/carbon/slime)
#define isxeno(A) istype(A, /mob/living/simple_animal/xeno)
#define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")

View File

@@ -70,7 +70,7 @@ var/datum/antagonist/deathsquad/deathsquad
var/syndicate_commando_name = pick(last_names)
var/datum/preferences/A = new() //Randomize appearance for the commando.
A.randomize_appearance_for(player.current)
A.randomize_appearance_and_body_for(player.current)
player.name = "[syndicate_commando_rank] [syndicate_commando_name]"
player.current.name = player.name

View File

@@ -14,7 +14,7 @@
alt_titles = list("Counselor")
equip(var/mob/living/carbon/human/H)
equip(var/mob/living/carbon/human/H, var/alt_title, var/ask_questions = TRUE)
if(!H) return 0
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
@@ -22,6 +22,10 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
if(!ask_questions)
return 1
spawn(0)
var/religion_name = "Christianity"
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)
@@ -150,3 +154,6 @@
feedback_set_details("religion_deity","[new_deity]")
feedback_set_details("religion_book","[new_book_style]")
return 1
/datum/job/chaplain/equip_preview(var/mob/living/carbon/human/H, var/alt_title)
return equip(H, alt_title, FALSE)

View File

@@ -71,8 +71,8 @@
H << "<span class='notice'><b>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</b></span>"
// overrideable separately so AIs/borgs can have cardborg hats without unneccessary new()/del()
/datum/job/proc/equip_preview(mob/living/carbon/human/H)
return equip(H)
/datum/job/proc/equip_preview(mob/living/carbon/human/H, var/alt_title)
. = equip(H, alt_title)
/datum/job/proc/get_access()
if(!config || config.jobs_have_minimal_access)
@@ -104,3 +104,6 @@
/datum/job/proc/is_position_available()
return (current_positions < total_positions) || (total_positions == -1)
/datum/job/proc/has_alt_title(var/mob/H, var/supplied_title, var/desired_title)
return (supplied_title == desired_title) || (H.mind && H.mind.role_alt_title == desired_title)

View File

@@ -23,7 +23,7 @@
minimal_player_age = 10
ideal_character_age = 50
equip(var/mob/living/carbon/human/H)
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_l_ear)
switch(H.backbag)
@@ -53,7 +53,7 @@
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_virology, access_eva)
alt_titles = list("Surgeon","Emergency Physician","Nurse","Virologist")
equip(var/mob/living/carbon/human/H)
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
@@ -62,35 +62,33 @@
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if (H.mind.role_alt_title)
switch(H.mind.role_alt_title)
if("Emergency Physician")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
if("Surgeon")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/blue(H), slot_head)
if("Virologist")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/vir(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if("Medical Doctor")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
if("Nurse")
if(H.gender == FEMALE)
if(prob(50))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nurse(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
if(has_alt_title(H, alt_title,"Emergency Physician"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Surgeon"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/blue(H), slot_head)
else if(has_alt_title(H, alt_title,"Virologist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/vir(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
else if(has_alt_title(H, alt_title,"Medical Doctor"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Nurse"))
if(H.gender == FEMALE)
if(prob(50))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nurse(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
@@ -176,19 +174,17 @@
minimal_access = list(access_medical, access_medical_equip, access_psychiatrist)
alt_titles = list("Psychologist")
equip(var/mob/living/carbon/human/H)
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if (H.mind.role_alt_title)
switch(H.mind.role_alt_title)
if("Psychiatrist")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych(H), slot_w_uniform)
if("Psychologist")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform)
if(has_alt_title(H, alt_title,"Psychiatrist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych(H), slot_w_uniform)
else if(has_alt_title(H, alt_title,"Psychologist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
@@ -211,7 +207,7 @@
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
alt_titles = list("Emergency Medical Technician")
equip(var/mob/living/carbon/human/H)
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
@@ -220,14 +216,12 @@
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if (H.mind.role_alt_title)
switch(H.mind.role_alt_title)
if("Emergency Medical Technician")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
if("Paramedic")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
if(has_alt_title(H, alt_title,"Emergency Medical Technician"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Paramedic"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)

View File

@@ -98,7 +98,7 @@
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_eva, access_external_airlocks)
economic_modifier = 5
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
@@ -114,7 +114,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician")
if(has_alt_title(H, alt_title,"Forensic Technician"))
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/crimekit, slot_r_hand)
else

View File

@@ -29,6 +29,7 @@
/datum/job/ai/equip_preview(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/straight_jacket(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head)
return 1
/datum/job/cyborg
title = "Cyborg"
@@ -60,3 +61,4 @@
/datum/job/cyborg/equip_preview(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/cardborg(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head)
return 1

View File

@@ -234,9 +234,9 @@ Ccomp's first proc.
var/list/mobs = list()
var/list/ghosts = list()
var/list/sortmob = sortAtom(mob_list) // get the mob list.
var/list/sortmob = sortAtom(mob_list) // get the mob list.
var/any=0
for(var/mob/observer/dead/M in sortmob)
for(var/mob/observer/dead/M in sortmob)
mobs.Add(M) //filter it where it's only ghosts
any = 1 //if no ghosts show up, any will just be 0
if(!any)
@@ -388,7 +388,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
new_character.gender = pick(MALE,FEMALE)
var/datum/preferences/A = new()
A.randomize_appearance_for(new_character)
A.randomize_appearance_and_body_for(new_character)
new_character.real_name = G_found.real_name
if(!new_character.real_name)

View File

@@ -80,7 +80,7 @@ datum/preferences/proc/set_biological_gender(var/gender)
var/new_gender = input(user, "Choose your character's biological gender:", "Character Preference", pref.biological_gender) as null|anything in get_genders()
if(new_gender && CanUseTopic(user))
pref.set_biological_gender(new_gender)
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["id_gender"])
var/new_gender = input(user, "Choose your character's identifying gender:", "Character Preference", pref.identifying_gender) as null|anything in all_genders_define_list

View File

@@ -1,5 +1,8 @@
var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
/datum/preferences
var/dress_mob = TRUE
/datum/category_item/player_setup_item/general/body
name = "Body"
sort_order = 3
@@ -25,6 +28,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
S["disabilities"] >> pref.disabilities
S["organ_data"] >> pref.organ_data
S["rlimb_data"] >> pref.rlimb_data
pref.preview_icon = null
/datum/category_item/player_setup_item/general/body/save_character(var/savefile/S)
S["species"] << pref.species
@@ -74,10 +78,9 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
/datum/category_item/player_setup_item/general/body/content(var/mob/user)
. = list()
pref.update_preview_icon()
if(pref.preview_icon_front && pref.preview_icon_side)
user << browse_rsc(pref.preview_icon_front, "preview_icon.png")
user << browse_rsc(pref.preview_icon_side, "preview_icon2.png")
if(!pref.preview_icon)
pref.update_preview_icon()
user << browse_rsc(pref.preview_icon, "previewicon.png")
var/mob_species = all_species[pref.species]
. += "<table><tr style='vertical-align:top'><td><b>Body</b> "
@@ -167,7 +170,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else
. += "<br><br>"
. += "</td><td><b>Preview</b><br><img src=preview_icon.png height=64 width=64><img src=preview_icon2.png height=64 width=64>"
. += "</td><td><b>Preview</b><br>"
. += "<div class='statusDisplay'><center><img src=previewicon.png width=[pref.preview_icon.Width()] height=[pref.preview_icon.Height()]></center></div>"
. += "<br><a href='?src=\ref[src];toggle_clothing=1'>[pref.dress_mob ? "Hide equipment" : "Show equipment"]</a>"
. += "</td></tr></table>"
. += "<b>Hair</b><br>"
@@ -196,8 +202,8 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/datum/species/mob_species = all_species[pref.species]
if(href_list["random"])
pref.randomize_appearance_for()
return TOPIC_REFRESH
pref.randomize_appearance_and_body_for()
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["blood_type"])
var/new_b_type = input(user, "Choose your character's blood-type:", "Character Preference") as null|anything in valid_bloodtypes
@@ -274,7 +280,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/datum/species/S = all_species[pref.species]
pref.age = max(min(pref.age, S.max_age), S.min_age)
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["hair_color"])
if(!has_flag(mob_species, HAS_HAIR_COLOR))
@@ -284,7 +290,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.r_hair = hex2num(copytext(new_hair, 2, 4))
pref.g_hair = hex2num(copytext(new_hair, 4, 6))
pref.b_hair = hex2num(copytext(new_hair, 6, 8))
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["hair_style"])
var/list/valid_hairstyles = list()
@@ -298,7 +304,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference", pref.h_style) as null|anything in valid_hairstyles
if(new_h_style && CanUseTopic(user))
pref.h_style = new_h_style
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["facial_color"])
if(!has_flag(mob_species, HAS_HAIR_COLOR))
@@ -308,7 +314,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.r_facial = hex2num(copytext(new_facial, 2, 4))
pref.g_facial = hex2num(copytext(new_facial, 4, 6))
pref.b_facial = hex2num(copytext(new_facial, 6, 8))
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["eye_color"])
if(!has_flag(mob_species, HAS_EYE_COLOR))
@@ -318,7 +324,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.r_eyes = hex2num(copytext(new_eyes, 2, 4))
pref.g_eyes = hex2num(copytext(new_eyes, 4, 6))
pref.b_eyes = hex2num(copytext(new_eyes, 6, 8))
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["skin_tone"])
if(!has_flag(mob_species, HAS_SKIN_TONE))
@@ -326,7 +332,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/new_s_tone = input(user, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Character Preference", (-pref.s_tone) + 35) as num|null
if(new_s_tone && has_flag(mob_species, HAS_SKIN_TONE) && CanUseTopic(user))
pref.s_tone = 35 - max(min( round(new_s_tone), 220),1)
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["skin_color"])
if(!has_flag(mob_species, HAS_SKIN_COLOR))
@@ -336,7 +342,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.r_skin = hex2num(copytext(new_skin, 2, 4))
pref.g_skin = hex2num(copytext(new_skin, 4, 6))
pref.b_skin = hex2num(copytext(new_skin, 6, 8))
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["facial_style"])
var/list/valid_facialhairstyles = list()
@@ -354,11 +360,11 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference", pref.f_style) as null|anything in valid_facialhairstyles
if(new_f_style && has_flag(mob_species, HAS_HAIR_COLOR) && CanUseTopic(user))
pref.f_style = new_f_style
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["reset_limbs"])
reset_limbs()
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["limbs"])
@@ -473,7 +479,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
for(var/internal_organ in list(O_HEART,O_EYES))
pref.organ_data[internal_organ] = "mechanical"
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["organs"])
@@ -511,7 +517,11 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["disabilities"])
var/disability_flag = text2num(href_list["disabilities"])
pref.disabilities ^= disability_flag
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["toggle_clothing"])
pref.dress_mob = !pref.dress_mob
return TOPIC_REFRESH_UPDATE_PREVIEW
return ..()

View File

@@ -55,32 +55,32 @@
var/new_underwear_top = input(user, "Choose your character's top underwear:", "Character Preference", get_key_by_value(get_undies_top(),pref.underwear_top)) as null|anything in underwear_top_options
if(!isnull(new_underwear_top) && CanUseTopic(user))
pref.underwear_top = underwear_top_options[new_underwear_top]
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["change_underwear_bottom"])
var/underwear_bottom_options = get_undies_bottom()
var/new_underwear_bottom = input(user, "Choose your character's bottom underwear:", "Character Preference", get_key_by_value(get_undies_bottom(),pref.underwear_bottom)) as null|anything in underwear_bottom_options
if(!isnull(new_underwear_bottom) && CanUseTopic(user))
pref.underwear_bottom = underwear_bottom_options[new_underwear_bottom]
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["change_undershirt"])
var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference", get_key_by_value(undershirt_t,pref.undershirt)) as null|anything in undershirt_t
if(!isnull(new_undershirt) && CanUseTopic(user))
pref.undershirt = undershirt_t[new_undershirt]
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["change_socks"])
var/new_socks = input(user, "Choose your character's socks:", "Character Preference", get_key_by_value(socks_t,pref.socks)) as null|anything in socks_t
if(!isnull(new_socks) && CanUseTopic(user))
pref.socks = socks_t[new_socks]
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["change_backpack"])
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference", backbaglist[pref.backbag]) as null|anything in backbaglist
if(!isnull(new_backbag) && CanUseTopic(user))
pref.backbag = backbaglist.Find(new_backbag)
return TOPIC_REFRESH
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["change_pda"])
var/new_pdachoice = input(user, "Choose your character's style of PDA:", "Character Preference", pdachoicelist[pref.pdachoice]) as null|anything in pdachoicelist

View File

@@ -160,10 +160,10 @@
var/choice = input("Choose an title for [job.title].", "Choose Title", pref.GetPlayerAltTitle(job)) as anything in choices|null
if(choice && CanUseTopic(user))
SetPlayerAltTitle(job, choice)
return TOPIC_REFRESH
return (pref.dress_mob ? TOPIC_REFRESH_UPDATE_PREVIEW : TOPIC_REFRESH)
else if(href_list["set_job"])
if(SetJob(user, href_list["set_job"])) return TOPIC_REFRESH
if(SetJob(user, href_list["set_job"])) return (pref.dress_mob ? TOPIC_REFRESH_UPDATE_PREVIEW : TOPIC_REFRESH)
return ..()

View File

@@ -1,7 +1,8 @@
// These are not flags, binary operations not intended
#define TOPIC_NOACTION 0
#define TOPIC_HANDLED 1
#define TOPIC_REFRESH 2
#define TOPIC_UPDATE_PREVIEW 4
#define TOPIC_REFRESH_UPDATE_PREVIEW (TOPIC_REFRESH|TOPIC_UPDATE_PREVIEW)
/datum/category_group/player_setup_category/general_preferences
name = "General"
@@ -217,7 +218,9 @@
return 1
. = OnTopic(href, href_list, usr)
if(. == TOPIC_REFRESH)
if(. & TOPIC_UPDATE_PREVIEW)
pref_mob.client.prefs.preview_icon = null
if(. & TOPIC_REFRESH)
pref_mob.client.prefs.ShowChoices(usr)
/datum/category_item/player_setup_item/CanUseTopic(var/mob/user)

View File

@@ -63,8 +63,6 @@ datum/preferences
//Mob preview
var/icon/preview_icon = null
var/icon/preview_icon_front = null
var/icon/preview_icon_side = null
//Jobs, uses bitflags
var/job_civilian_high = 0
@@ -122,7 +120,7 @@ datum/preferences
player_setup = new(src)
set_biological_gender(pick(MALE, FEMALE))
real_name = random_name(identifying_gender,species)
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
b_type = RANDOM_BLOOD_TYPE
gear = list()
@@ -213,7 +211,7 @@ datum/preferences
dat += "</html></body>"
//user << browse(dat, "window=preferences;size=635x736")
var/datum/browser/popup = new(user, "Character Setup","Character Setup", 635, 736, src)
var/datum/browser/popup = new(user, "Character Setup","Character Setup", 800, 800, src)
popup.set_content(dat)
popup.open()
@@ -254,9 +252,10 @@ datum/preferences
ShowChoices(usr)
return 1
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, safety = 0)
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1)
// Sanitizing rather than saving as someone might still be editing when copy_to occurs.
player_setup.sanitize_setup()
character.set_species(species)
if(be_random_name)
real_name = random_name(identifying_gender,species)
@@ -297,10 +296,12 @@ datum/preferences
character.g_eyes = g_eyes
character.b_eyes = b_eyes
character.h_style = h_style
character.r_hair = r_hair
character.g_hair = g_hair
character.b_hair = b_hair
character.f_style = f_style
character.r_facial = r_facial
character.g_facial = g_facial
character.b_facial = b_facial
@@ -359,7 +360,12 @@ datum/preferences
pdachoice = 1
character.pdachoice = pdachoice
character.update_body()
if(icon_updates)
character.force_update_limbs()
character.update_mutations(0)
character.update_body(0)
character.update_hair(0)
character.update_icons()
/datum/preferences/proc/open_load_dialog(mob/user)
var/dat = "<body>"

View File

@@ -233,3 +233,8 @@ var/list/slot_equipment_priority = list( \
//if(hasvar(src,"r_hand")) if(src:r_hand) items += src:r_hand
return items
/mob/proc/delete_inventory()
for(var/entry in get_equipped_items())
drop_from_inventory(entry)
qdel(entry)

View File

@@ -2,6 +2,13 @@
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
/mob/living/carbon/human/dummy/mannequin/New()
..()
mob_list -= src
living_mob_list -= src
dead_mob_list -= src
delete_inventory()
/mob/living/carbon/human/skrell/New(var/new_loc)
h_style = "Skrell Male Tentacles"
..(new_loc, "Skrell")

View File

@@ -127,9 +127,13 @@
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
announce_ghost_joinleave(src)
client.prefs.update_preview_icon()
observer.icon = client.prefs.preview_icon
var/mob/living/carbon/human/dummy/mannequin = new()
client.prefs.dress_preview_mob(mannequin)
observer.appearance = mannequin
observer.alpha = 127
observer.layer = initial(observer.layer)
observer.invisibility = initial(observer.invisibility)
qdel(mannequin)
if(client.prefs.be_random_name)
client.prefs.real_name = random_name(client.prefs.identifying_gender)
@@ -427,7 +431,7 @@
if(ticker.random_players)
new_character.gender = pick(MALE, FEMALE)
client.prefs.real_name = random_name(new_character.gender)
client.prefs.randomize_appearance_for(new_character)
client.prefs.randomize_appearance_and_body_for(new_character)
else
client.prefs.copy_to(new_character)

View File

@@ -1,6 +1,6 @@
/datum/preferences
//The mob should have a gender you want before running this proc. Will run fine without H
/datum/preferences/proc/randomize_appearance_for(var/mob/living/carbon/human/H)
/datum/preferences/proc/randomize_appearance_and_body_for(var/mob/living/carbon/human/H)
var/datum/species/current_species = all_species[species ? species : "Human"]
set_biological_gender(pick(current_species.genders))
@@ -9,6 +9,10 @@
if(current_species)
if(current_species.appearance_flags & HAS_SKIN_TONE)
s_tone = random_skin_tone()
if(current_species.appearance_flags & HAS_SKIN_COLOR)
r_skin = rand (0,255)
g_skin = rand (0,255)
b_skin = rand (0,255)
if(current_species.appearance_flags & HAS_EYE_COLOR)
randomize_eyes_color()
if(current_species.appearance_flags & HAS_UNDERWEAR)
@@ -25,11 +29,10 @@
b_skin = rand (0,255)
//backbag = 2
backbag = rand(1,4)
pdachoice = rand(1,3)
age = rand(current_species.min_age, current_species.max_age)
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
b_type = RANDOM_BLOOD_TYPE
if(H)
copy_to(H,1)
@@ -190,554 +193,74 @@
g_skin = green
b_skin = blue
/datum/preferences/proc/dress_preview_mob(var/mob/living/carbon/human/mannequin)
copy_to(mannequin)
if(!dress_mob)
return
/datum/preferences/proc/update_preview_icon() //seriously. This is horrendous.
qdel(preview_icon_front)
qdel(preview_icon_side)
qdel(preview_icon)
var/g = "m"
if(biological_gender == FEMALE) g = "f"
var/icon/icobase
var/datum/species/current_species = all_species[species]
if(current_species)
icobase = current_species.icobase
// Determine what job is marked as 'High' priority, and dress them up as such.
var/datum/job/previewJob
if(job_civilian_low & ASSISTANT)
previewJob = job_master.GetJob("Assistant")
else
icobase = 'icons/mob/human_races/r_human.dmi'
for(var/datum/job/job in job_master.occupations)
var/job_flag
switch(job.department_flag)
if(CIVILIAN)
job_flag = job_civilian_high
if(MEDSCI)
job_flag = job_medsci_high
if(ENGSEC)
job_flag = job_engsec_high
if(job.flag == job_flag)
previewJob = job
break
preview_icon = new /icon(icobase, "")
for(var/name in BP_ALL)
if(organ_data[name] == "amputated")
continue
if(organ_data[name] == "cyborg")
var/datum/robolimb/R
if(rlimb_data[name]) R = all_robolimbs[rlimb_data[name]]
if(!R) R = basic_robolimb
if(name in list(BP_TORSO, BP_GROIN, BP_HEAD))
preview_icon.Blend(icon(R.icon, "[name]_[g]"), ICON_OVERLAY)
else
preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY)
continue
var/icon/limb_icon
if(name in list(BP_TORSO, BP_GROIN, BP_HEAD))
limb_icon = new /icon(icobase, "[name]_[g]")
else
limb_icon = new /icon(icobase, "[name]")
// Skin color
if(current_species && (current_species.appearance_flags & HAS_SKIN_COLOR))
limb_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
// Skin tone
if(current_species && (current_species.appearance_flags & HAS_SKIN_TONE))
if (s_tone >= 0)
limb_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
limb_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
preview_icon.Blend(limb_icon, ICON_OVERLAY)
//Tail
if(current_species && (current_species.tail))
var/icon/temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[current_species.tail]_s")
if(current_species && (current_species.appearance_flags & HAS_SKIN_COLOR))
temp.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
if(current_species && (current_species.appearance_flags & HAS_SKIN_TONE))
if (s_tone >= 0)
temp.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
temp.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
preview_icon.Blend(temp, ICON_OVERLAY)
// This is absolute garbage but whatever. It will do until this entire file can be rewritten without crashes.
var/use_eye_icon = "eyes_s"
var/list/use_eye_data = current_species.has_limbs[BP_HEAD]
if(islist(use_eye_data))
var/use_eye_path = use_eye_data["path"]
var/obj/item/organ/external/head/temp_head = new use_eye_path ()
if(istype(temp_head))
use_eye_icon = temp_head.eye_icon
qdel(temp_head)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = use_eye_icon)
if ((current_species && (current_species.appearance_flags & HAS_EYE_COLOR)))
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
if(facial_hair_style)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/underwear_top_s = null
if(underwear_top && current_species.appearance_flags & HAS_UNDERWEAR)
underwear_top_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = underwear_top)
var/icon/underwear_bottom_s = null
if(underwear_bottom && current_species.appearance_flags & HAS_UNDERWEAR)
underwear_bottom_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = underwear_bottom)
var/icon/undershirt_s = null
if(undershirt && current_species.appearance_flags & HAS_UNDERWEAR)
undershirt_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = undershirt)
var/icon/socks_s = null
if(socks && current_species.appearance_flags & HAS_UNDERWEAR)
socks_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = socks)
var/icon/clothes_s = null
if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
else if(job_civilian_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
switch(job_civilian_high)
if(HOP)
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "ianshirt"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(BARTENDER)
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "tophat"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(BOTANIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "nymph"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "chefhat"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apronchef"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(JANITOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_janitor"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(LIBRARIAN)
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hairflower"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(QUARTERMASTER)
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "poncho"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CARGOTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "flat_cap"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(MINER)
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "bearpelt"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(LAWYER)
clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "briefcase"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHAPLAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "imperium_monk"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CLOWN)
clothes_s = new /icon('icons/mob/uniform.dmi', "clown_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "clown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
if(MIME)
clothes_s = new /icon('icons/mob/uniform.dmi', "mime_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
else if(job_medsci_high)
switch(job_medsci_high)
if(RD)
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "petehat"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(SCIENTIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(XENOBIOLOGIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHEMIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labgreen"), ICON_OVERLAY)
if(previewJob)
mannequin.job = previewJob.title
previewJob.equip_preview(mannequin, player_alt_titles[previewJob.title])
var/list/equipped_slots = list() //If more than one item takes the same slot only spawn the first
for(var/thing in gear)
var/datum/gear/G = gear_datums[thing]
if(G)
var/permitted = 0
if(G.allowed_roles)
for(var/job_name in G.allowed_roles)
if(previewJob.title == job_name)
permitted = 1
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CMO)
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_cmo"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(DOCTOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "surgeon"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(GENETICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "monkeysuit"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(VIROLOGIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "plaguedoctor"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(ROBOTICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "toolbox_blue"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
permitted = 1
else if(job_engsec_high)
switch(job_engsec_high)
if(CAPTAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "centcomcaptain"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-cap"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(HOS)
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hosberet"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(WARDEN)
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "slippers_worn"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(DETECTIVE)
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(OFFICER)
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "officerberet"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHIEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "blueprints"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(ENGINEER)
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "hazard"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(ATMOSTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "firesuit"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(G.whitelisted && (G.whitelisted != mannequin.species.name))
permitted = 0
if(AI)//Gives AI and borgs assistant-wear, so they can still customize their character
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "straight_jacket"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CYBORG)
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "cardborg"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(!permitted)
continue
if(disabilities & NEARSIGHTED)
preview_icon.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
if(G.slot && !(G.slot in equipped_slots))
equipped_slots += G.slot
var/metadata = gear[G.display_name]
mannequin.equip_to_slot_or_del(G.spawn_item(mannequin, metadata), G.slot)
mannequin.update_icons()
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(underwear_top_s)
preview_icon.Blend(underwear_top_s, ICON_OVERLAY)
if(underwear_bottom_s)
preview_icon.Blend(underwear_bottom_s, ICON_OVERLAY)
if(undershirt_s)
preview_icon.Blend(undershirt_s, ICON_OVERLAY)
if(socks_s)
preview_icon.Blend(socks_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
preview_icon_front = new(preview_icon, dir = SOUTH)
preview_icon_side = new(preview_icon, dir = WEST)
/datum/preferences/proc/update_preview_icon()
var/mob/living/carbon/human/dummy/mannequin/mannequin = get_mannequin(client_ckey)
mannequin.delete_inventory(TRUE)
dress_preview_mob(mannequin)
qdel(eyes_s)
qdel(underwear_top_s)
qdel(underwear_bottom_s)
qdel(undershirt_s)
qdel(socks_s)
qdel(clothes_s)
preview_icon = icon('icons/effects/effects.dmi', "nothing")
preview_icon.Scale(48+32, 16+32)
mannequin.dir = NORTH
var/icon/stamp = getFlatIcon(mannequin)
preview_icon.Blend(stamp, ICON_OVERLAY, 25, 17)
mannequin.dir = WEST
stamp = getFlatIcon(mannequin)
preview_icon.Blend(stamp, ICON_OVERLAY, 1, 9)
mannequin.dir = SOUTH
stamp = getFlatIcon(mannequin)
preview_icon.Blend(stamp, ICON_OVERLAY, 49, 1)
preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser.

View File

@@ -78,7 +78,7 @@
H.set_species(randomize)
H.universal_speak = 1
var/datum/preferences/A = new() //Randomize appearance for the human
A.randomize_appearance_for(H)
A.randomize_appearance_and_body_for(H)
if(new_mob)
for (var/spell/S in M.spell_list)