diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 1e52ae098db..32cd3ab752a 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -48,7 +48,7 @@ var/datum/data/record/M = new() M.fields["id"] = id M.fields["name"] = H.real_name - M.fields["b_type"] = H.b_type + M.fields["blood_type"] = H.blood_type M.fields["b_dna"] = H.dna.unique_enzymes M.fields["mi_dis"] = "None" M.fields["mi_dis_d"] = "No minor disabilities have been declared." @@ -80,7 +80,7 @@ L.fields["rank"] = H.mind.assigned_role L.fields["age"] = H.age L.fields["sex"] = H.gender - L.fields["b_type"] = H.b_type + L.fields["blood_type"] = H.blood_type L.fields["b_dna"] = H.dna.unique_enzymes L.fields["enzymes"] = H.dna.struc_enzymes L.fields["identity"] = H.dna.uni_identity diff --git a/code/datums/diseases/advance/symptoms/beard.dm b/code/datums/diseases/advance/symptoms/beard.dm index 0182f123349..f6e9dac0781 100644 --- a/code/datums/diseases/advance/symptoms/beard.dm +++ b/code/datums/diseases/advance/symptoms/beard.dm @@ -31,15 +31,15 @@ BONUS var/mob/living/carbon/human/H = M switch(A.stage) if(1, 2) - if(H.f_style == "Shaved") - H.f_style = "Adam Jensen Beard" + if(H.facial_hair_style == "Shaved") + H.facial_hair_style = "Adam Jensen Beard" H.update_hair() if(3, 4) - if(!(H.f_style == "Dwarf Beard") && !(H.h_style == "Very Long Beard") && !(H.h_style == "Full Beard")) - H.f_style = "Full Beard" + if(!(H.facial_hair_style == "Dwarf Beard") && !(H.hair_style == "Very Long Beard") && !(H.hair_style == "Full Beard")) + H.facial_hair_style = "Full Beard" H.update_hair() else - if(!(H.f_style == "Dwarf Beard") && !(H.h_style == "Very Long Beard")) - H.f_style = pick("Dwarf Beard", "Very Long Beard") + if(!(H.facial_hair_style == "Dwarf Beard") && !(H.hair_style == "Very Long Beard")) + H.facial_hair_style = pick("Dwarf Beard", "Very Long Beard") H.update_hair() return \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index 0cdf5363456..69ffefad263 100644 --- a/code/datums/diseases/advance/symptoms/shedding.dm +++ b/code/datums/diseases/advance/symptoms/shedding.dm @@ -32,16 +32,16 @@ BONUS var/mob/living/carbon/human/H = M switch(A.stage) if(3, 4) - if(!(H.h_style == "Bald") && !(H.h_style == "Balding Hair")) + if(!(H.hair_style == "Bald") && !(H.hair_style == "Balding Hair")) H << "Your hair starts to fall out in clumps..." spawn(50) - H.h_style = "Balding Hair" + H.hair_style = "Balding Hair" H.update_hair() if(5) - if(!(H.f_style == "Shaved") || !(H.h_style == "Bald")) + if(!(H.facial_hair_style == "Shaved") || !(H.hair_style == "Bald")) H << "Your hair starts to fall out in clumps..." spawn(50) - H.f_style = "Shaved" - H.h_style = "Bald" + H.facial_hair_style = "Shaved" + H.hair_style = "Bald" H.update_hair() return \ No newline at end of file diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm index 4abcf712004..a5298c7d415 100644 --- a/code/datums/diseases/appendicitis.dm +++ b/code/datums/diseases/appendicitis.dm @@ -19,7 +19,7 @@ if(1) if(prob(5)) affected_mob.emote("cough") if(2) - var/obj/item/organ/appendix/A = getappendix(affected_mob) + var/obj/item/organ/appendix/A = affected_mob.getorgan(/obj/item/organ/appendix) if(A) A.inflamed = 1 A.update_icon() diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm index f5fa4d9fa4b..7c3e810a008 100644 --- a/code/datums/spells/inflict_handler.dm +++ b/code/datums/spells/inflict_handler.dm @@ -27,7 +27,7 @@ target.gib() if("gib_brain") if(ishuman(target) || ismonkey(target)) - var/obj/item/organ/brain/B = getbrain(target) + var/obj/item/organ/brain/B = target.getorgan(/obj/item/organ/brain) if(B) B.loc = get_turf(target) B.transfer_identity(target) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 69a37207977..34712f14759 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -323,49 +323,48 @@ var/list/blood_splatter_icons = list() return 0 if(!istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it. blood_DNA = list() - - //adding blood to items - if(istype(src, /obj/item)) - //apply the blood-splatter overlay if it isn't already in there - if(!blood_DNA.len) - //try to find a pre-processed blood-splatter. otherwise, make a new one - var/index = blood_splatter_index() - var/icon/blood_splatter_icon = blood_splatter_icons[index] - if(!blood_splatter_icon ) - blood_splatter_icon = icon(initial(icon), initial(icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object - blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent) - blood_splatter_icon.Blend(icon('icons/effects/blood.dmi', "itemblood"), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant - blood_splatter_icon = fcopy_rsc(blood_splatter_icon) - blood_splatter_icons[index] = blood_splatter_icon - overlays += blood_splatter_icon - - //if this blood isn't already in the list, add it - if(blood_DNA[M.dna.unique_enzymes]) - return 0 //already bloodied with this blood. Cannot add more. - blood_DNA[M.dna.unique_enzymes] = M.dna.b_type - return 1 //we applied blood to the item - - //adding blood to turfs - else if(istype(src, /turf/simulated)) - var/turf/simulated/T = src - - //get one blood decal and infect it with virus from M.viruses - var/obj/effect/decal/cleanable/blood/B = locate() in T.contents - if(!B) B = new /obj/effect/decal/cleanable/blood(T) - B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type - return 1 //we bloodied the floor - - //adding blood to humans - else if(istype(src, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = src - //if this blood isn't already in the list, add it - if(blood_DNA[H.dna.unique_enzymes]) - return 0 //already bloodied with this blood. Cannot add more. - blood_DNA[H.dna.unique_enzymes] = H.dna.b_type - H.update_inv_gloves() //handles bloody hands overlays and updating - return 1 //we applied blood to the item return +/obj/item/add_blood(mob/living/carbon/M) + if(..() == 0) return 0 + + //apply the blood-splatter overlay if it isn't already in there + if(!blood_DNA.len) + //try to find a pre-processed blood-splatter. otherwise, make a new one + var/index = blood_splatter_index() + var/icon/blood_splatter_icon = blood_splatter_icons[index] + if(!blood_splatter_icon ) + blood_splatter_icon = icon(initial(icon), initial(icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object + blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent) + blood_splatter_icon.Blend(icon('icons/effects/blood.dmi', "itemblood"), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant + blood_splatter_icon = fcopy_rsc(blood_splatter_icon) + blood_splatter_icons[index] = blood_splatter_icon + overlays += blood_splatter_icon + + //if this blood isn't already in the list, add it + if(blood_DNA[M.dna.unique_enzymes]) + return 0 //already bloodied with this blood. Cannot add more. + blood_DNA[M.dna.unique_enzymes] = M.dna.blood_type + return 1 //we applied blood to the item + +/turf/simulated/add_blood(mob/living/carbon/M) + if(..() == 0) return 0 + + var/obj/effect/decal/cleanable/blood/B = locate() in contents //check for existing blood splatter + if(!B) B = new /obj/effect/decal/cleanable/blood(src) //make a bloood splatter if we couldn't find one + B.blood_DNA[M.dna.unique_enzymes] = M.dna.blood_type + return 1 //we bloodied the floor + +/mob/living/carbon/human/add_blood(mob/living/carbon/M) + if(..() == 0) return 0 + + if(blood_DNA[M.dna.unique_enzymes]) + return 0 //already bloodied with this blood. Cannot add more. + blood_DNA[M.dna.unique_enzymes] = M.dna.blood_type + update_inv_gloves() //handles bloody hands overlays and updating + return 1 //we applied blood to the item + + /atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0) if( istype(src, /turf/simulated) ) var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src) @@ -385,7 +384,7 @@ var/list/blood_splatter_icons = list() if(check_dna_integrity(M)) //mobs with dna = (monkeys + humans at time of writing) var/obj/effect/decal/cleanable/blood/B = locate() in contents if(!B) B = new(src) - B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type + B.blood_DNA[M.dna.unique_enzymes] = M.dna.blood_type else if(istype(M, /mob/living/carbon/alien)) var/obj/effect/decal/cleanable/xenoblood/B = locate() in contents if(!B) B = new(src) diff --git a/code/game/dna.dm b/code/game/dna.dm index dafb588145b..b62df08103b 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -19,12 +19,12 @@ var/unique_enzymes var/struc_enzymes var/uni_identity - var/b_type + var/blood_type var/mutantrace = null //The type of mutant race the player is if applicable (i.e. potato-man) var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings, /datum/dna/New() - if(!b_type) b_type = random_blood_type() + if(!blood_type) blood_type = random_blood_type() /datum/dna/proc/generate_uni_identity(mob/living/carbon/character) . = "" @@ -33,13 +33,13 @@ L[DNA_GENDER_BLOCK] = construct_block((character.gender!=MALE)+1, 2) if(istype(character, /mob/living/carbon/human)) var/mob/living/carbon/human/H = character - L[DNA_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.h_style), hair_styles_list.len) - L[DNA_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.h_color) - L[DNA_FACIAL_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.f_style), facial_hair_styles_list.len) - L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.f_color) + L[DNA_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.hair_style), hair_styles_list.len) + L[DNA_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.hair_color) + L[DNA_FACIAL_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.facial_hair_style), facial_hair_styles_list.len) + L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.facial_hair_color) L[DNA_SKIN_TONE_BLOCK] = construct_block(skin_tones.Find(H.skin_tone), skin_tones.len) L[DNA_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.eye_color) - + for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++) if(L[i]) . += L[i] else . += random_string(DNA_BLOCK_SIZE,hex_characters) @@ -70,32 +70,32 @@ return if(!owner.dna) owner.dna = new /datum/dna() - + if(real_name) owner.real_name = real_name owner.dna.generate_unique_enzymes(owner) - + if(blood_type) - owner.dna.b_type = blood_type - + owner.dna.blood_type = blood_type + if(ui) owner.dna.uni_identity = ui updateappearance(owner) - + var/update_mutantrace = (mutantrace != owner.dna.mutantrace) owner.dna.mutantrace = mutantrace if(update_mutantrace && istype(owner, /mob/living/carbon/human)) var/mob/living/carbon/human/H = owner H.update_body() H.update_hair() - + if(se) owner.dna.struc_enzymes = se domutcheck(owner) - + check_dna_integrity(owner) return owner.dna - + /proc/check_dna_integrity(mob/living/carbon/character) if(!istype(character)) return @@ -103,9 +103,9 @@ if(ready_dna(character)) return character.dna return - + if(length(character.dna.uni_identity) != DNA_UNI_IDENTITY_BLOCKS*DNA_BLOCK_SIZE) - character.dna.uni_identity = character.dna.generate_uni_identity(character) + character.dna.uni_identity = character.dna.generate_uni_identity(character) if(length(character.dna.struc_enzymes)!= DNA_STRUC_ENZYMES_BLOCKS*DNA_BLOCK_SIZE) character.dna.struc_enzymes = character.dna.generate_struc_enzymes() if(!character.dna.real_name || length(character.dna.unique_enzymes) != DNA_UNIQUE_ENZYMES_LEN) @@ -118,7 +118,7 @@ if(!character.dna) character.dna = new /datum/dna() if(blood_type) - character.dna.b_type = blood_type + character.dna.blood_type = blood_type character.dna.real_name = character.real_name character.dna.uni_identity = character.dna.generate_uni_identity(character) character.dna.struc_enzymes = character.dna.generate_struc_enzymes(character) @@ -202,17 +202,17 @@ /proc/updateappearance(mob/living/carbon/C) if(!check_dna_integrity(C)) return 0 - + var/structure = C.dna.uni_identity C.gender = (deconstruct_block(getblock(structure, DNA_GENDER_BLOCK), 2)-1) ? FEMALE : MALE if(istype(C, /mob/living/carbon/human)) var/mob/living/carbon/human/H = C - H.h_color = sanitize_hexcolor(getblock(structure, DNA_HAIR_COLOR_BLOCK)) - H.f_color = sanitize_hexcolor(getblock(structure, DNA_FACIAL_HAIR_COLOR_BLOCK)) + H.hair_color = sanitize_hexcolor(getblock(structure, DNA_HAIR_COLOR_BLOCK)) + H.facial_hair_color = sanitize_hexcolor(getblock(structure, DNA_FACIAL_HAIR_COLOR_BLOCK)) H.skin_tone = skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), skin_tones.len)] H.eye_color = sanitize_hexcolor(getblock(structure, DNA_EYE_COLOR_BLOCK)) - H.f_style = facial_hair_styles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIR_STYLE_BLOCK), facial_hair_styles_list.len)] - H.h_style = hair_styles_list[deconstruct_block(getblock(structure, DNA_HAIR_STYLE_BLOCK), hair_styles_list.len)] + H.facial_hair_style = facial_hair_styles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIR_STYLE_BLOCK), facial_hair_styles_list.len)] + H.hair_style = hair_styles_list[deconstruct_block(getblock(structure, DNA_HAIR_STYLE_BLOCK), hair_styles_list.len)] H.update_body() H.update_hair() @@ -236,7 +236,7 @@ blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), GOOD_MUTATION_DIFFICULTY) == GOOD_MUTATION_DIFFICULTY) for(var/i in op_se_blocks) //Overpowered mutations...extra difficult to obtain blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), OP_MUTATION_DIFFICULTY) == OP_MUTATION_DIFFICULTY) - + if(blocks[NEARSIGHTEDBLOCK]) M.disabilities |= NEARSIGHTED M << "\red Your eyes feel strange." @@ -352,7 +352,7 @@ /obj/machinery/dna_scannernew/proc/toggle_open() if(open) return close() else return open() - + /obj/machinery/dna_scannernew/proc/close() if(open) open = 0 @@ -367,7 +367,7 @@ C.stop_pulling() break icon_state = initial(icon_state) + (occupant ? "_occupied" : "") - + // search for ghosts, if the corpse is empty and the scanner is connected to a cloner if(occupant) if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \ @@ -381,9 +381,9 @@ if(ghost.can_reenter_corpse) ghost << "Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned! (Verbs -> Ghost -> Re-enter corpse)" break - + return 1 - + /obj/machinery/dna_scannernew/proc/open() if(!open) if(locked) @@ -467,7 +467,7 @@ density = 1 var/radduration = 2 var/radstrength = 1 - + var/list/buffer[NUMBER_OF_BUFFERS] var/injectorready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete @@ -614,7 +614,7 @@ occupant_status += "Invalid DNA structure" else occupant_status += "No subject detected" - + if(connected.open) scanner_status = "Open" else @@ -628,7 +628,7 @@ else occupant_status += "----" scanner_status += "Error: No scanner detected" - + var/status = "
Medical Data| Name | DNA | Blood Type |
|---|---|---|
| [H] | [H.dna.unique_enzymes] | [H.b_type] |
| [H] | [H.dna.unique_enzymes] | [H.blood_type] |
| "
- dat += "Blood Type: [b_type] " + dat += "Blood Type: [blood_type] " dat += "Skin Tone: [skin_tone] " dat += "Underwear: [underwear] " dat += "Backpack: [backbaglist[backbag]] " @@ -171,16 +171,16 @@ datum/preferences dat += " Hair Style" - dat += "[h_style]" - dat += " Change " + dat += "[hair_style] " + dat += " Change " dat += " | "
dat += "Facial Hair Style" - dat += "[f_style]" - dat += " Change " + dat += "[facial_hair_style] " + dat += " Change " dat += " | "
@@ -520,13 +520,13 @@ datum/preferences
if("age")
age = rand(AGE_MIN, AGE_MAX)
if("hair")
- h_color = random_short_color()
- if("h_style")
- h_style = random_hair_style(gender)
+ hair_color = random_short_color()
+ if("hair_style")
+ hair_style = random_hair_style(gender)
if("facial")
- f_color = random_short_color()
- if("f_style")
- f_style = random_facial_hair_style(gender)
+ facial_hair_color = random_short_color()
+ if("facial_hair_style")
+ facial_hair_style = random_facial_hair_style(gender)
if("underwear")
underwear = random_underwear(gender)
if("eyes")
@@ -565,31 +565,31 @@ datum/preferences
if("hair")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as null|color
if(new_hair)
- h_color = sanitize_hexcolor(new_hair)
+ hair_color = sanitize_hexcolor(new_hair)
- if("h_style")
- var/new_h_style
+ if("hair_style")
+ var/new_hair_style
if(gender == MALE)
- new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_male_list
+ new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_male_list
else
- new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_female_list
- if(new_h_style)
- h_style = new_h_style
+ new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_female_list
+ if(new_hair_style)
+ hair_style = new_hair_style
if("facial")
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as null|color
if(new_facial)
- f_color = sanitize_hexcolor(new_facial)
+ facial_hair_color = sanitize_hexcolor(new_facial)
- if("f_style")
- var/new_f_style
+ if("facial_hair_style")
+ var/new_facial_hair_style
if(gender == MALE)
- new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_male_list
+ new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_male_list
else
- new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_female_list
- if(new_f_style)
- f_style = new_f_style
+ new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_female_list
+ if(new_facial_hair_style)
+ facial_hair_style = new_facial_hair_style
if("underwear")
var/new_underwear
@@ -630,8 +630,8 @@ datum/preferences
else
gender = MALE
underwear = random_underwear(gender)
- f_style = random_facial_hair_style(gender)
- h_style = random_hair_style(gender)
+ facial_hair_style = random_facial_hair_style(gender)
+ hair_style = random_hair_style(gender)
if("hear_adminhelps")
toggles ^= SOUND_ADMINHELP
@@ -708,15 +708,15 @@ datum/preferences
character.gender = gender
character.age = age
- character.b_type = b_type
+ character.blood_type = blood_type
character.eye_color = eye_color
- character.h_color = h_color
- character.f_color = f_color
+ character.hair_color = hair_color
+ character.facial_hair_color = facial_hair_color
character.skin_tone = skin_tone
- character.h_style = h_style
- character.f_style = f_style
+ character.hair_style = hair_style
+ character.facial_hair_style = facial_hair_style
character.underwear = underwear
if(backbag > 3 || backbag < 1)
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 1c4edf7acf6..29a289dd610 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -157,12 +157,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["name_is_always_random"] >> be_random_name
S["gender"] >> gender
S["age"] >> age
- S["hair_color"] >> h_color
- S["facial_hair_color"] >> f_color
+ S["hair_color"] >> hair_color
+ S["facial_hair_color"] >> facial_hair_color
S["eye_color"] >> eye_color
S["skin_tone"] >> skin_tone
- S["hair_style_name"] >> h_style
- S["facial_style_name"] >> f_style
+ S["hair_style_name"] >> hair_style
+ S["facial_style_name"] >> facial_hair_style
S["underwear"] >> underwear
S["backbag"] >> backbag
@@ -189,16 +189,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)
if(gender == MALE)
- h_style = sanitize_inlist(h_style, hair_styles_male_list)
- f_style = sanitize_inlist(f_style, facial_hair_styles_male_list)
+ hair_style = sanitize_inlist(hair_style, hair_styles_male_list)
+ facial_hair_style = sanitize_inlist(facial_hair_style, facial_hair_styles_male_list)
underwear = sanitize_inlist(underwear, underwear_m)
else
- h_style = sanitize_inlist(h_style, hair_styles_female_list)
- f_style = sanitize_inlist(f_style, facial_hair_styles_female_list)
+ hair_style = sanitize_inlist(hair_style, hair_styles_female_list)
+ facial_hair_style = sanitize_inlist(facial_hair_style, facial_hair_styles_female_list)
underwear = sanitize_inlist(underwear, underwear_f)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
- h_color = sanitize_hexcolor(h_color, 3, 0)
- f_color = sanitize_hexcolor(f_color, 3, 0)
+ hair_color = sanitize_hexcolor(hair_color, 3, 0)
+ facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
eye_color = sanitize_hexcolor(eye_color, 3, 0)
skin_tone = sanitize_inlist(skin_tone, skin_tones)
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
@@ -230,12 +230,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["name_is_always_random"] << be_random_name
S["gender"] << gender
S["age"] << age
- S["hair_color"] << h_color
- S["facial_hair_color"] << f_color
+ S["hair_color"] << hair_color
+ S["facial_hair_color"] << facial_hair_color
S["eye_color"] << eye_color
S["skin_tone"] << skin_tone
- S["hair_style_name"] << h_style
- S["facial_style_name"] << f_style
+ S["hair_style_name"] << hair_style
+ S["facial_style_name"] << facial_hair_style
S["underwear"] << underwear
S["backbag"] << backbag
diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm
index 6b072e44831..ed688cffedf 100644
--- a/code/modules/clothing/head/misc_special.dm
+++ b/code/modules/clothing/head/misc_special.dm
@@ -159,8 +159,8 @@
if(!istype(user)) return
mob = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kitty")
mob2 = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kitty2")
- mob.Blend("#[user.h_color]", ICON_ADD)
- mob2.Blend("#[user.h_color]", ICON_ADD)
+ mob.Blend("#[user.hair_color]", ICON_ADD)
+ mob2.Blend("#[user.hair_color]", ICON_ADD)
var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner")
var/icon/earbit2 = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner2")
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
index db7e7f2900b..d0ccb3dd843 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
@@ -25,7 +25,7 @@
// Queen check
var/no_queen = 1
for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
- if(!Q.key || !getbrain(Q))
+ if(!Q.key || !Q.getorgan(/obj/item/organ/brain))
continue
no_queen = 0
diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm
index a47695aedb5..ff87953a519 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/life.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm
@@ -304,7 +304,7 @@
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
- if(health < config.health_threshold_dead || !getbrain(src))
+ if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
stat = DEAD
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index f2cf27b038e..0e7b4f40a32 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -222,7 +222,7 @@
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
- if(health < -25 || !getbrain(src))
+ if(health < -25 || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
silent = 0
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index 1f6e1f9e1a9..2fc616e6106 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -61,7 +61,7 @@
//since these people will be dead M != usr
- if(!getbrain(M))
+ if(!M.getorgan(/obj/item/organ/brain))
user.drop_item()
for(var/mob/O in viewers(M, null))
if(O == (user || M))
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 5bf09166443..e292afcceed 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -202,7 +202,7 @@
var/appears_dead = 0
if(stat == DEAD || (status_flags & FAKEDEATH))
appears_dead = 1
- if(getbrain(src))//Only perform these checks if there is no brain
+ if(getorgan(/obj/item/organ/brain))//Only perform these checks if there is no brain
msg += "[t_He] [t_is] limp and unresponsive; there are no signs of life"
if(!key)
@@ -260,10 +260,11 @@
else if(getBrainLoss() >= 60)
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
- if(!key && getbrain(src))
- msg += "[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely\n"
- else if(!client && getbrain(src))
- msg += "[t_He] [t_has] a vacant, braindead stare...\n"
+ if(getorgan(/obj/item/organ/brain))
+ if(!key)
+ msg += "[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely\n"
+ else if(!client)
+ msg += "[t_He] [t_has] a vacant, braindead stare...\n"
if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index a773b91d671..29858713549 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -1,11 +1,11 @@
/mob/living/carbon/human
//Hair colour and style
- var/h_color = "000"
- var/h_style = "Bald"
+ var/hair_color = "000"
+ var/hair_style = "Bald"
//Facial hair colour and style
- var/f_color = "000"
- var/f_style = "Shaved"
+ var/facial_hair_color = "000"
+ var/facial_hair_style = "Shaved"
//Eye colour
var/eye_color = "000"
@@ -15,7 +15,7 @@
var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup
var/age = 30 //Player's age (pure fluff)
- var/b_type = "A+" //Player's bloodtype (Not currently used, just character fluff)
+ var/blood_type = "A+" //Player's bloodtype (Not currently used, just character fluff)
var/underwear = "Nude" //Which underwear the player wants
var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack.
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index fe28ce44793..27aa1113e2b 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -204,11 +204,11 @@
src << "\red You feel weak."
emote("collapse")
if(prob(15))
- if(!(f_style == "Shaved") || !(h_style == "Bald"))
+ if(!( hair_style == "Shaved") || !(hair_style == "Bald"))
src << "Your hair starts to fall out in clumps..."
spawn(50)
- f_style = "Shaved"
- h_style = "Bald"
+ facial_hair_style = "Shaved"
+ hair_style = "Bald"
update_hair()
updatehealth()
@@ -812,7 +812,7 @@
silent = 0
else //ALIVE. LIGHTS ARE ON
updatehealth() //TODO
- if(health <= config.health_threshold_dead || !getbrain(src))
+ if(health <= config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
silent = 0
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 70f989d9727..58c8cce0122 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -42,7 +42,7 @@ There are several things that need to be remembered:
> There are also these special cases:
update_mutations() //handles updating your appearance for certain mutations. e.g TK head-glows
update_damage_overlays() //handles damage overlays for brute/burn damage
- update_base_icon_state() //Handles updating var/base_icon_state (WIP) This is used to update the
+ update_base_icon_state() //Handles updating var/base_icon_state (WIP) This is used to update the
mob's icon_state easily e.g. "[base_icon_state]_s" is the standing icon_state
update_body() //Handles updating your mob's icon_state (using update_base_icon_state())
as well as sprite-accessories that didn't really fit elsewhere (underwear, lips, eyes)
@@ -99,8 +99,8 @@ Please contact me on #coderbus IRC. ~Carnie x
if(HUSK in mutations)
base_icon_state = "husk"
else
- base_icon_state = "[skin_tone]_[(gender == FEMALE) ? "f" : "m"]"
-
+ base_icon_state = "[skin_tone]_[(gender == FEMALE) ? "f" : "m"]"
+
/mob/living/carbon/human/proc/apply_overlay(cache_index)
var/image/I = lying ? overlays_lying[cache_index] : overlays_standing[cache_index]
@@ -122,7 +122,7 @@ Please contact me on #coderbus IRC. ~Carnie x
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
update_hud() //TODO: remove the need for this
overlays.Cut()
-
+
if(lying) //can't be cloaked whilst lying down
icon_state = "[base_icon_state]_l"
for(var/thing in overlays_lying)
@@ -154,12 +154,12 @@ Please contact me on #coderbus IRC. ~Carnie x
//constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists
/mob/living/carbon/human/update_damage_overlays()
remove_overlay(DAMAGE_LAYER)
-
+
var/image/standing = image("icon"='icons/mob/dam_human.dmi', "icon_state"="blank", "layer"=-DAMAGE_LAYER)
var/image/lying = image("icon"='icons/mob/dam_human.dmi', "icon_state"="blank2", "layer"=-DAMAGE_LAYER)
overlays_standing[DAMAGE_LAYER] = standing
overlays_lying[DAMAGE_LAYER] = lying
-
+
for(var/datum/limb/O in organs)
if(O.brutestate)
standing.overlays += "[O.icon_name]_[O.brutestate]0" //we're adding icon_states of the base image as overlays
@@ -167,7 +167,7 @@ Please contact me on #coderbus IRC. ~Carnie x
if(O.burnstate)
standing.overlays += "[O.icon_name]_0[O.burnstate]"
lying.overlays += "[O.icon_name]2_0[O.burnstate]"
-
+
apply_overlay(DAMAGE_LAYER)
@@ -181,38 +181,39 @@ Please contact me on #coderbus IRC. ~Carnie x
return
//base icons
+ var/datum/sprite_accessory/S
var/list/standing = list()
var/list/lying = list()
-
- if(f_style)
- var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
- if(facial_hair_style)
- var/icon/facial_s = icon("icon"=facial_hair_style.icon, "icon_state"="[facial_hair_style.icon_state]_s")
- var/icon/facial_l = icon("icon"=facial_hair_style.icon, "icon_state"="[facial_hair_style.icon_state]_l")
- facial_s.Blend("#[f_color]", ICON_ADD)
- facial_l.Blend("#[f_color]", ICON_ADD)
+
+ if(facial_hair_style)
+ S = facial_hair_styles_list[facial_hair_style]
+ if(S)
+ var/icon/facial_s = icon("icon"=S.icon, "icon_state"="[S.icon_state]_s")
+ var/icon/facial_l = icon("icon"=S.icon, "icon_state"="[S.icon_state]_l")
+ facial_s.Blend("#[facial_hair_color]", ICON_ADD)
+ facial_l.Blend("#[facial_hair_color]", ICON_ADD)
standing += image("icon"=facial_s, "layer"=-HAIR_LAYER)
lying += image("icon"=facial_l, "layer"=-HAIR_LAYER)
//Applies the debrained overlay if there is no brain
- if(!getbrain(src))
+ if(!getorgan(/obj/item/organ/brain))
standing += image("icon"='icons/mob/human_face.dmi', "icon_state"="debrained_s", "layer"=-HAIR_LAYER)
lying += image("icon"='icons/mob/human_face.dmi', "icon_state"="debrained_l", "layer"=-HAIR_LAYER)
- else if(h_style)
- var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
- if(hair_style)
- var/icon/hair_s = icon("icon"=hair_style.icon, "icon_state"="[hair_style.icon_state]_s")
- var/icon/hair_l = icon("icon"=hair_style.icon, "icon_state"="[hair_style.icon_state]_l")
- hair_s.Blend("#[h_color]", ICON_ADD)
- hair_l.Blend("#[h_color]", ICON_ADD)
+ else if(hair_style)
+ S = hair_styles_list[hair_style]
+ if(S)
+ var/icon/hair_s = icon("icon"=S.icon, "icon_state"="[S.icon_state]_s")
+ var/icon/hair_l = icon("icon"=S.icon, "icon_state"="[S.icon_state]_l")
+ hair_s.Blend("#[hair_color]", ICON_ADD)
+ hair_l.Blend("#[hair_color]", ICON_ADD)
standing += image("icon"=hair_s, "layer"=-HAIR_LAYER)
lying += image("icon"=hair_l, "layer"=-HAIR_LAYER)
if(lying.len)
overlays_lying[HAIR_LAYER] = lying
if(standing.len)
- overlays_standing[HAIR_LAYER] = standing
-
+ overlays_standing[HAIR_LAYER] = standing
+
apply_overlay(HAIR_LAYER)
@@ -221,7 +222,7 @@ Please contact me on #coderbus IRC. ~Carnie x
var/list/standing = list()
var/list/lying = list()
-
+
var/g = (gender == FEMALE) ? "f" : "m"
for(var/mut in mutations)
switch(mut)
@@ -241,19 +242,19 @@ Please contact me on #coderbus IRC. ~Carnie x
overlays_lying[MUTATIONS_LAYER] = lying
if(standing.len)
overlays_standing[MUTATIONS_LAYER] = standing
-
+
apply_overlay(MUTATIONS_LAYER)
/mob/living/carbon/human/proc/update_body()
remove_overlay(BODY_LAYER)
-
+
update_base_icon_state()
icon_state = "[base_icon_state]_[src.lying ? "l" : "s"]"
-
+
var/list/lying = list()
var/list/standing = list()
-
+
//Mouth (lipstick!)
if(lip_style)
standing += image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[lip_style]_s", "layer"=-BODY_LAYER)
@@ -274,12 +275,12 @@ Please contact me on #coderbus IRC. ~Carnie x
if(U)
standing += image("icon"=U.icon, "icon_state"="[U.icon_state]_s", "layer"=-BODY_LAYER)
lying += image("icon"=U.icon, "icon_state"="[U.icon_state]_l", "layer"=-BODY_LAYER)
-
+
if(lying.len)
overlays_lying[BODY_LAYER] = lying
if(standing.len)
overlays_standing[BODY_LAYER] = standing
-
+
apply_overlay(BODY_LAYER)
/* --------------------------------------- */
@@ -315,24 +316,24 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_w_uniform()
remove_overlay(UNIFORM_LAYER)
-
+
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
w_uniform.screen_loc = ui_iclothing
client.screen += w_uniform
-
+
var/t_color = w_uniform.color
if(!t_color) t_color = icon_state
var/image/lying = image("icon"='icons/mob/uniform.dmi', "icon_state"="[t_color]_l", "layer"=-UNIFORM_LAYER)
var/image/standing = image("icon"='icons/mob/uniform.dmi', "icon_state"="[t_color]_s", "layer"=-UNIFORM_LAYER)
overlays_lying[UNIFORM_LAYER] = lying
overlays_standing[UNIFORM_LAYER] = standing
-
+
if(w_uniform.blood_DNA)
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="uniformblood2")
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="uniformblood")
-
+
if(U.hastie)
var/tie_color = U.hastie.color
if(!tie_color) tie_color = U.hastie.icon_state
@@ -342,7 +343,7 @@ Please contact me on #coderbus IRC. ~Carnie x
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
for(var/obj/item/thing in list(r_store, l_store, wear_id, belt)) //
drop_from_inventory(thing)
-
+
apply_overlay(UNIFORM_LAYER)
@@ -352,10 +353,10 @@ Please contact me on #coderbus IRC. ~Carnie x
if(client && hud_used && hud_used.hud_shown)
wear_id.screen_loc = ui_id //TODO
client.screen += wear_id
-
+
overlays_lying[ID_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="id2", "layer"=-ID_LAYER)
overlays_standing[ID_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="id", "layer"=-ID_LAYER)
-
+
apply_overlay(ID_LAYER)
@@ -372,7 +373,7 @@ Please contact me on #coderbus IRC. ~Carnie x
var/image/standing = image("icon"='icons/mob/hands.dmi', "icon_state"="[t_state]", "layer"=-GLOVES_LAYER)
overlays_lying[GLOVES_LAYER] = lying
overlays_standing[GLOVES_LAYER] = standing
-
+
if(gloves.blood_DNA)
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands2")
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands")
@@ -380,19 +381,19 @@ Please contact me on #coderbus IRC. ~Carnie x
if(blood_DNA)
overlays_lying[GLOVES_LAYER] = image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands2")
overlays_standing[GLOVES_LAYER] = image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands")
-
+
apply_overlay(GLOVES_LAYER)
/mob/living/carbon/human/update_inv_glasses()
remove_overlay(GLASSES_LAYER)
-
+
if(glasses)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
glasses.screen_loc = ui_glasses
client.screen += glasses
-
+
overlays_lying[GLASSES_LAYER] = image("icon"='icons/mob/eyes.dmi', "icon_state"="[glasses.icon_state]2", "layer"=-GLASSES_LAYER)
overlays_standing[GLASSES_LAYER] = image("icon"='icons/mob/eyes.dmi', "icon_state"="[glasses.icon_state]", "layer"=-GLASSES_LAYER)
@@ -401,63 +402,63 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_ears()
remove_overlay(EARS_LAYER)
-
+
if(ears)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
ears.screen_loc = ui_ears
client.screen += ears
-
+
overlays_lying[EARS_LAYER] = image("icon"='icons/mob/ears.dmi', "icon_state"="[ears.icon_state]2", "layer"=-EARS_LAYER)
overlays_standing[EARS_LAYER] = image("icon"='icons/mob/ears.dmi', "icon_state"="[ears.icon_state]", "layer"=-EARS_LAYER)
-
+
apply_overlay(EARS_LAYER)
/mob/living/carbon/human/update_inv_shoes()
remove_overlay(SHOES_LAYER)
-
+
if(shoes)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
shoes.screen_loc = ui_shoes
client.screen += shoes
-
+
var/image/lying = image("icon"='icons/mob/feet.dmi', "icon_state"="[shoes.icon_state]2", "layer"=-SHOES_LAYER)
var/image/standing = image("icon"='icons/mob/feet.dmi', "icon_state"="[shoes.icon_state]", "layer"=-SHOES_LAYER)
overlays_lying[SHOES_LAYER] = lying
overlays_standing[SHOES_LAYER] = standing
-
+
if(shoes.blood_DNA)
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="shoeblood2")
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="shoeblood")
-
+
apply_overlay(SHOES_LAYER)
/mob/living/carbon/human/update_inv_s_store()
remove_overlay(SUIT_STORE_LAYER)
-
+
if(s_store)
if(client && hud_used && hud_used.hud_shown)
s_store.screen_loc = ui_sstore1 //TODO
client.screen += s_store
-
+
var/t_state = s_store.item_state
if(!t_state) t_state = s_store.icon_state
overlays_lying[SUIT_STORE_LAYER] = image("icon"='icons/mob/belt_mirror.dmi', "icon_state"="[t_state]2", "layer"=-SUIT_STORE_LAYER)
overlays_standing[SUIT_STORE_LAYER] = image("icon"='icons/mob/belt_mirror.dmi', "icon_state"="[t_state]", "layer"=-SUIT_STORE_LAYER)
-
+
apply_overlay(SUIT_STORE_LAYER)
/mob/living/carbon/human/update_inv_head()
remove_overlay(HEAD_LAYER)
-
+
if(head)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
head.screen_loc = ui_head //TODO
client.screen += head
-
+
var/image/lying
var/image/standing
if(istype(head,/obj/item/clothing/head/kitty))
@@ -469,22 +470,22 @@ Please contact me on #coderbus IRC. ~Carnie x
standing = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
overlays_lying[HEAD_LAYER] = lying
overlays_standing[HEAD_LAYER] = standing
-
+
if(head.blood_DNA)
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="helmetblood2")
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="helmetblood")
-
+
apply_overlay(HEAD_LAYER)
/mob/living/carbon/human/update_inv_belt()
remove_overlay(BELT_LAYER)
-
+
if(belt)
if(client && hud_used && hud_used.hud_shown)
belt.screen_loc = ui_belt
client.screen += belt
-
+
var/t_state = belt.item_state
if(!t_state) t_state = belt.icon_state
overlays_lying[BELT_LAYER] = image("icon"='icons/mob/belt.dmi', "icon_state"="[t_state]2", "layer"=-BELT_LAYER)
@@ -496,12 +497,12 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_wear_suit()
remove_overlay(SUIT_LAYER)
-
+
if(istype(wear_suit, /obj/item/clothing/suit))
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
wear_suit.screen_loc = ui_oclothing //TODO
client.screen += wear_suit
-
+
var/image/lying = image("icon"='icons/mob/suit.dmi', "icon_state"="[wear_suit.icon_state]2", "layer"=-SUIT_LAYER)
var/image/standing = image("icon"='icons/mob/suit.dmi', "icon_state"="[wear_suit.icon_state]", "layer"=-SUIT_LAYER)
overlays_lying[SUIT_LAYER] = lying
@@ -533,36 +534,36 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_wear_mask()
remove_overlay(FACEMASK_LAYER)
-
+
if(istype(wear_mask, /obj/item/clothing/mask))
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
wear_mask.screen_loc = ui_mask //TODO
client.screen += wear_mask
-
+
var/image/lying = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]2", "layer"=-FACEMASK_LAYER)
var/image/standing = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
overlays_lying[FACEMASK_LAYER] = lying
overlays_standing[FACEMASK_LAYER] = standing
-
+
if(wear_mask.blood_DNA && !istype(wear_mask, /obj/item/clothing/mask/cigarette))
lying.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood2")
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood")
-
+
apply_overlay(FACEMASK_LAYER)
/mob/living/carbon/human/update_inv_back()
remove_overlay(BACK_LAYER)
-
+
if(back)
if(client && hud_used && hud_used.hud_shown)
back.screen_loc = ui_back //TODO
client.screen += back
-
+
overlays_lying[BACK_LAYER] = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]2", "layer"=-BACK_LAYER)
overlays_standing[BACK_LAYER] = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
-
+
apply_overlay(BACK_LAYER)
@@ -576,7 +577,7 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_handcuffed()
remove_overlay(HANDCUFF_LAYER)
-
+
if(handcuffed)
drop_r_hand()
drop_l_hand()
@@ -595,19 +596,19 @@ Please contact me on #coderbus IRC. ~Carnie x
var/obj/screen/inventory/L = hud_used.adding[4]
R.overlays = null
L.overlays = null
-
+
apply_overlay(HANDCUFF_LAYER)
/mob/living/carbon/human/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
-
+
if(legcuffed)
if(src.m_intent != "walk")
src.m_intent = "walk"
if(src.hud_used && src.hud_used.move_intent)
src.hud_used.move_intent.icon_state = "walking"
-
+
overlays_lying[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff2", "layer"=-LEGCUFF_LAYER)
overlays_standing[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
@@ -617,34 +618,34 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_r_hand()
remove_overlay(R_HAND_LAYER)
-
+
if(r_hand)
if(client)
r_hand.screen_loc = ui_rhand //TODO
client.screen += r_hand
-
+
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
-
+
overlays_standing[R_HAND_LAYER] = image("icon"='icons/mob/items_righthand.dmi', "icon_state"="[t_state]", "layer"=-R_HAND_LAYER)
-
+
apply_overlay(R_HAND_LAYER)
/mob/living/carbon/human/update_inv_l_hand()
remove_overlay(L_HAND_LAYER)
-
+
if(l_hand)
if(client)
l_hand.screen_loc = ui_lhand //TODO
client.screen += l_hand
-
+
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
-
+
overlays_standing[L_HAND_LAYER] = image("icon"='icons/mob/items_lefthand.dmi', "icon_state"="[t_state]", "layer"=-L_HAND_LAYER)
-
+
apply_overlay(L_HAND_LAYER)
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index ded6664414e..487ddc5215b 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -398,7 +398,7 @@
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
- if(health < config.health_threshold_dead || !getbrain(src))
+ if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
stat = DEAD
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index 5ced7b62d2b..3d076b547d8 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -439,7 +439,7 @@
else
dat += "Requested medical record not found. " if ((istype(src.medicalActive2, /datum/data/record) && data_core.medical.Find(src.medicalActive2))) - dat += text(" \n \nBlood Type: [] \nDNA: [] \n \nMinor Disabilities: [] \nDetails: [] \n \nMajor Disabilities: [] \nDetails: [] \n \nAllergies: [] \nDetails: [] \n \nCurrent Diseases: [] (per disease info placed in log/comment section) \nDetails: [] \n \nImportant Notes: \n\t[] \n \n ", src, src.medicalActive2.fields["b_type"], src, src.medicalActive2.fields["b_dna"], src, src.medicalActive2.fields["mi_dis"], src, src.medicalActive2.fields["mi_dis_d"], src, src.medicalActive2.fields["ma_dis"], src, src.medicalActive2.fields["ma_dis_d"], src, src.medicalActive2.fields["alg"], src, src.medicalActive2.fields["alg_d"], src, src.medicalActive2.fields["cdi"], src, src.medicalActive2.fields["cdi_d"], src, src.medicalActive2.fields["notes"]) + dat += text(" \n \nBlood Type: [] \nDNA: [] \n \nMinor Disabilities: [] \nDetails: [] \n \nMajor Disabilities: [] \nDetails: [] \n \nAllergies: [] \nDetails: [] \n \nCurrent Diseases: [] (per disease info placed in log/comment section) \nDetails: [] \n \nImportant Notes: \n\t[] \n \n ", src, src.medicalActive2.fields["blood_type"], src, src.medicalActive2.fields["b_dna"], src, src.medicalActive2.fields["mi_dis"], src, src.medicalActive2.fields["mi_dis_d"], src, src.medicalActive2.fields["ma_dis"], src, src.medicalActive2.fields["ma_dis_d"], src, src.medicalActive2.fields["alg"], src, src.medicalActive2.fields["alg_d"], src, src.medicalActive2.fields["cdi"], src, src.medicalActive2.fields["cdi_d"], src, src.medicalActive2.fields["notes"]) else dat += " Requested medical record not found. " dat += text(" \nBack ", src) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 20bd4498695..b8f1654c831 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -346,7 +346,7 @@ new_character.name = real_name - ready_dna(new_character, client.prefs.b_type) + ready_dna(new_character, client.prefs.blood_type) new_character.key = key //Manually transfer the key to log them in diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 7cfb72db6c3..ca2309473a7 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -7,10 +7,10 @@ datum/preferences gender = pick(MALE,FEMALE) underwear = random_underwear(gender) skin_tone = random_skin_tone() - h_style = random_hair_style(gender) - f_style = random_facial_hair_style(gender) - h_color = random_short_color() - f_color = h_color + hair_style = random_hair_style(gender) + facial_hair_style = random_facial_hair_style(gender) + hair_color = random_short_color() + facial_hair_color = hair_color eye_color = random_eye_color() backbag = 2 age = rand(AGE_MIN,AGE_MAX) @@ -25,24 +25,25 @@ datum/preferences preview_icon = new /icon('icons/mob/human.dmi', "[skin_tone]_[g]_s") + var/datum/sprite_accessory/S if(underwear) - var/datum/sprite_accessory/underwear/U = underwear_all[underwear] - if(U) - preview_icon.Blend(new /icon(U.icon, "[U.icon_state]_s"), ICON_OVERLAY) + S = underwear_all[underwear] + if(S) + preview_icon.Blend(new /icon(S.icon, "[S.icon_state]_s"), ICON_OVERLAY) var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes_s") eyes_s.Blend("#[eye_color]", 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("#[h_color]", ICON_ADD) + S = hair_styles_list[hair_style] + if(S) + var/icon/hair_s = new/icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s") + hair_s.Blend("#[hair_color]", 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("#[f_color]", ICON_ADD) + S = facial_hair_styles_list[facial_hair_style] + if(S) + var/icon/facial_s = new/icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s") + facial_s.Blend("#[facial_hair_color]", ICON_ADD) eyes_s.Blend(facial_s, ICON_OVERLAY) var/icon/clothes_s = null diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index d7fd42a37b7..cf8b0e2cff8 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -128,7 +128,7 @@ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src) P.info = " " P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]] \nSex: [G.fields["sex"]] \nAge: [G.fields["age"]] \nFingerprint: [G.fields["fingerprint"]] \nPhysical Status: [G.fields["p_stat"]] \nMental Status: [G.fields["m_stat"]] " - P.info += " \n \nBlood Type: [M.fields["b_type"]] \nDNA: [M.fields["b_dna"]] \n \nMinor Disabilities: [M.fields["mi_dis"]] \nDetails: [M.fields["mi_dis_d"]] \n \nMajor Disabilities: [M.fields["ma_dis"]] \nDetails: [M.fields["ma_dis_d"]] \n \nAllergies: [M.fields["alg"]] \nDetails: [M.fields["alg_d"]] \n \nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section) \nDetails: [M.fields["cdi_d"]] \n \nImportant Notes: \n\t[M.fields["notes"]] \n \n " + P.info += " \n \nBlood Type: [M.fields["blood_type"]] \nDNA: [M.fields["b_dna"]] \n \nMinor Disabilities: [M.fields["mi_dis"]] \nDetails: [M.fields["mi_dis_d"]] \n \nMajor Disabilities: [M.fields["ma_dis"]] \nDetails: [M.fields["ma_dis_d"]] \n \nAllergies: [M.fields["alg"]] \nDetails: [M.fields["alg_d"]] \n \nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section) \nDetails: [M.fields["cdi_d"]] \n \nImportant Notes: \n\t[M.fields["notes"]] \n \n " var/counter = 1 while(M.fields["com_[counter]"]) P.info += "[M.fields["com_[counter]"]] " diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 343b77f22c0..ce2819ad658 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1659,8 +1659,8 @@ datum H.update_damage_overlays(0) if(prob(meltprob)) //Applies disfigurement H.emote("scream") - H.f_style = "Shaved" - H.h_style = "Bald" + H.facial_hair_style = "Shaved" + H.hair_style = "Bald" H.update_hair(0) H.status_flags |= DISFIGURED else diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index fa401d32e06..8d75e1aa21e 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -85,7 +85,7 @@ B.data["resistances"] = T.resistances.Copy() if(istype(target, /mob/living/carbon/human))//I wish there was some hasproperty operation... var/mob/living/carbon/human/HT = target - B.data["blood_type"] = copytext(HT.dna.b_type,1,0) + B.data["blood_type"] = copytext(HT.dna.blood_type,1,0) var/list/temp_chem = list() for(var/datum/reagent/R in target.reagents.reagent_list) temp_chem += R.name diff --git a/code/modules/surgery/brain_removal.dm b/code/modules/surgery/brain_removal.dm index 6410fc76c2b..de748a8a9d3 100644 --- a/code/modules/surgery/brain_removal.dm +++ b/code/modules/surgery/brain_removal.dm @@ -16,11 +16,11 @@ var/mob/living/carbon/human/H = target H.apply_damage(75,"brute","head") user.visible_message("[user] saws [target]'s skull open!") - return 1 - + return 1 + /datum/surgery_step/extract_brain/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - B = getbrain(target) + B = target.getorgan(/obj/item/organ/brain) if(B) user.visible_message("[user] begins to extract [target]'s brain.") else @@ -33,7 +33,7 @@ B.transfer_identity(target) target.internal_organs -= B if(ishuman(target)) - var/mob/living/carbon/human/H = target + var/mob/living/carbon/human/H = target H.update_hair(0) H.apply_damage(25,"brute","head") user.attack_log += "\[[time_stamp()]\] Debrained [target.name] ([target.ckey]) INTENT: [uppertext(user.a_intent)])" diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index 81bec92a2a3..9d3afe3e1b9 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -22,7 +22,7 @@ return 1 /datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - if(getbrain(target)) + if(target.getorgan(/obj/item/organ/brain)) user.visible_message("[user] accidentally stabs [target] right in the brain!") target.adjustBrainLoss(100) else diff --git a/code/modules/surgery/organs/helpers.dm b/code/modules/surgery/organs/helpers.dm index 93f34f109be..9e6c066869b 100644 --- a/code/modules/surgery/organs/helpers.dm +++ b/code/modules/surgery/organs/helpers.dm @@ -1,12 +1,4 @@ -proc/getbrain(mob/living/carbon/M) - if(istype(M)) - for(var/obj/item/I in M.internal_organs) - if(istype(I, /obj/item/organ/brain)) - return I - - -proc/getappendix(mob/living/carbon/M) - if(istype(M)) - for(var/obj/item/I in M.internal_organs) - if(istype(I, /obj/item/organ/appendix)) - return I \ No newline at end of file +mob/proc/getorgan() + return +mob/living/carbon/getorgan(typepath) + return (locate(typepath) in internal_organs) \ No newline at end of file |