diff --git a/baystation12.dme b/baystation12.dme index e4dbcaac03e..9b034e16f43 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -636,7 +636,6 @@ #include "code\game\objects\devices\chameleonproj.dm" #include "code\game\objects\devices\flash.dm" #include "code\game\objects\devices\flashlight.dm" -#include "code\game\objects\devices\geneanalyzer.dm" #include "code\game\objects\devices\infra_sensor.dm" #include "code\game\objects\devices\multitool.dm" #include "code\game\objects\devices\paicard.dm" diff --git a/code/defines/atom.dm b/code/defines/atom.dm index fde7511d3bb..dc986f6e1b7 100644 --- a/code/defines/atom.dm +++ b/code/defines/atom.dm @@ -12,6 +12,9 @@ ///Chemistry. var/datum/reagents/reagents = null + //Detective Work, used for the duplicate data points kept in the scanners + var/atom/original_atom = null + //var/chem_is_open_container = 0 // replaced by OPENCONTAINER flags and atom/proc/is_open_container() ///Chemistry. diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 99498f7e924..7580989d5ae 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -93,15 +93,17 @@ var/mob/living/carbon/human/H = M if (!istype(H.dna, /datum/dna)) return 0 - if (H.gloves) + if (H.gloves && H.gloves != src) if(src.fingerprintslast != H.key) src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key) src.fingerprintslast = H.key + H.gloves.add_fingerprint(M) if (H.dna.uni_identity) - if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex)) - return 0 - else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex)) - return 0 + if(H.gloves != src) + if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex)) + return 0 + else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex)) + return 0 if(src.fingerprintslast != H.key) src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key) src.fingerprintslast = H.key @@ -302,6 +304,9 @@ src.fingerprints[i] = "1=" + prints["1"] + "&2=" + new_print if(!src.fingerprints) src.fingerprints = list() + if(istype(src, /mob/living/carbon/human)) + var/mob/living/carbon/human/M = src + M.update_clothing() return /atom/MouseDrop(atom/over_object as mob|obj|turf|area) diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm index 1580c00c0aa..fae286fc260 100644 --- a/code/game/machinery/bots/cleanbot.dm +++ b/code/game/machinery/bots/cleanbot.dm @@ -51,7 +51,7 @@ src.get_targets() src.icon_state = "cleanbot[src.on]" - should_patrol = 0 + should_patrol = 1 src.botcard = new /obj/item/weapon/card/id(src) src.botcard.access = get_access("Janitor") diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index f124316a24d..d7243176648 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -360,9 +360,9 @@ // if (subject.suiciding == 1) // src.temp = "Error: Subject's brain is not responding to scanning stimuli." // return - if ((!subject.ckey) || (!subject.client)) - src.temp = "Error: Mental interface failure." - return +// if ((!subject.ckey) || (!subject.client)) +// src.temp = "Error: Mental interface failure." +// return if (subject.mutations & HUSK) src.temp = "Error: Mental interface failure." return @@ -372,9 +372,13 @@ subject.dna.check_integrity() + var/ckey = subject.ckey + if(!ckey && subject && subject.mind) + ckey = subject.mind.key + var/datum/data/record/R = new /datum/data/record( ) R.fields["mrace"] = subject.mutantrace - R.fields["ckey"] = subject.ckey + R.fields["ckey"] = ckey R.fields["name"] = subject.real_name R.fields["id"] = copytext(md5(subject.real_name), 2, 6) R.fields["UI"] = subject.dna.uni_identity diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index fe22658f71f..340d32c8475 100755 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -477,6 +477,10 @@ tnote += "→ To [P.owner]:
[t]
" P.tnote += "← From [owner]:
[t]
" + // Give every ghost the ability to see all messages + for (var/mob/dead/observer/G in world) + G.show_message("PDA message from [src.owner] to [P:owner]: [t]") + if (prob(15)) //Give the AI a chance of intercepting the message var/who = src.owner if(prob(50)) @@ -763,8 +767,19 @@ user << "\blue Unable to locate any fingerprints on [A]!" else user << "\blue Isolated [A:fingerprints.len] fingerprints." -// for(var/i in L) -// user << "\blue \t [i]" + var/list/prints = A:fingerprints + var/list/complete_prints = list() + for(var/i in prints) + var/list/templist = params2list(i) + var/temp = stringpercent(templist["2"]) + if(temp <= 6) + complete_prints += templist["2"] + if(complete_prints.len < 1) + user << "\blue No intact prints found" + else + user << "\blue Found [complete_prints.len] intact prints" + for(var/i in complete_prints) + user << "\blue " + i if(3) if(!isnull(A.reagents)) diff --git a/code/game/objects/devices/geneanalyzer.dm b/code/game/objects/devices/geneanalyzer.dm deleted file mode 100644 index fd63380955d..00000000000 --- a/code/game/objects/devices/geneanalyzer.dm +++ /dev/null @@ -1,27 +0,0 @@ -/obj/item/device/geneticsanalyzer - name = "Genetics Analyser" - icon = 'device.dmi' - icon_state = "genetics" - w_class = 2 - -/obj/item/device/geneticsanalyzer/attack(mob/M as mob, mob/user as mob) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [] has analyzed []'s genetic code!", user, M), 1) - //Foreach goto(67) - user.show_message(text("\blue Analyzing Results for [M]: [M.dna.struc_enzymes]\n\t"), 1) - user.show_message(text("\blue \t Epilepsy: [isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK) ? "Yes" : "No"]"), 1) - user.show_message(text("\blue \t Cough: [isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK) ? "Yes" : "No"]"), 1) - user.show_message(text("\blue \t Clumsy: [isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK) ? "Yes" : "No"]"), 1) - user.show_message(text("\blue \t Twitch: [isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK) ? "Yes" : "No"]"), 1) - user.show_message(text("\blue \t Nervous: [isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK) ? "Yes" : "No"]"), 1) - user.show_message(text("\blue \t Blind: [isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK) ? "Yes" : "No"]"), 1) - user.show_message(text("\blue \t Deaf: [isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK) ? "Yes" : "No"]"), 1) - user.show_message(text("\blue \t Requires Glasses: [isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK) ? "Yes" : "No"]"), 1) - -/* - var/unknow = 0 - var/list/unknowns = list(HULKBLOCK,TELEBLOCK,FIREBLOCK,XRAYBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,HALLUCINATIONBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK) - for(var/unknown in unknowns) - if(isblockon(getblock(M.dna.struc_enzymes, unknown,3),unknown)) - unknow += 1 - user.show_message(text("\blue \t Unknown Anomalies: [unknow]"))*/ \ No newline at end of file diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index bc200b9f177..7c192347898 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -204,8 +204,8 @@ MASS SPECTROMETER var/merged = 0 for(var/i = 1, i < (stored.len + 1), i++) //Lets see if the object is already in there! var/list/temp = stored[i] - var/checker = temp[1] - if(checker == A) //It is! Merge! + var/atom/checker = temp[1] + if(checker.original_atom == A || checker.original_atom == A.original_atom) //It is! Merge! merged = 1 var/list/prints = temp[2] if(!prints) @@ -239,7 +239,7 @@ MASS SPECTROMETER if(!blood.Find(A.blood_DNA[j])) //It isn't! Add! blood += A.blood_DNA[j] var/list/sum_list[4] //Pack it back up! - sum_list[1] = A + sum_list[1] = checker sum_list[2] = prints sum_list[3] = fibers sum_list[4] = blood @@ -247,7 +247,7 @@ MASS SPECTROMETER break //We found it, we're done here. if(!merged) //Uh, oh! New data point! var/list/sum_list[4] //Pack it back up! - sum_list[1] = A + sum_list[1] = A.get_duplicate(src) if(!A.fingerprints) world << "Report this to a dev! [A] was lacking a list() for fingerprints!" sum_list[2] = list() diff --git a/code/game/objects/displaycase.dm b/code/game/objects/displaycase.dm index ea1f08b8c48..d1cacdab4d1 100644 --- a/code/game/objects/displaycase.dm +++ b/code/game/objects/displaycase.dm @@ -59,6 +59,26 @@ /obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/gun/energy/laser/captain)) + if(!src.occupied) + user << "\b You put the [W] back into the display case." + del(W) + src.occupied = 1 + update_icon() + return + if(istype(W, /obj/item/stack/sheet/glass)) + if(src.occupied && src.destroyed) + var/obj/item/stack/sheet/glass/G = W + user << "\b You repair the display case." + G.amount-- + if (G.amount <= 0) + user.update_clothing() + del(G) + src.destroyed = 0 + src.density = 1 + src.health = 30 + update_icon() + return src.health -= W.force src.healthcheck() ..() diff --git a/code/game/objects/items/robot_parts.dm b/code/game/objects/items/robot_parts.dm index 8a906142aa1..70b26ced7ef 100644 --- a/code/game/objects/items/robot_parts.dm +++ b/code/game/objects/items/robot_parts.dm @@ -219,6 +219,7 @@ return src.created_name = t + user.update_clothing() return diff --git a/code/modules/DetectiveWork/detective_work.dm b/code/modules/DetectiveWork/detective_work.dm index 402fa2c13dc..cf0eb2d6477 100644 --- a/code/modules/DetectiveWork/detective_work.dm +++ b/code/modules/DetectiveWork/detective_work.dm @@ -49,6 +49,21 @@ atom/proc/add_fibers(mob/living/carbon/human/M) suit_fibers += "Material from a pair of [M.gloves.name]." if(!suit_fibers.len) del suit_fibers +atom/proc/get_duplicate(var/atom/location) + var/atom/temp_atom = new src.type(location) + temp_atom.name = src.name + temp_atom.desc = src.desc + temp_atom.icon = src.icon + temp_atom.icon_state = src.icon_state + temp_atom.fingerprints = src.fingerprints + temp_atom.blood_DNA = src.blood_DNA + temp_atom.suit_fibers = src.suit_fibers + if(src.original_atom) + temp_atom.original_atom = src.original_atom + else + temp_atom.original_atom = src + return temp_atom + #define FINGERPRINT_COMPLETE 6 //This is the output of the stringpercent(print) proc, and means about 80% of //the print must be there for it to be complete. (Prints are 32 digits) @@ -167,12 +182,20 @@ obj/machinery/computer/forensic_scanning M.drop_item() I.loc = src else - temp = "Invalid Object Rejected." + usr << "Invalid Object Rejected." if("card") var/mob/M = usr var/obj/item/I = M.equipped() + if(!(I && istype(I,/obj/item/weapon/f_card))) + I = card if(I && istype(I,/obj/item/weapon/f_card)) card = I + if(card.amount > 1 || !card.fingerprints.len) + usr << "\red ERROR: No prints/too many cards." + if(card.loc == src) + card.loc = src.loc + card = null + return M.drop_item() I.loc = src process_card() @@ -181,8 +204,16 @@ obj/machinery/computer/forensic_scanning usr << "\red Invalid Object Rejected." if("database") canclear = 1 + if(href_list["delete_record"]) + delete_dossier(text2num(href_list["delete_record"])) + if(href_list["delete_aux"]) + delete_record(text2num(href_list["delete_aux"])) if((!misc || !misc.len) && (!files || !files.len)) temp = "Database is empty." + for(var/atom/A in contents) + if(A == scanning) + continue + del(A) else if(files && files.len) temp = "Criminal Evidence Database

" @@ -238,7 +269,7 @@ obj/machinery/computer/forensic_scanning temp += "    No blood found.
" else temp = "ERROR. Database not found!
" - temp += "
{delete}" + temp += "
{Delete this Dossier}" temp += "
{Print}" temp += "
{Return}" if("databaseprint") @@ -305,7 +336,7 @@ obj/machinery/computer/forensic_scanning temp += "    No blood found.
" else temp = "ERROR. Database not found!
" - temp += "
{Delete This Record}" + temp += "
{Delete This Record}" temp += "
{Print}" temp += "
{Return}" if("auxiliaryprint") @@ -427,10 +458,6 @@ obj/machinery/computer/forensic_scanning temp = "Print Failed: No Data" if("erase") scan_data = "" - if("delete_aux") - delete_record(text2num(href_list["identifier"])) - if("delete") - delete_dossier(text2num(href_list["identifier"])) if("cancel") scan_process = 0 if("add") @@ -448,6 +475,10 @@ obj/machinery/computer/forensic_scanning add_fingerprint(usr) files = list() misc = list() + for(var/atom/A in contents) + if(A == scanning) + continue + del(A) return @@ -460,6 +491,9 @@ obj/machinery/computer/forensic_scanning var/list/data = W.stored[i] add_data(data[1],1,data[2],data[3],data[4]) W.stored = list() + for(var/atom/A in W.contents) + del(A) + return proc/add_data(var/atom/A, var/override = 0, var/tempfingerprints, var/tempsuit_fibers,var/tempblood_DNA) @@ -483,8 +517,8 @@ obj/machinery/computer/forensic_scanning if(misc) for(var/i = 1, i <= misc.len, i++) //Lets see if we can find it. var/list/templist = misc[i] - var/check = templist[1] - if(check == A) //There it is! + var/atom/check = templist[1] + if(check.original_atom == A || check.original_atom == A.original_atom) //There it is! merged = 1 var/list/fibers = templist[2] if(!fibers) @@ -501,14 +535,14 @@ obj/machinery/computer/forensic_scanning if(!blood.Find(A.blood_DNA[j])) //It isn't! Add! blood += A.blood_DNA[j] var/list/sum_list[3] //Pack it back up! - sum_list[1] = A + sum_list[1] = check sum_list[2] = fibers sum_list[3] = blood misc[i] = sum_list //Store it! break //We found it, we're done here. if(!merged) //Nope! Guess we have to add it! var/list/templist[3] - templist[1] = A + templist[1] = A.get_duplicate(src) templist[2] = A.suit_fibers templist[3] = A.blood_DNA misc.len++ @@ -532,7 +566,8 @@ obj/machinery/computer/forensic_scanning found_prints[m] = 1 for(var/n = 2, n <= perp_list.len, n++) //Lets see if it is already in the database var/list/target = perp_list[n] - if(target[1] == A) //Found the original object! + var/atom/atom_checker = target[1] + if(atom_checker.original_atom == A || atom_checker.original_atom == A.original_atom) //Found the original object! found2 = 1 var/list/prints = target[2] if(!prints) @@ -566,7 +601,7 @@ obj/machinery/computer/forensic_scanning if(!blood.Find(A.blood_DNA[j])) //It isn't! Add! blood += A.blood_DNA[j] var/list/sum_list[4] //Pack it back up! - sum_list[1] = A + sum_list[1] = atom_checker sum_list[2] = prints sum_list[3] = fibers sum_list[4] = blood @@ -575,7 +610,7 @@ obj/machinery/computer/forensic_scanning break //We found it, we're done here. if(!found2) //Add a new datapoint to this perp! var/list/sum_list[4] - sum_list[1] = A + sum_list[1] = A.get_duplicate(src) sum_list[2] = A.fingerprints sum_list[3] = A.suit_fibers sum_list[4] = A.blood_DNA @@ -586,7 +621,7 @@ obj/machinery/computer/forensic_scanning if(found_prints[m] == 0) var/list/newperp[2] var/list/sum_list[4] - sum_list[1] = A + sum_list[1] = A.get_duplicate(src) sum_list[2] = A.fingerprints sum_list[3] = A.suit_fibers sum_list[4] = A.blood_DNA @@ -628,7 +663,7 @@ obj/machinery/computer/forensic_scanning proc/process_card() //I am tired, but this updates the master print from a fingerprint card //which is used to determine completion of a print. - if(card.fingerprints) + if(card.fingerprints && !(card.amount > 1)) for(var/k = 1, k <= card.fingerprints.len, k++) var/list/test_prints = params2list(card.fingerprints[k]) var/print = test_prints[num2text(1)] @@ -640,7 +675,13 @@ obj/machinery/computer/forensic_scanning test_list[1] = "1=" + print + "&2=" + print files[i] = test_list break - del(card) + del(card) + else + usr << "\red ERROR: No prints/too many cards." + if(card.loc == src) + card.loc = src.loc + card = null + return return proc/delete_record(var/location) diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index b76b7efc2d1..f163b5bfd1e 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -1413,6 +1413,7 @@ else user << "\red [M] finishes eating [src]." del(src) playsound(M.loc,'eatfood.ogg', rand(10,50), 1) + user.update_clothing() return 1 else if(istype(M, /mob/living/simple_animal/livestock)) if(M == user) //If you're eating it yourself. @@ -1465,6 +1466,8 @@ if(!reagents.total_volume) if(M == user) user << "\red You finish eating [src]." else user << "\red [M] finishes eating [src]." + spawn(2) + user.update_clothing() del(src) playsound(M.loc,'eatfood.ogg', rand(10,50), 1) return 1 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index f3bb6616cfd..c04042c9066 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -130,7 +130,7 @@ var/pr = 50 if(prob(pr)) adjustToxLoss(1) - else + else if (stat != 0) if(!lying) lying = 1 //Seriously, stay down :x update_clothing() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3c59347ea96..fb62e404f05 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -188,6 +188,7 @@ var/turf/T = get_turf(loc) if (istype(T)) T.Entered(W) + update_clothing() return /mob/proc/before_take_item(var/obj/item/item) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index b0b953f75ef..5468aa9c5d2 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -170,13 +170,7 @@ datum/preferences dat += "
Eyes
" dat += "Change Color
__
" - dat += "
Disabilities:
" - dat += "Need Glasses? [disabilities & (1<<0) ? "Yes" : "No"]
" - dat += "Seizures? [disabilities & (1<<1) ? "Yes" : "No"]
" - dat += "Coughing? [disabilities & (1<<2) ? "Yes" : "No"]
" - dat += "Tourettes/Twitching? [disabilities & (1<<3) ? "Yes" : "No"]
" - dat += "Nervousness? [disabilities & (1<<4) ? "Yes" : "No"]
" - dat += "Deafness? [disabilities & (1<<5) ? "Yes" : "No"]
" + dat += "
Disabilities
" dat += "
Flavor Text
" dat += "Change
" @@ -224,6 +218,26 @@ datum/preferences proc/closesave(mob/user) user << browse(null, "window=saves;size=300x640") + proc/SetDisabilities(mob/user) + var/HTML = "" + HTML += "
" + HTML += "Choose disabilities
" + + HTML += "Need Glasses? [disabilities & (1<<0) ? "Yes" : "No"]
" + HTML += "Seizures? [disabilities & (1<<1) ? "Yes" : "No"]
" + HTML += "Coughing? [disabilities & (1<<2) ? "Yes" : "No"]
" + HTML += "Tourettes/Twitching? [disabilities & (1<<3) ? "Yes" : "No"]
" + HTML += "Nervousness? [disabilities & (1<<4) ? "Yes" : "No"]
" + HTML += "Deafness? [disabilities & (1<<5) ? "Yes" : "No"]
" + + HTML += "
" + HTML += "\[Done\]" + HTML += "
" + + user << browse(null, "window=preferences") + user << browse(HTML, "window=disabil;size=350x300") + return + proc/GetAltTitle(datum/job/job) return job_alt_titles.Find(job.title) > 0 \ ? job_alt_titles[job.title] \ @@ -694,7 +708,13 @@ datum/preferences midis = 1 disabilities = 0 if(link_tags["disabilities"]) - disabilities ^= (1<= -1) + if(text2num(link_tags["disabilities"]) >= 0) + disabilities ^= (1<