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 = "
" status += "
Scanner:
[scanner_status]
" status += "[occupant_status]" @@ -691,11 +691,11 @@ var/ue = buffer_slot["UE"] var/name = buffer_slot["name"] var/label = buffer_slot["label"] - var/b_type = buffer_slot["b_type"] + var/blood_type = buffer_slot["blood_type"] temp_html += "
\tLabel: [label ? label : name]" temp_html += "
\tSubject: [name]" - if(ue && name && b_type) - temp_html += "
\tBlood Type: [b_type]" + if(ue && name && blood_type) + temp_html += "
\tBlood Type: [blood_type]" temp_html += "
\tUE: [ue] " if(viable_occupant) temp_html += "Occupant " else temp_html += "Occupant" @@ -737,7 +737,7 @@ temp_html += "

Irradiate Subject

" temp_html += "
Unique Identifier:
" - + var/max_line_len = 7*DNA_BLOCK_SIZE if(viable_occupant) temp_html += "
1
" @@ -751,7 +751,7 @@ else temp_html += "----" temp_html += "

" - + temp_html += "
Structural Enzymes:
" if(viable_occupant) temp_html += "
1
" @@ -768,7 +768,7 @@ popup.set_content(temp_html) popup.open() - + /obj/machinery/computer/scan_consolenew/Topic(href, href_list) if(..()) @@ -782,7 +782,7 @@ add_fingerprint(usr) usr.set_machine(src) - + var/mob/living/carbon/viable_occupant if(connected) viable_occupant = connected.occupant @@ -830,7 +830,7 @@ "SE"=viable_occupant.dna.struc_enzymes, "UE"=viable_occupant.dna.unique_enzymes, "name"=viable_occupant.real_name, - "b_type"=viable_occupant.dna.b_type + "blood_type"=viable_occupant.dna.blood_type ) if("clearbuffer") if(num) @@ -854,11 +854,11 @@ viable_occupant.dna.uni_identity = buffer_slot["UI"] updateappearance(viable_occupant) else - if(buffer_slot["name"] && buffer_slot["UE"] && buffer_slot["b_type"]) + if(buffer_slot["name"] && buffer_slot["UE"] && buffer_slot["blood_type"]) viable_occupant.real_name = buffer_slot["name"] viable_occupant.name = buffer_slot["name"] viable_occupant.dna.unique_enzymes = buffer_slot["UE"] - viable_occupant.dna.b_type = buffer_slot["b_type"] + viable_occupant.dna.blood_type = buffer_slot["blood_type"] updateappearance(viable_occupant) if("injector") if(num && injectorready) @@ -876,9 +876,9 @@ I = new /obj/item/weapon/dnainjector(loc) I.fields = list("UI"=buffer_slot["UI"]) else - if(buffer_slot["name"] && buffer_slot["UE"] && buffer_slot["b_type"]) + if(buffer_slot["name"] && buffer_slot["UE"] && buffer_slot["blood_type"]) I = new /obj/item/weapon/dnainjector(loc) - I.fields = list("name"=buffer_slot["name"], "UE"=buffer_slot["UE"], "b_type"=buffer_slot["b_type"]) + I.fields = list("name"=buffer_slot["name"], "UE"=buffer_slot["UE"], "blood_type"=buffer_slot["blood_type"]) if(I) injectorready = 0 spawn(INJECTOR_TIMEOUT) @@ -905,13 +905,13 @@ var/locked_state = connected.locked connected.locked = 1 - + current_screen = "working" ShowInterface(usr) - + sleep(radduration*10) current_screen = "mainmenu" - + if(viable_occupant && connected && connected.occupant==viable_occupant) viable_occupant.radiation += RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength switch(href_list["task"]) @@ -919,42 +919,42 @@ var/len = length(viable_occupant.dna.uni_identity) num = Wrap(num, 1, len+1) num = randomize_radiation_accuracy(num, radduration, len) - + var/block = round((num-1)/DNA_BLOCK_SIZE)+1 var/subblock = num - block*DNA_BLOCK_SIZE last_change = "UI #[block]-[subblock]; " - + var/hex = copytext(viable_occupant.dna.uni_identity, num, num+1) last_change += "[hex]" hex = scramble(hex, radstrength, radduration) last_change += "->[hex]" - + viable_occupant.dna.uni_identity = copytext(viable_occupant.dna.uni_identity, 1, num) + hex + copytext(viable_occupant.dna.uni_identity, num+1, 0) updateappearance(viable_occupant) if("pulsese") var/len = length(viable_occupant.dna.struc_enzymes) num = Wrap(num, 1, len+1) num = randomize_radiation_accuracy(num, radduration, len) - + var/block = round((num-1)/DNA_BLOCK_SIZE)+1 var/subblock = num - block*DNA_BLOCK_SIZE last_change = "SE #[block]-[subblock]; " - + var/hex = copytext(viable_occupant.dna.struc_enzymes, num, num+1) last_change += "[hex]" hex = scramble(hex, radstrength, radduration) last_change += "->[hex]" - + viable_occupant.dna.struc_enzymes = copytext(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext(viable_occupant.dna.struc_enzymes, num+1, 0) domutcheck(viable_occupant, connected) else current_screen = "mainmenu" - + if(connected) connected.locked = locked_state ShowInterface(usr,last_change) - + /////////////////////////// DNA MACHINES #undef INJECTOR_TIMEOUT diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index e3f386edfdb..d74578198e4 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -574,7 +574,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", R.word3 = w3 R.check_icon() R.blood_DNA = list() - R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type + R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type return else user << "The book seems full of illegible scribbles. Is this a joke?" @@ -620,7 +620,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user R.blood_DNA = list() - R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type + R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type switch(r) if("teleport") var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index cecbf903b3e..8aa91815892 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -746,7 +746,7 @@ var/global/mulebot_count = 0 var/obj/effect/decal/cleanable/blood/B = new(src.loc) B.blood_DNA = list() - B.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type + B.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type bloodiness += 4 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 94cbdf5ad1e..f775900cf44 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -42,7 +42,7 @@ if ((M.stat != 2) || (!M.client)) continue //They need a brain! - if (ishuman(M) && !getbrain(M)) + if (ishuman(M) && !M.getorgan(/obj/item/organ/brain)) continue if (M.ckey == find_key) @@ -166,10 +166,10 @@ randmutb(H) //Sometimes the clones come out wrong. if(H.gender == MALE) - H.f_style = "Full Beard" + H.facial_hair_style = "Full Beard" else - H.f_style = "Shaved" - H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") + H.facial_hair_style = "Shaved" + H.hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") H.suiciding = 0 src.attempting = 0 diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 875295b5182..b8e6059257d 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -47,7 +47,7 @@ if(table.check_patient()) patient = table.patient dat += {"Patient Status: [patient.stat ? "Non-Responsive" : "Stable"]
- Blood Type: [patient.b_type]
+ Blood Type: [patient.blood_type]

Health: [round(patient.health)]
Brute Damage: [round(patient.getBruteLoss())]
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index b32a3cc7fe5..94f48f4d9b0 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -169,7 +169,7 @@ var/list/L = list() if(diskette.fields["UI"]) L += "Unique Identifier" - if(diskette.fields["UE"] && diskette.fields["name"] && diskette.fields["b_type"]) + if(diskette.fields["UE"] && diskette.fields["name"] && diskette.fields["blood_type"]) L += "Unique Enzymes" if(diskette.fields["SE"]) L += "Structural Enzymes" @@ -268,10 +268,10 @@ src.menu = 1 src.updateUsrDialog() return - + src.active_record.fields = diskette.fields.Copy() src.temp = "Load successful." - + if("eject") if(src.diskette) src.diskette.loc = src.loc @@ -280,8 +280,8 @@ if(!diskette || diskette.read_only || !active_record || !active_record.fields) src.temp = "Save error." src.updateUsrDialog() - return - + return + diskette.fields = active_record.fields.Copy() diskette.name = "data disk - '[src.diskette.fields["name"]]'" src.temp = "Save successful." @@ -324,7 +324,7 @@ if (!check_dna_integrity(subject) || !istype(subject)) scantemp = "Unable to locate valid genetic data." return - if (!getbrain(subject)) + if (!subject.getorgan(/obj/item/organ/brain)) scantemp = "No signs of intelligence detected." return if (subject.suiciding == 1) @@ -351,7 +351,7 @@ R.fields["UE"] = subject.dna.unique_enzymes R.fields["UI"] = subject.dna.uni_identity R.fields["SE"] = subject.dna.struc_enzymes - R.fields["b_type"] = subject.dna.b_type + R.fields["blood_type"] = subject.dna.blood_type //Add an implant if needed var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 240d004e0bf..98ccb3990fa 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -59,7 +59,7 @@ else dat += "General Record Lost!
" if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - dat += text("
\n
Medical Data

\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
Comments/Log

", src, src.active2.fields["b_type"], src, src.active2.fields["b_dna"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"]) + dat += text("
\n
Medical Data

\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
Comments/Log

", src, src.active2.fields["blood_type"], src, src.active2.fields["b_dna"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"]) var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) dat += text("[]
Delete Entry

", src.active2.fields[text("com_[]", counter)], src, counter) @@ -269,9 +269,9 @@ if("m_stat") if (istype(src.active1, /datum/data/record)) src.temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src) - if("b_type") + if("blood_type") if (istype(src.active2, /datum/data/record)) - src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) + src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) if("b_dna") if (istype(src.active1, /datum/data/record)) var/t1 = copytext(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text),1,MAX_MESSAGE_LEN) @@ -305,25 +305,25 @@ src.active1.fields["m_stat"] = "Stable" - if (href_list["b_type"]) + if (href_list["blood_type"]) if (src.active2) - switch(href_list["b_type"]) + switch(href_list["blood_type"]) if("an") - src.active2.fields["b_type"] = "A-" + src.active2.fields["blood_type"] = "A-" if("bn") - src.active2.fields["b_type"] = "B-" + src.active2.fields["blood_type"] = "B-" if("abn") - src.active2.fields["b_type"] = "AB-" + src.active2.fields["blood_type"] = "AB-" if("on") - src.active2.fields["b_type"] = "O-" + src.active2.fields["blood_type"] = "O-" if("ap") - src.active2.fields["b_type"] = "A+" + src.active2.fields["blood_type"] = "A+" if("bp") - src.active2.fields["b_type"] = "B+" + src.active2.fields["blood_type"] = "B+" if("abp") - src.active2.fields["b_type"] = "AB+" + src.active2.fields["blood_type"] = "AB+" if("op") - src.active2.fields["b_type"] = "O+" + src.active2.fields["blood_type"] = "O+" if (href_list["del_r"]) @@ -356,7 +356,7 @@ R.fields["name"] = src.active1.fields["name"] R.fields["id"] = src.active1.fields["id"] R.name = text("Medical Record #[]", R.fields["id"]) - R.fields["b_type"] = "Unknown" + R.fields["blood_type"] = "Unknown" R.fields["b_dna"] = "Unknown" R.fields["mi_dis"] = "None" R.fields["mi_dis_d"] = "No minor disabilities have been declared." @@ -420,7 +420,7 @@ else P.info += "General Record Lost!
" if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - P.info += text("
\n
Medical Data

\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
Comments/Log

", src.active2.fields["b_type"], src.active2.fields["b_dna"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"]) + P.info += text("
\n
Medical Data

\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
Comments/Log

", src.active2.fields["blood_type"], src.active2.fields["b_dna"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"]) var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) P.info += text("[]
", src.active2.fields[text("com_[]", counter)]) @@ -444,13 +444,13 @@ if(prob(10/severity)) switch(rand(1,6)) if(1) - R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]" + R.fields["name"] = random_name(R.fields["sex"],1) if(2) R.fields["sex"] = pick("Male", "Female") if(3) - R.fields["age"] = rand(5, 85) + R.fields["age"] = rand(AGE_MIN, AGE_MAX) if(4) - R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+") + R.fields["blood_type"] = random_blood_type() if(5) R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit") if(6) diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index 09453b00df8..08cf736db77 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -53,7 +53,7 @@ gib.blood_DNA = list() if(MobDNA) - gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type + gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.blood_type else if(istype(src, /obj/effect/gibspawner/xeno)) gib.blood_DNA["UNKNOWN DNA"] = "X*" else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 73de19822f8..bcb0becb287 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -369,7 +369,7 @@ Code: menu += "

Medical Data

" if (istype(active2, /datum/data/record) && (active2 in data_core.medical)) - menu += "Blood Type: [active2.fields["b_type"]]

" + menu += "Blood Type: [active2.fields["blood_type"]]

" menu += "Minor Disabilities: [active2.fields["mi_dis"]]
" menu += "Details: [active2.fields["mi_dis_d"]]

" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index d1bab674f31..b88cf112237 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -143,7 +143,7 @@ MASS SPECTROMETER if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) user.show_message(text("Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1) - if (M.getBrainLoss() >= 100 || !getbrain(M)) + if (M.getBrainLoss() >= 100 || !M.getorgan(/obj/item/organ/brain)) user.show_message(text("Subject brain function is non-existant."), 1) else if (M.getBrainLoss() >= 60) user.show_message(text("Severe brain damage detected. Subject likely to have mental retardation."), 1) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 0d1efe447ce..ba5088e1d25 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -99,9 +99,9 @@ /obj/item/weapon/razor/proc/shave(mob/living/carbon/human/H, location = "mouth") if(location == "mouth") - H.f_style = "Shaved" + H.facial_hair_style = "Shaved" else - H.h_style = "Skinhead" + H.hair_style = "Skinhead" H.update_hair() playsound(loc, 'sound/items/Welder2.ogg', 20, 1) @@ -116,7 +116,7 @@ if(!get_location_accessible(H, location)) user << "The mask is in the way." return - if(H.f_style == "Shaved") + if(H.facial_hair_style == "Shaved") user << "Already clean-shaven." return @@ -141,7 +141,7 @@ if(!get_location_accessible(H, location)) user << "The headgear is in the way." return - if(H.h_style == "Bald" || H.h_style == "Balding Hair" || H.h_style == "Skinhead") + if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead") user << "There is not enough hair left to shave!" return diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index a416da8adcc..c0a891ff786 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -21,11 +21,11 @@ M.radiation += rand(20, 50) if(fields) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" - if(fields["name"] && fields["UE"] && fields["b_type"]) + if(fields["name"] && fields["UE"] && fields["blood_type"]) M.real_name = fields["name"] M.dna.unique_enzymes = fields["UE"] M.name = M.real_name - M.dna.b_type = fields["b_type"] + M.dna.blood_type = fields["blood_type"] if(fields["UI"]) //UI+UE M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"]) updateappearance(M) @@ -44,7 +44,7 @@ if(!ishuman(user)) user << "You don't have the dexterity to do this!" return - + target.attack_log += "\[[time_stamp()]\] [user.name] ([user.ckey]) attempted to inject with [name]" user.attack_log += "\[[time_stamp()]\] Used the [name] to attempt to inject [target.name] ([target.ckey])" log_attack("[user.name] ([user.ckey]) used the [name] to attempt to inject [target.name] ([target.ckey])") diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 4e9e9f639a6..76e17f53146 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -25,15 +25,15 @@ var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list if(userloc != H.loc) return //no tele-grooming if(new_style) - H.f_style = new_style + H.facial_hair_style = new_style else - H.f_style = "Shaved" + H.facial_hair_style = "Shaved" //handle normal hair var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in hair_styles_list if(userloc != H.loc) return //no tele-grooming if(new_style) - H.h_style = new_style + H.hair_style = new_style H.update_hair() diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index c0f5951cc71..ba88065f533 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -309,7 +309,7 @@ if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob ) if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob ) if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob ) - if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob ) + if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob ) if("adultslime") M.change_mob_type( /mob/living/carbon/slime/adult , null, null, delmob ) if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob ) if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob ) @@ -1994,7 +1994,7 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","DF") for(var/mob/living/carbon/human/B in mob_list) - B.f_style = "Dward Beard" + B.facial_hair_style = "Dward Beard" B.update_hair() message_admins("[key_name_admin(usr)] activated dorf mode") if("ionstorm") @@ -2076,7 +2076,7 @@ dat += "" for(var/mob/living/carbon/human/H in mob_list) if(H.dna && H.ckey) - dat += "" + dat += "" dat += "
NameDNABlood Type
[H][H.dna.unique_enzymes][H.b_type]
[H][H.dna.unique_enzymes][H.blood_type]
" usr << browse(dat, "window=DNA;size=440x410") if("fingerprints") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 978cf6ea440..8d4119c0da4 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -134,7 +134,7 @@ proc/cmd_admin_mute(whom, mute_type, automute = 0) if(MUTE_DEADCHAT) mute_string = "deadchat and DSAY" if(MUTE_ALL) mute_string = "everything" else return - + var/client/C if(istype(whom, /client)) C = whom @@ -142,12 +142,12 @@ proc/cmd_admin_mute(whom, mute_type, automute = 0) C = directory[whom] else return - + var/datum/preferences/P if(C) P = C.prefs else P = preferences_datums[whom] if(!P) return - + if(automute) if(!config.automute_on) return else @@ -306,7 +306,7 @@ Traitors and the like can also be revived with the previous role mostly intact. new_character.real_name = record_found.fields["name"] new_character.gender = record_found.fields["sex"] new_character.age = record_found.fields["age"] - new_character.b_type = record_found.fields["b_type"] + new_character.blood_type = record_found.fields["blood_type"] else new_character.gender = pick(MALE,FEMALE) var/datum/preferences/A = new() @@ -326,7 +326,7 @@ Traitors and the like can also be revived with the previous role mostly intact. //DNA if(record_found)//Pull up their name from database records if they did have a mind. - hardset_dna(new_character, record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], null, record_found.fields["b_type"]) + hardset_dna(new_character, record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], null, record_found.fields["blood_type"]) else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile. ready_dna(new_character) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 188eb303330..cb8724c0c02 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -42,13 +42,13 @@ datum/preferences var/be_random_name = 0 //whether we are a random name every round var/gender = MALE //gender of character (well duh) var/age = 30 //age of character - var/b_type = "A+" //blood type (not-chooseable) + var/blood_type = "A+" //blood type (not-chooseable) var/underwear = "Nude" //underwear type var/backbag = 2 //backpack type - var/h_style = "Bald" //Hair type - var/h_color = "000" //Hair color - var/f_style = "Shaved" //Face hair type - var/f_color = "000" //Facial hair color + var/hair_style = "Bald" //Hair type + var/hair_color = "000" //Hair color + var/facial_hair_style = "Shaved" //Face hair type + var/facial_hair_color = "000" //Facial hair color var/skin_tone = "caucasian1" //Skin color var/eye_color = "000" //Eye color @@ -81,7 +81,7 @@ datum/preferences var/unlock_content = 0 /datum/preferences/New(client/C) - b_type = random_blood_type() + blood_type = random_blood_type() ooccolor = normal_ooc_colour if(istype(C)) if(!IsGuestKey(C.key)) @@ -161,7 +161,7 @@ datum/preferences dat += "
" - 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
Medical Data

\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
Comments/Log

", 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
Medical Data

\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
Comments/Log

", 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 = "
Medical Record

" 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
Medical Data

\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
Comments/Log

" + P.info += "
\n
Medical Data

\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
Comments/Log

" 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