// PSA To anyone who opens this: // Good fucking luck. You will need this: https://www.youtube.com/watch?v=W9GaIbECisQ /datum/character_save var/real_name //our character's name var/be_random_name = FALSE //whether we are a random name every round var/gender = MALE //gender of character (well duh) var/body_type = MALE //body sprite variant var/age = 30 //age of character var/b_type = "A+" //blood type (not-chooseable) var/underwear = "Nude" //underwear type var/undershirt = "Nude" //undershirt type var/socks = "Nude" //socks type var/backbag = GBACKPACK //backpack type var/ha_style = "None" //Head accessory style var/hacc_colour = "#000000" //Head accessory colour. If this line looks badly indented in vscode, its because of the shitty colour square var/list/m_styles = list( "head" = "None", "body" = "None", "tail" = "None", "wing" = "None" ) //Marking styles. var/list/m_colours = list( "head" = "#000000", "body" = "#000000", "tail" = "#000000" ) //Marking colours. var/h_style = "Bald" //Hair type var/h_colour = "#000000" //Hair color var/h_sec_colour = "#000000" //Secondary hair color var/f_style = "Shaved" //Facial hair type var/f_colour = "#000000" //Facial hair color var/f_sec_colour = "#000000" //Secondary facial hair color var/s_tone = 1 //Skin tone var/s_colour = "#000000" //Skin color var/e_colour = "#000000" //Eye color var/alt_head = "None" //Alt head style. var/species = "Human" var/language = "None" //Secondary language var/autohiss_mode = AUTOHISS_OFF //Species autohiss level. OFF, BASIC, FULL. /// If a spawned cyborg should have an MMI, a positronic, or a robobrain. MMI by default var/cyborg_brain_type = MMI_BORG /// The body accessory name of the mob (e.g. wings, tail). var/body_accessory = null var/speciesprefs = 0 //I hate having to do this, I really do (Using this for oldvox code, making names universal I guess //Mob preview var/icon/preview_icon = null var/icon/preview_icon_front = null var/icon/preview_icon_side = null //Jobs, uses bitflags var/job_support_high = 0 var/job_support_med = 0 var/job_support_low = 0 var/job_medsci_high = 0 var/job_medsci_med = 0 var/job_medsci_low = 0 var/job_engsec_high = 0 var/job_engsec_med = 0 var/job_engsec_low = 0 //Keeps track of preferrence for not getting any wanted jobs var/alternate_option = 2 // maps each organ to either null(intact), "cyborg" or "amputated" // will probably not be able to do this for head and torso ;) var/list/organ_data = list() var/list/rlimb_data = list() var/list/player_alt_titles = list() // the default name of a job like "Medical Doctor" var/flavor_text = "" var/med_record = "" var/sec_record = "" var/gen_record = "" var/disabilities = 0 var/nanotrasen_relation = "Neutral" var/physique = "average" var/height = "average height" // OOC Metadata: var/metadata = "" //Gear stuff var/list/loadout_gear = list() /// Is this character from the DB? var/from_db = FALSE /// Is this character valid to be picked? This is necessary to avoid someone getting a bald human called "Character 30" var/valid_save = FALSE /// Character slot number, used for saves and stuff. var/slot_number = 0 // Hair gradient var/h_grad_style = "None" var/h_grad_offset_x = 0 var/h_grad_offset_y = 0 var/h_grad_colour = "#000000" var/h_grad_alpha = 255 /// Custom emote text ("name" = "emote text") var/list/custom_emotes = list() /// Runechat color var/runechat_color = "#FFFFFF" /// The ringtone their PDA should start with var/pda_ringtone /// A list/JSON of the quirk datums to attach to the character var/list/quirks = list() // Fuckery to prevent null characters /datum/character_save/New() real_name = random_name(gender, species) /datum/character_save/proc/save(client/C) var/organ_list var/rlimb_list var/playertitlelist var/gearlist var/markingcolourslist = list2params(m_colours) var/markingstyleslist = list2params(m_styles) if(length(organ_data)) organ_list = list2params(organ_data) if(length(rlimb_data)) rlimb_list = list2params(rlimb_data) if(length(player_alt_titles)) playertitlelist = list2params(player_alt_titles) if(length(loadout_gear)) gearlist = json_encode(loadout_gear) if(islist(quirks)) quirks = json_encode(quirks) var/datum/db_query/firstquery = SSdbcore.NewQuery("SELECT slot FROM characters WHERE ckey=:ckey ORDER BY slot", list( "ckey" = C.ckey )) if(!firstquery.warn_execute()) qdel(firstquery) return // ALL OF THIS SHIT BECAUSE h_style CAN BE A STRING OR A DATUM var/h_style_str = "Bald" if(istype(h_style, /datum/sprite_accessory/hair)) var/datum/sprite_accessory/hair/H = h_style h_style_str = H.name if(istext(h_style)) h_style_str = h_style // Same with f_style var/f_style_str = "Bald" if(istype(f_style, /datum/sprite_accessory/facial_hair)) var/datum/sprite_accessory/facial_hair/F = f_style f_style_str = F.name if(istext(f_style)) f_style_str = f_style while(firstquery.NextRow()) if(text2num(firstquery.item[1]) == slot_number) // Check if the character exists var/datum/db_query/query = SSdbcore.NewQuery({"UPDATE characters SET OOC_Notes=:metadata, real_name=:real_name, name_is_always_random=:be_random_name, gender=:gender, body_type=:body_type, age=:age, species=:species, language=:language, hair_colour=:h_colour, secondary_hair_colour=:h_sec_colour, facial_hair_colour=:f_colour, secondary_facial_hair_colour=:f_sec_colour, skin_tone=:s_tone, skin_colour=:s_colour, marking_colours=:markingcolourslist, head_accessory_colour=:hacc_colour, hair_style_name=:h_style, facial_style_name=:f_style, marking_styles=:markingstyleslist, head_accessory_style_name=:ha_style, alt_head_name=:alt_head, eye_colour=:e_colour, underwear=:underwear, undershirt=:undershirt, backbag=:backbag, b_type=:b_type, alternate_option=:alternate_option, job_support_high=:job_support_high, job_support_med=:job_support_med, job_support_low=:job_support_low, job_medsci_high=:job_medsci_high, job_medsci_med=:job_medsci_med, job_medsci_low=:job_medsci_low, job_engsec_high=:job_engsec_high, job_engsec_med=:job_engsec_med, job_engsec_low=:job_engsec_low, flavor_text=:flavor_text, med_record=:med_record, sec_record=:sec_record, gen_record=:gen_record, player_alt_titles=:playertitlelist, disabilities=:disabilities, organ_data=:organ_list, rlimb_data=:rlimb_list, nanotrasen_relation=:nanotrasen_relation, physique=:physique, height=:height, speciesprefs=:speciesprefs, socks=:socks, body_accessory=:body_accessory, gear=:gearlist, autohiss=:autohiss_mode, hair_gradient=:h_grad_style, hair_gradient_offset=:h_grad_offset, hair_gradient_colour=:h_grad_colour, hair_gradient_alpha=:h_grad_alpha, custom_emotes=:custom_emotes, runechat_color=:runechat_color, cyborg_brain_type=:cyborg_brain_type, body_type=:body_type, pda_ringtone=:pda_ringtone, quirks=:quirks WHERE ckey=:ckey AND slot=:slot"}, list( // OH GOD SO MANY PARAMETERS "metadata" = metadata, "real_name" = real_name, "be_random_name" = be_random_name, "gender" = gender, "body_type" = body_type, "age" = age, "species" = species, "language" = language, "h_colour" = h_colour, "h_sec_colour" = h_sec_colour, "f_colour" = f_colour, "f_sec_colour" = f_sec_colour, "s_tone" = s_tone, "s_colour" = s_colour, "markingcolourslist" = markingcolourslist, "hacc_colour" = hacc_colour, "h_style" = h_style_str, "f_style" = f_style_str, "markingstyleslist" = markingstyleslist, "ha_style" = ha_style, "alt_head" = (alt_head ? alt_head : ""), // This it intentional. It wont work without it! "e_colour" = e_colour, "underwear" = underwear, "undershirt" = undershirt, "backbag" = backbag, "b_type" = b_type, "alternate_option" = alternate_option, "job_support_high" = job_support_high, "job_support_med" = job_support_med, "job_support_low" = job_support_low, "job_medsci_high" = job_medsci_high, "job_medsci_med" = job_medsci_med, "job_medsci_low" = job_medsci_low, "job_engsec_high" = job_engsec_high, "job_engsec_med" = job_engsec_med, "job_engsec_low" = job_engsec_low, "flavor_text" = flavor_text, "med_record" = med_record, "sec_record" = sec_record, "gen_record" = gen_record, "playertitlelist" = (playertitlelist ? playertitlelist : ""), // This it intentnional. It wont work without it! "disabilities" = disabilities, "organ_list" = (organ_list ? organ_list : ""), "rlimb_list" = (rlimb_list ? rlimb_list : ""), "nanotrasen_relation" = nanotrasen_relation, "physique" = physique, "height" = height, "speciesprefs" = speciesprefs, "socks" = socks, "body_accessory" = (body_accessory ? body_accessory : ""), "gearlist" = (gearlist ? gearlist : ""), "autohiss_mode" = autohiss_mode, "h_grad_style" = h_grad_style, "h_grad_offset" = "[h_grad_offset_x],[h_grad_offset_y]", "h_grad_colour" = h_grad_colour, "h_grad_alpha" = h_grad_alpha, "custom_emotes" = json_encode(custom_emotes), "runechat_color" = runechat_color, "cyborg_brain_type" = cyborg_brain_type, "pda_ringtone" = pda_ringtone, "ckey" = C.ckey, "slot" = slot_number, "quirks" = quirks )) if(!query.warn_execute()) qdel(firstquery) qdel(query) return qdel(firstquery) qdel(query) return 1 qdel(firstquery) var/datum/db_query/query = SSdbcore.NewQuery({" INSERT INTO characters (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender, age, species, language, hair_colour, secondary_hair_colour, facial_hair_colour, secondary_facial_hair_colour, skin_tone, skin_colour, marking_colours, head_accessory_colour, hair_style_name, facial_style_name, marking_styles, head_accessory_style_name, alt_head_name, eye_colour, underwear, undershirt, backbag, b_type, alternate_option, job_support_high, job_support_med, job_support_low, job_medsci_high, job_medsci_med, job_medsci_low, job_engsec_high, job_engsec_med, job_engsec_low, flavor_text, med_record, sec_record, gen_record, player_alt_titles, disabilities, organ_data, rlimb_data, nanotrasen_relation, physique, height, speciesprefs, socks, body_accessory, gear, autohiss, hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type, pda_ringtone, quirks) VALUES (:ckey, :slot, :metadata, :name, :be_random_name, :gender, :age, :species, :language, :h_colour, :h_sec_colour, :f_colour, :f_sec_colour, :s_tone, :s_colour, :markingcolourslist, :hacc_colour, :h_style, :f_style, :markingstyleslist, :ha_style, :alt_head, :e_colour, :underwear, :undershirt, :backbag, :b_type, :alternate_option, :job_support_high, :job_support_med, :job_support_low, :job_medsci_high, :job_medsci_med, :job_medsci_low, :job_engsec_high, :job_engsec_med, :job_engsec_low, :flavor_text, :med_record, :sec_record, :gen_record, :playertitlelist, :disabilities, :organ_list, :rlimb_list, :nanotrasen_relation, :physique, :height, :speciesprefs, :socks, :body_accessory, :gearlist, :autohiss_mode, :h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :runechat_color, :cyborg_brain_type, :body_type, :pda_ringtone, :quirks) "}, list( // This has too many params for anyone to look at this without going insae "ckey" = C.ckey, "slot" = slot_number, "metadata" = metadata, "name" = real_name, "be_random_name" = be_random_name, "gender" = gender, "body_type" = body_type, "age" = age, "species" = species, "language" = language, "h_colour" = h_colour, "h_sec_colour" = h_sec_colour, "f_colour" = f_colour, "f_sec_colour" = f_sec_colour, "s_tone" = s_tone, "s_colour" = s_colour, "markingcolourslist" = markingcolourslist, "hacc_colour" = hacc_colour, "h_style" = h_style_str, "f_style" = f_style_str, "markingstyleslist" = markingstyleslist, "ha_style" = ha_style, "alt_head" = (alt_head ? alt_head : "None"), // bane of my fucking life "e_colour" = e_colour, "underwear" = underwear, "undershirt" = undershirt, "backbag" = backbag, "b_type" = b_type, "alternate_option" = alternate_option, "job_support_high" = job_support_high, "job_support_med" = job_support_med, "job_support_low" = job_support_low, "job_medsci_high" = job_medsci_high, "job_medsci_med" = job_medsci_med, "job_medsci_low" = job_medsci_low, "job_engsec_high" = job_engsec_high, "job_engsec_med" = job_engsec_med, "job_engsec_low" = job_engsec_low, "flavor_text" = flavor_text, "med_record" = med_record, "sec_record" = sec_record, "gen_record" = gen_record, "playertitlelist" = (playertitlelist ? playertitlelist : ""), // This it intentional. It wont work without it! "disabilities" = disabilities, "organ_list" = (organ_list ? organ_list : ""), "rlimb_list" = (rlimb_list ? rlimb_list : ""), "nanotrasen_relation" = nanotrasen_relation, "physique" = physique, "height" = height, "speciesprefs" = speciesprefs, "socks" = socks, "body_accessory" = (body_accessory ? body_accessory : ""), "gearlist" = (gearlist ? gearlist : ""), "autohiss_mode" = autohiss_mode, "h_grad_style" = h_grad_style, "h_grad_offset" = "[h_grad_offset_x],[h_grad_offset_y]", "h_grad_colour" = h_grad_colour, "h_grad_alpha" = h_grad_alpha, "custom_emotes" = json_encode(custom_emotes), "runechat_color" = runechat_color, "cyborg_brain_type" = cyborg_brain_type, "pda_ringtone" = pda_ringtone, "quirks" = quirks )) if(!query.warn_execute()) qdel(query) return qdel(query) from_db = TRUE return 1 /** * Load in and process the database's information on the player's character save. * The order of indices here is the relative order from get_query() in 20-load-characters.dm. */ /datum/character_save/proc/load(datum/db_query/query) //Character metadata = query.item[1] real_name = query.item[2] be_random_name = text2num(query.item[3]) gender = query.item[4] age = text2num(query.item[5]) species = query.item[6] language = query.item[7] h_colour = query.item[8] h_sec_colour = query.item[9] f_colour = query.item[10] f_sec_colour = query.item[11] s_tone = text2num(query.item[12]) s_colour = query.item[13] m_colours = params2list(query.item[14]) hacc_colour = query.item[15] h_style = query.item[16] f_style = query.item[17] m_styles = params2list(query.item[18]) ha_style = query.item[19] alt_head = query.item[20] e_colour = query.item[21] underwear = query.item[22] undershirt = query.item[23] backbag = query.item[24] b_type = query.item[25] //Jobs alternate_option = text2num(query.item[26]) job_support_high = text2num(query.item[27]) job_support_med = text2num(query.item[28]) job_support_low = text2num(query.item[29]) job_medsci_high = text2num(query.item[30]) job_medsci_med = text2num(query.item[31]) job_medsci_low = text2num(query.item[32]) job_engsec_high = text2num(query.item[33]) job_engsec_med = text2num(query.item[34]) job_engsec_low = text2num(query.item[35]) //Miscellaneous flavor_text = query.item[36] med_record = query.item[37] sec_record = query.item[38] gen_record = query.item[39] // Apparently, the preceding vars weren't always encoded properly... if(findtext(flavor_text, "<")) // ... so let's clumsily check for tags! flavor_text = html_encode(flavor_text) if(findtext(med_record, "<")) med_record = html_encode(med_record) if(findtext(sec_record, "<")) sec_record = html_encode(sec_record) if(findtext(gen_record, "<")) gen_record = html_encode(gen_record) disabilities = text2num(query.item[40]) player_alt_titles = params2list(query.item[41]) organ_data = params2list(query.item[42]) rlimb_data = params2list(query.item[43]) nanotrasen_relation = query.item[44] speciesprefs = text2num(query.item[45]) //socks socks = query.item[46] body_accessory = query.item[47] loadout_gear = query.item[48] autohiss_mode = text2num(query.item[49]) // Index [50] is the slot h_grad_style = query.item[51] h_grad_offset_x = query.item[52] // parsed down below h_grad_colour = query.item[53] h_grad_alpha = query.item[54] var/custom_emotes_tmp = query.item[55] runechat_color = query.item[56] physique = query.item[57] height = query.item[58] cyborg_brain_type = query.item[59] body_type = query.item[60] pda_ringtone = query.item[61] quirks = query.item[62] //Sanitize var/datum/species/SP = GLOB.all_species[species] if(!SP) stack_trace("Couldn't find a species matching [species], character name is [real_name].") metadata = sanitize_text(metadata, initial(metadata)) real_name = reject_bad_name(real_name, TRUE) if(isnull(species) || isnull(SP)) SP = GLOB.all_species["Human"] species = "Human" stack_trace("Character doesn't have a species, character name is [real_name]. Defaulting to human.") if(isnull(language)) language = "None" if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation) if(isnull(physique)) physique = initial(physique) if(isnull(height)) height = initial(height) if(isnull(speciesprefs)) speciesprefs = initial(speciesprefs) if(!real_name) real_name = random_name(gender, species) be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name)) gender = sanitize_gender(gender, FALSE) age = sanitize_integer(age, SP.min_age, SP.max_age, initial(age)) h_colour = sanitize_hexcolor(h_colour) h_sec_colour = sanitize_hexcolor(h_sec_colour) f_colour = sanitize_hexcolor(f_colour) f_sec_colour = sanitize_hexcolor(f_sec_colour) s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone)) s_colour = sanitize_hexcolor(s_colour) for(var/marking_location in m_colours) m_colours[marking_location] = sanitize_hexcolor(m_colours[marking_location], DEFAULT_MARKING_COLOURS[marking_location]) hacc_colour = sanitize_hexcolor(hacc_colour) h_style = sanitize_inlist(h_style, GLOB.hair_styles_public_list, initial(h_style)) f_style = sanitize_inlist(f_style, GLOB.facial_hair_styles_list, initial(f_style)) for(var/marking_location in m_styles) m_styles[marking_location] = sanitize_inlist(m_styles[marking_location], GLOB.marking_styles_list, DEFAULT_MARKING_STYLES[marking_location]) ha_style = sanitize_inlist(ha_style, GLOB.head_accessory_styles_list, initial(ha_style)) alt_head = sanitize_inlist(alt_head, GLOB.alt_heads_list, initial(alt_head)) e_colour = sanitize_hexcolor(e_colour) underwear = sanitize_text(underwear, initial(underwear)) undershirt = sanitize_text(undershirt, initial(undershirt)) backbag = sanitize_text(backbag, initial(backbag)) b_type = sanitize_text(b_type, initial(b_type)) autohiss_mode = sanitize_integer(autohiss_mode, 0, 2, initial(autohiss_mode)) alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option)) job_support_high = sanitize_integer(job_support_high, 0, 65535, initial(job_support_high)) job_support_med = sanitize_integer(job_support_med, 0, 65535, initial(job_support_med)) job_support_low = sanitize_integer(job_support_low, 0, 65535, initial(job_support_low)) job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high)) job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med)) job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low)) job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high)) job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med)) job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low)) disabilities = sanitize_integer(disabilities, 0, 65535, initial(disabilities)) socks = sanitize_text(socks, initial(socks)) body_accessory = sanitize_text(body_accessory, initial(body_accessory)) h_grad_style = sanitize_text(length(h_grad_style) ? h_grad_style : null, "None") var/list/expl = splittext(h_grad_offset_x, ",") if(length(expl) == 2) h_grad_offset_x = text2num(expl[1]) || 0 h_grad_offset_y = text2num(expl[2]) || 0 h_grad_colour = sanitize_hexcolor(h_grad_colour) h_grad_alpha = sanitize_integer(h_grad_alpha, 0, 255, initial(h_grad_alpha)) loadout_gear = sanitize_json(loadout_gear) custom_emotes_tmp = sanitize_json(custom_emotes_tmp) custom_emotes = init_custom_emotes(custom_emotes_tmp) runechat_color = sanitize_hexcolor(runechat_color) cyborg_brain_type = sanitize_inlist(cyborg_brain_type, GLOB.borg_brain_choices, initial(cyborg_brain_type)) pda_ringtone = sanitize_inlist(pda_ringtone, GLOB.pda_ringtone_choices, initial(pda_ringtone)) quirks = sanitize_json(quirks) if(!player_alt_titles) player_alt_titles = new() if(!organ_data) src.organ_data = list() if(!rlimb_data) src.rlimb_data = list() if(!loadout_gear) loadout_gear = list() // Check if the current body accessory exists if(!GLOB.body_accessory_by_name[body_accessory]) body_accessory = null from_db = TRUE valid_save = TRUE return TRUE /datum/character_save/proc/randomise(gender_override) b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") var/datum/species/S = GLOB.all_species[species] if(!istype(S)) //The species was invalid. Set the species to the default, fetch the datum for that species and generate a random character. species = initial(species) S = GLOB.all_species[species] var/datum/robolimb/robohead if(S.bodyflags & ALL_RPARTS) var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]" robohead = GLOB.all_robolimbs[head_model] if(gender_override) gender = gender_override else gender = pick(MALE, FEMALE) body_type = pick(MALE, FEMALE) underwear = random_underwear(body_type, species) undershirt = random_undershirt(body_type, species) socks = random_socks(body_type, species) if(length(GLOB.body_accessory_by_species[species])) body_accessory = random_body_accessory(species, S.optional_body_accessory) if(S.bodyflags & HAS_SKIN_TONE) s_tone = 35 - random_skin_tone(species) else if(S.bodyflags & HAS_ICON_SKIN_TONE) s_tone = random_skin_tone(species) h_style = random_hair_style(gender, species, robohead) f_style = random_facial_hair_style(gender, species, robohead) if(!(S.bodyflags & BALD)) randomize_hair_color("hair") if(!(S.bodyflags & SHAVED)) randomize_hair_color("facial") if(S.bodyflags & HAS_HEAD_ACCESSORY) ha_style = random_head_accessory(species) hacc_colour = randomize_skin_color(1) if(S.bodyflags & HAS_HEAD_MARKINGS) m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head) m_colours["head"] = randomize_skin_color(1) if(S.bodyflags & HAS_BODY_MARKINGS) m_styles["body"] = random_marking_style("body", species) m_colours["body"] = randomize_skin_color(1) if(S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings. m_styles["tail"] = random_marking_style("tail", species, null, body_accessory) m_colours["tail"] = randomize_skin_color(1) if(!(S.bodyflags & ALL_RPARTS)) randomize_eyes_color() if(S.bodyflags & HAS_SKIN_COLOR) randomize_skin_color() backbag = pick(GLOB.backbaglist) age = rand(S.min_age, S.max_age) physique = pick(GLOB.character_physiques) height = pick(GLOB.character_heights) /datum/character_save/proc/randomize_hair_color(target = "hair") if(prob (75) && target == "facial") // Chance to inherit hair color f_colour = h_colour return var/red var/green var/blue var/col = pick ("blonde", "black", "chestnut", "copper", "brown", "wheat", "old", "punk") switch(col) if("blonde") red = 255 green = 255 blue = 0 if("black") red = 0 green = 0 blue = 0 if("chestnut") red = 153 green = 102 blue = 51 if("copper") red = 255 green = 153 blue = 0 if("brown") red = 102 green = 51 blue = 0 if("wheat") red = 255 green = 255 blue = 153 if("old") red = rand (100, 255) green = red blue = red if("punk") red = rand (0, 255) green = rand (0, 255) blue = rand (0, 255) red = max(min(red + rand (-25, 25), 255), 0) green = max(min(green + rand (-25, 25), 255), 0) blue = max(min(blue + rand (-25, 25), 255), 0) switch(target) if("hair") h_colour = rgb(red, green, blue) if("facial") f_colour = rgb(red, green, blue) /datum/character_save/proc/randomize_eyes_color() var/red var/green var/blue var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino") switch(col) if("black") red = 0 green = 0 blue = 0 if("grey") red = rand (100, 200) green = red blue = red if("brown") red = 102 green = 51 blue = 0 if("chestnut") red = 153 green = 102 blue = 0 if("blue") red = 51 green = 102 blue = 204 if("lightblue") red = 102 green = 204 blue = 255 if("green") red = 0 green = 102 blue = 0 if("albino") red = rand (200, 255) green = rand (0, 150) blue = rand (0, 150) red = max(min(red + rand (-25, 25), 255), 0) green = max(min(green + rand (-25, 25), 255), 0) blue = max(min(blue + rand (-25, 25), 255), 0) e_colour = rgb(red, green, blue) /datum/character_save/proc/randomize_skin_color(pass_on) var/red var/green var/blue var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino") switch(col) if("black") red = 0 green = 0 blue = 0 if("grey") red = rand (100, 200) green = red blue = red if("brown") red = 102 green = 51 blue = 0 if("chestnut") red = 153 green = 102 blue = 0 if("blue") red = 51 green = 102 blue = 204 if("lightblue") red = 102 green = 204 blue = 255 if("green") red = 0 green = 102 blue = 0 if("albino") red = rand (200, 255) green = rand (0, 150) blue = rand (0, 150) red = max(min(red + rand (-25, 25), 255), 0) green = max(min(green + rand (-25, 25), 255), 0) blue = max(min(blue + rand (-25, 25), 255), 0) if(pass_on) return rgb(red, green, blue) else s_colour = rgb(red, green, blue) /datum/character_save/proc/blend_backpack(icon/clothes_s, backbag, satchel, backpack="backpack") switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', backpack), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', satchel), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) return clothes_s #define ICON_SHIFT_XY(I, X, Y)\ if(X)\ I.Shift(EAST, X);\ if(Y)\ I.Shift(NORTH, Y);\ /datum/character_save/proc/update_preview_icon(for_observer=0) //seriously. This is horrendous. qdel(preview_icon_front) qdel(preview_icon_side) qdel(preview_icon) var/g = "m" if(body_type == FEMALE) g = "f" var/icon/icobase var/datum/species/current_species = GLOB.all_species[species] //Icon-based species colour. var/coloured_tail if(current_species) if(current_species.bodyflags & HAS_ICON_SKIN_TONE) //Handling species-specific icon-based skin tones by flagged race. var/mob/living/carbon/human/fake/H = new H.dna.species = current_species H.s_tone = s_tone H.dna.species.updatespeciescolor(H, 0) //The mob's species wasn't set, so it's almost certainly different than the character's species at the moment. Thus, we need to be owner-insensitive. var/obj/item/organ/external/chest/C = H.get_organ("chest") icobase = C.icobase ? C.icobase : C.dna.species.icobase if(H.dna.species.bodyflags & HAS_TAIL) coloured_tail = H.tail ? H.tail : H.dna.species.tail qdel(H) else icobase = current_species.icobase else icobase = 'icons/mob/human_races/r_human.dmi' preview_icon = new /icon(icobase, "torso_[g]") preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY) var/head = "head" if(alt_head && current_species.bodyflags & HAS_ALT_HEADS) var/datum/sprite_accessory/alt_heads/H = GLOB.alt_heads_list[alt_head] if(H.icon_state) head = H.icon_state preview_icon.Blend(new /icon(icobase, "[head]_[g]"), ICON_OVERLAY) for(var/name in list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand")) if(organ_data[name] == "amputated") continue if(organ_data[name] == "cyborg") var/datum/robolimb/R if(rlimb_data[name]) R = GLOB.all_robolimbs[rlimb_data[name]] if(!R) R = GLOB.basic_robolimb if(name == "chest") name = "torso" preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic. continue preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY) // Skin color if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR)) preview_icon.Blend(s_colour, ICON_ADD) // Skin tone if(current_species && (current_species.bodyflags & HAS_SKIN_TONE)) if(s_tone >= 0) preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) else preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) // Body accessory if(current_species && (current_species.bodyflags & HAS_BODY_ACCESSORY)) var/icon var/icon_state var/offset_x = 0 var/offset_y = 0 var/blend_mode = ICON_ADD var/icon/underlay = null if(body_accessory) var/datum/body_accessory/BA = GLOB.body_accessory_by_name[body_accessory] if(BA) icon = BA.icon icon_state = BA.icon_state blend_mode = BA.blend_mode || blend_mode offset_x = BA.pixel_x_offset offset_y = BA.pixel_y_offset // If the body accessory has an underlay, account for it. if(BA.has_behind) underlay = new(icon, "[icon_state]_BEHIND") else if(current_species.bodyflags & HAS_TAIL) icon = "icons/effects/species.dmi" if(coloured_tail) icon_state = "[coloured_tail]_s" else icon_state = "[current_species.tail]_s" if(icon) var/icon/temp = new(icon, icon_state) if(current_species.bodyflags & HAS_SKIN_COLOR) temp.Blend(s_colour, blend_mode) if(current_species.bodyflags & HAS_TAIL_MARKINGS) var/tail_marking = m_styles["tail"] var/datum/sprite_accessory/body_markings/BM = GLOB.marking_styles_list[tail_marking] if(BM) var/icon/t_marking_s = new(BM.icon, "[BM.icon_state]_s") t_marking_s.Blend(m_colours["tail"], ICON_ADD) temp.Blend(t_marking_s, ICON_OVERLAY) // Body accessory has an underlay, add it too. if(underlay) ICON_SHIFT_XY(underlay, offset_x, offset_y) preview_icon.Blend(underlay, ICON_UNDERLAY) ICON_SHIFT_XY(temp, offset_x, offset_y) preview_icon.Blend(temp, ICON_OVERLAY) //Markings if(current_species && ((current_species.bodyflags & HAS_HEAD_MARKINGS) || (current_species.bodyflags & HAS_BODY_MARKINGS))) if(current_species.bodyflags & HAS_BODY_MARKINGS) //Body markings. var/body_marking = m_styles["body"] var/datum/sprite_accessory/body_marking_style = GLOB.marking_styles_list[body_marking] if(body_marking_style && body_marking_style.species_allowed) var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s") b_marking_s.Blend(m_colours["body"], ICON_ADD) preview_icon.Blend(b_marking_s, ICON_OVERLAY) if(current_species.bodyflags & HAS_HEAD_MARKINGS) //Head markings. var/head_marking = m_styles["head"] var/datum/sprite_accessory/head_marking_style = GLOB.marking_styles_list[head_marking] if(head_marking_style && head_marking_style.species_allowed) var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") h_marking_s.Blend(m_colours["head"], ICON_ADD) preview_icon.Blend(h_marking_s, ICON_OVERLAY) var/icon/hands_icon = icon(preview_icon) hands_icon.Blend(icon('icons/mob/clothing/masking_helpers.dmi', "l_hand_mask"), ICON_MULTIPLY) var/icon/face_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "bald_s") if(!(current_species.bodyflags & NO_EYES)) var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s") eyes_s.Blend(e_colour, ICON_ADD) face_s.Blend(eyes_s, ICON_OVERLAY) var/datum/sprite_accessory/hair_style = GLOB.hair_styles_full_list[h_style] if(hair_style) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") if(current_species.name == "Slime People") // whee I am part of the problem hair_s.Blend("[s_colour]A0", ICON_ADD) else if(hair_style.do_colouration) hair_s.Blend(h_colour, ICON_ADD) var/datum/sprite_accessory/hair_gradient/gradient = GLOB.hair_gradients_list[h_grad_style] if(gradient) var/icon/grad_s = new/icon("icon" = gradient.icon, "icon_state" = gradient.icon_state) if(h_grad_offset_x) grad_s.Shift(EAST, h_grad_offset_x) if(h_grad_offset_y) grad_s.Shift(NORTH, h_grad_offset_y) grad_s.Blend(hair_s, ICON_ADD) grad_s.MapColors(COLOR_BLACK, COLOR_BLACK, COLOR_BLACK, h_grad_colour) grad_s.ChangeOpacity(h_grad_alpha / 255) hair_s.Blend(grad_s, ICON_OVERLAY) if(hair_style.secondary_theme) var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s") if(!hair_style.no_sec_colour && hair_style.do_colouration) hair_secondary_s.Blend(h_sec_colour, ICON_ADD) hair_s.Blend(hair_secondary_s, ICON_OVERLAY) face_s.Blend(hair_s, ICON_OVERLAY) //Head Accessory if(current_species && (current_species.bodyflags & HAS_HEAD_ACCESSORY)) var/datum/sprite_accessory/head_accessory_style = GLOB.head_accessory_styles_list[ha_style] if(head_accessory_style && head_accessory_style.species_allowed) var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s") head_accessory_s.Blend(hacc_colour, ICON_ADD) face_s.Blend(head_accessory_s, ICON_OVERLAY) var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hair_styles_list[f_style] if(facial_hair_style && facial_hair_style.species_allowed) var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") if(current_species.name == "Slime People") // whee I am part of the problem facial_s.Blend("[s_colour]A0", ICON_ADD) else if(facial_hair_style.do_colouration) facial_s.Blend(f_colour, ICON_ADD) if(facial_hair_style.secondary_theme) var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s") if(!facial_hair_style.no_sec_colour && facial_hair_style.do_colouration) facial_secondary_s.Blend(f_sec_colour, ICON_ADD) facial_s.Blend(facial_secondary_s, ICON_OVERLAY) face_s.Blend(facial_s, ICON_OVERLAY) var/icon/underwear_s = null if(underwear && (current_species.clothing_flags & HAS_UNDERWEAR)) var/datum/sprite_accessory/underwear/U = GLOB.underwear_list[underwear] if(U) var/u_icon = U.sprite_sheets && (current_species.sprite_sheet_name in U.sprite_sheets) ? U.sprite_sheets[current_species.sprite_sheet_name] : U.icon //Species-fit the undergarment. underwear_s = new/icon(u_icon, "uw_[U.icon_state]_s", ICON_OVERLAY) var/icon/undershirt_s = null if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT)) var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_full_list[undershirt] if(U2) var/u2_icon = U2.sprite_sheets && (current_species.sprite_sheet_name in U2.sprite_sheets) ? U2.sprite_sheets[current_species.sprite_sheet_name] : U2.icon undershirt_s = new/icon(u2_icon, "us_[U2.icon_state]_s", ICON_OVERLAY) var/icon/socks_s = null if(socks && (current_species.clothing_flags & HAS_SOCKS)) var/datum/sprite_accessory/socks/U3 = GLOB.socks_list[socks] if(U3) var/u3_icon = U3.sprite_sheets && (current_species.sprite_sheet_name in U3.sprite_sheets) ? U3.sprite_sheets[current_species.sprite_sheet_name] : U3.icon socks_s = new/icon(u3_icon, "sk_[U3.icon_state]_s", ICON_OVERLAY) var/icon/clothes_s = null var/has_gloves = FALSE if(job_support_low & JOB_ASSISTANT) //This gives the preview icon clothes depending on which job(if any) is set to 'high' clothes_s = new /icon('icons/mob/clothing/under/color.dmi', "grey_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) if(backbag == 2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) else if(backbag == 3 || backbag == 4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) else if(job_support_high)//I hate how this looks, but there's no reason to go through this switch if it's empty switch(job_support_high) if(JOB_HOP) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "hop_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "ianshirt"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_BARTENDER) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "ba_suit_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "tophat"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_BOTANIST) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "hydroponics_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "leather"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "apron"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "nymph"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-hyd"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CHEF) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "chef_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "chef"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "apronchef"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_JANITOR) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "janitor_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suits/bio.dmi', "bio_janitor"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_LIBRARIAN) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "red_suit_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "hairflower"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_QUARTERMASTER) clothes_s = new /icon('icons/mob/clothing/under/cargo.dmi', "qm_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "qmcoat"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CARGOTECH) clothes_s = new /icon('icons/mob/clothing/under/cargo.dmi', "cargo_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "flat_cap"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_SMITH) clothes_s = new /icon('icons/mob/clothing/under/cargo.dmi', "smith_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "smith"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "smithing"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head/softcap.dmi', "smith"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_MINER) clothes_s = new /icon('icons/mob/clothing/under/cargo.dmi', "explorer_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "explorer"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "bearpelt"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "explorerpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-explorer"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_INTERNAL_AFFAIRS) clothes_s = new /icon('icons/mob/clothing/under/procedure.dmi', "iaa_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "briefcase"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "suitjacket_black"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CHAPLAIN) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "chapblack_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "imperium_monk"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CLOWN) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "clown_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "clown"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/mask.dmi', "clown"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "clownpack"), ICON_OVERLAY) if(JOB_MIME) clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "mime_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "white"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/mask.dmi', "mime"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head/beret.dmi', "beret"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "suspenders"), ICON_OVERLAY) has_gloves = TRUE switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_EXPLORER) clothes_s = new /icon('icons/mob/clothing/under/cargo.dmi', "expedition_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "jackboots"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/under/syndicate.dmi', "tactifool_s"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "explorerpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-explorer"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) else if(job_medsci_high) switch(job_medsci_high) if(JOB_RD) clothes_s = new /icon('icons/mob/clothing/under/rnd.dmi', "rd_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_rd_open"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "petehat"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-tox"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_SCIENTIST) clothes_s = new /icon('icons/mob/clothing/under/rnd.dmi', "science_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "white"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_science_open"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "metroid"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-tox"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_XENOBIOLOGIST) clothes_s = new /icon('icons/mob/clothing/under/rnd.dmi', "science_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "white"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_science_open"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "nitrilegloves"), ICON_OVERLAY) if(prob(50)) clothes_s.Blend(new /icon('icons/mob/clothing/mask.dmi', "sterile"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "metroid"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-tox"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CHEMIST) clothes_s = new /icon('icons/mob/clothing/under/medical.dmi', "chemistry_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "white"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_mad_open"), ICON_OVERLAY) else clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_chemist_open"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-chem"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CMO) clothes_s = new /icon('icons/mob/clothing/under/medical.dmi', "cmo_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suits/bio.dmi', "bio_cmo"), ICON_OVERLAY) else clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_cmo_open"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "medicalpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-med"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_DOCTOR) clothes_s = new /icon('icons/mob/clothing/under/medical.dmi', "medical_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "white"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_medical_open"), ICON_OVERLAY) else clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_open"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "medicalpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-med"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CORONER) clothes_s = new /icon('icons/mob/clothing/under/medical.dmi', "medical_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "white"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_coroner_open"), ICON_OVERLAY) else clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_open"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "medicalpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-med"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_GENETICIST) clothes_s = new /icon('icons/mob/clothing/under/rnd.dmi', "genetics_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "white"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "monkeysuit"), ICON_OVERLAY) else clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_genetics_open"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-gen"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_VIROLOGIST) clothes_s = new /icon('icons/mob/clothing/under/medical.dmi', "virology_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "white"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/mask.dmi', "sterile"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_viro_open"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "plaguedoctor"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "medicalpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-vir"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_PSYCHIATRIST) clothes_s = new /icon('icons/mob/clothing/under/medical.dmi', "psych_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "laceups"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_psyche_open"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_PARAMEDIC) clothes_s = new /icon('icons/mob/clothing/under/medical.dmi', "paramedic_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/mask.dmi', "cig_off"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head/softcap.dmi', "paramedic"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "medicalpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-med"), ICON_OVERLAY) if(JOB_ROBOTICIST) clothes_s = new /icon('icons/mob/clothing/under/rnd.dmi', "robotics_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suits/labcoat.dmi', "labcoat_robowhite_open"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) else if(job_engsec_high) switch(job_engsec_high) if(JOB_CAPTAIN) clothes_s = new /icon('icons/mob/clothing/under/captain.dmi', "captain_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "captain_capblue"), ICON_OVERLAY) else clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "captain"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-cap"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_HOS) clothes_s = new /icon('icons/mob/clothing/under/security.dmi', "hos_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "jackboots"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head/beret.dmi', "beret_hos"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "securitypack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-sec"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_WARDEN) clothes_s = new /icon('icons/mob/clothing/under/security.dmi', "warden_s") if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "slippers_worn"), ICON_OVERLAY) else clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "jackboots"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) has_gloves = TRUE switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "securitypack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-sec"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_DETECTIVE) clothes_s = new /icon('icons/mob/clothing/under/security.dmi', "detective_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/mask.dmi', "cigar_on"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "detective"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "detective"), ICON_OVERLAY) has_gloves = TRUE switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_OFFICER) clothes_s = new /icon('icons/mob/clothing/under/security.dmi', "security_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "jackboots"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/head/beret.dmi', "beret_officer"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "securitypack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-sec"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CHIEF) clothes_s = new /icon('icons/mob/clothing/under/engineering.dmi', "ce_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "brown"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "black"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/belt.dmi', "utility"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "hardhat0_white"), ICON_OVERLAY) has_gloves = TRUE if(prob(1)) clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "blueprints"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "engiepack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-eng"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_ENGINEER) clothes_s = new /icon('icons/mob/clothing/under/engineering.dmi', "engineer_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "workboots"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/belt.dmi', "utility"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head.dmi', "hardhat0_yellow"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suits/utility.dmi', "hazard_staff"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "engiepack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-eng"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_ATMOSTECH) clothes_s = new /icon('icons/mob/clothing/under/engineering.dmi', "atmos_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "workboots"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/belt.dmi', "utility"), ICON_OVERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/clothing/suits/utility.dmi', "firefighter"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_AI)//Gives AI and borgs assistant-wear, so they can still customize their character clothes_s = new /icon('icons/mob/clothing/under/color.dmi', "grey_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "straight_jacket"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head/cardborg.dmi', "cardborg_h"), ICON_OVERLAY) if(backbag == 2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) else if(backbag == 3 || backbag == 4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_CYBORG) clothes_s = new /icon('icons/mob/clothing/under/color.dmi', "grey_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suits/cardborg.dmi', "cardborg"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/head/cardborg.dmi', "cardborg_h"), ICON_OVERLAY) if(backbag == 2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) else if(backbag == 3 || backbag == 4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_JUDGE) clothes_s = new /icon('icons/mob/clothing/under/procedure.dmi', "magistrate_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "laceups"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "magirobe"), ICON_UNDERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_NANO) clothes_s = new /icon('icons/mob/clothing/under/procedure.dmi', "ntrep_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "laceups"), ICON_UNDERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_BLUESHIELD) clothes_s = new /icon('icons/mob/clothing/under/procedure.dmi', "blueshield_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "jackboots"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/hands.dmi', "combat"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "blueshield"), ICON_OVERLAY) has_gloves = TRUE switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "securitypack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(JOB_INSTRUCTOR) clothes_s = new /icon('icons/mob/clothing/under/procedure.dmi', "trainer_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "laceups"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "trainercoat"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "securitypack"), ICON_OVERLAY) if(3) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY) if(4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(disabilities & DISABILITY_FLAG_NEARSIGHTED) preview_icon.Blend(new /icon('icons/mob/clothing/eyes.dmi', "glasses"), ICON_OVERLAY) // Observers get tourist outfit. if(for_observer) clothes_s = new /icon('icons/mob/clothing/under/costumes.dmi', "tourist_s") clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "black"), ICON_UNDERLAY) if(backbag == 2) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "backpack"), ICON_OVERLAY) else if(backbag == 3 || backbag == 4) clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY) if(underwear_s) preview_icon.Blend(underwear_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) if(!has_gloves) preview_icon.Blend(hands_icon, ICON_OVERLAY) preview_icon.Blend(face_s, ICON_OVERLAY) preview_icon_front = new(preview_icon, dir = SOUTH) preview_icon_side = new(preview_icon, dir = WEST) qdel(face_s) qdel(underwear_s) qdel(undershirt_s) qdel(socks_s) qdel(clothes_s) #undef ICON_SHIFT_XY /datum/character_save/proc/get_gear_metadata(datum/gear/G) // NYI . = loadout_gear["[G]"] if(!.) . = list() loadout_gear["[G]"] = . /datum/character_save/proc/get_tweak_metadata(datum/gear/G, datum/gear_tweak/tweak) var/list/metadata = get_gear_metadata(G) . = metadata["[tweak]"] if(!.) . = tweak.get_default() metadata["[tweak]"] = . /datum/character_save/proc/set_tweak_metadata(datum/gear/G, datum/gear_tweak/tweak, new_metadata) var/list/metadata = get_gear_metadata(G) metadata["[tweak]"] = new_metadata /datum/character_save/proc/SetJobPreferenceLevel(datum/job/job, level) if(!job) return 0 if(level == 1) // to high // remove any other job(s) set to high job_support_med |= job_support_high job_engsec_med |= job_engsec_high job_medsci_med |= job_medsci_high job_support_high = 0 job_engsec_high = 0 job_medsci_high = 0 if(job.department_flag == JOBCAT_SUPPORT) job_support_low &= ~job.flag job_support_med &= ~job.flag job_support_high &= ~job.flag switch(level) if(1) job_support_high |= job.flag if(2) job_support_med |= job.flag if(3) job_support_low |= job.flag return 1 else if(job.department_flag == JOBCAT_ENGSEC) job_engsec_low &= ~job.flag job_engsec_med &= ~job.flag job_engsec_high &= ~job.flag switch(level) if(1) job_engsec_high |= job.flag if(2) job_engsec_med |= job.flag if(3) job_engsec_low |= job.flag return 1 else if(job.department_flag == JOBCAT_MEDSCI) job_medsci_low &= ~job.flag job_medsci_med &= ~job.flag job_medsci_high &= ~job.flag switch(level) if(1) job_medsci_high |= job.flag if(2) job_medsci_med |= job.flag if(3) job_medsci_low |= job.flag return 1 return 0 /datum/character_save/proc/ShowDisabilityState(mob/user, flag, label) return "
Left-click to raise an occupation preference, right-click to lower it.
Save preferences: Save and Close This Window
Reset preferences: Reset
If job preferences are unavailable: [unavailable_job]
Hover over a job to get more information about it.
"}; // Table within a table for alignment, also allows you to easily add more colomns.
html += "
|
|