diff --git a/code/WorkInProgress/Ported/Abi79/uplinks.dm b/code/WorkInProgress/Ported/Abi79/uplinks.dm index b7672b120ce..b6bcefe1f8a 100644 --- a/code/WorkInProgress/Ported/Abi79/uplinks.dm +++ b/code/WorkInProgress/Ported/Abi79/uplinks.dm @@ -21,6 +21,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/items // List of items var/list/ItemList // Parsed list of items var/uses // Numbers of crystals + // List of items not to shove in their hands. + var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate) New() welcome = ticker.mode.uplink_welcome @@ -34,7 +36,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid src.menu_message += "Tele-Crystals left: [src.uses]
" src.menu_message += "
" src.menu_message += "Request item:
" - src.menu_message += "Each item costs a number of tele-crystals as indicated by the number following their name.
" + src.menu_message += "Each item costs a number of tele-crystals as indicated by the number following their name.

" var/cost var/item @@ -158,7 +160,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/path_obj = text2path(href_list["buy_item"]) var/mob/A = src.hostpda.loc var/item = new path_obj(get_turf(src.hostpda)) - if(ismob(A)) //&& !istype(item, /obj/spawner)) + if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner)) if(!A.r_hand) item:loc = A A.r_hand = item @@ -167,6 +169,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid item:loc = A A.l_hand = item item:layer = 20 + else + item:loc = get_turf(A) usr.update_clothing() // usr.client.onBought("[item:name]") When we have the stats again, uncomment. /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind @@ -237,7 +241,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/path_obj = text2path(href_list["buy_item"]) var/item = new path_obj(get_turf(src.loc)) var/mob/A = src.loc - if(ismob(A)) //&& !istype(item, /obj/spawner)) + if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner)) if(!A.r_hand) item:loc = A A.r_hand = item @@ -246,6 +250,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid item:loc = A A.l_hand = item item:layer = 20 + else + item:loc = get_turf(A) /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind del item*/ // usr.client.onBought("[item:name]") When we have the stats again, uncomment. diff --git a/code/WorkInProgress/detective_work.dm b/code/WorkInProgress/detective_work.dm index 742c0245012..de93933cc0a 100644 --- a/code/WorkInProgress/detective_work.dm +++ b/code/WorkInProgress/detective_work.dm @@ -121,6 +121,319 @@ obj/machinery/computer/forensic_scanning onclose(user,"scanner") + Topic(href,href_list) + switch(href_list["operation"]) + if("login") + var/mob/M = usr + if(istype(M,/mob/living/silicon)) + authenticated = 1 + updateDialog() + return + var/obj/item/weapon/card/id/I = M.equipped() + if (I && istype(I)) + if(src.check_access(I)) + authenticated = 1 + //usr << "\green Access Granted" + //if(!authenticated) + //usr << "\red Access Denied" + if("logout") + authenticated = 0 + if("clear") + if(canclear) + temp = null + if("eject") + if(scanning) + scanning.loc = loc + scanning = null + else + temp = "Eject Failed: No Object" + if("insert") + var/mob/M = usr + var/obj/item/I = M.equipped() + if(I && istype(I)) + if(istype(I, /obj/item/weapon/evidencebag)) + scanning = I.contents[1] + scanning.loc = src + I.overlays -= scanning + I.icon_state = "evidenceobj" + else + scanning = I + M.drop_item() + I.loc = src + else + temp = "Invalid Object Rejected." + if("card") + var/mob/M = usr + var/obj/item/I = M.equipped() + if(I && istype(I,/obj/item/weapon/f_card)) + card = I + M.drop_item() + I.loc = src + process_card() + usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints." + else + usr << "\red Invalid Object Rejected." + if("database") + canclear = 1 + if((!misc || !misc.len) && (!files || !files.len)) + temp = "Database is empty." + else + if(files && files.len) + temp = "Criminal Evidence Database

" + temp += "Consolidated data points:
" + for(var/i = 1, i < (files.len + 1), i++) + temp += "{Dossier [i]}
" + temp += "
{Insert Finger Print Card}


" + else + temp = "" + if(misc && misc.len) + if(href_list["delete"]) + delete_record(text2num(href_list["delete"])) + temp += "Auxiliary Evidence Database

" + temp += "This is where anything without fingerprints goes.

" + for(var/i = 1, i < (misc.len + 1), i++) + var/list/temp_list = misc[i] + var/item_name = get_name(temp_list[1]) + temp += "{[item_name]}
" + if("record") + canclear = 0 + if(files) + temp = "Criminal Evidence Database

" + temp += "Consolidated data points: Dossier [href_list["identifier"]]
" + var/identifier = text2num(href_list["identifier"]) + var/list/dossier = files[identifier] + var/list/prints = params2list(dossier[1]) + var/print_string = "Fingerprints: Print not complete!
" + if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE) + print_string = "Fingerprints: (80% or higher completion reached)
" + prints[num2text(2)] + "
" + temp += print_string + for(var/i = 2, i < (dossier.len + 1), i++) + var/list/outputs = dossier[i] + var/item_name = get_name(outputs[1]) + var/list/prints_len = outputs[2] + temp += "Object: [item_name]
" + temp += "    [prints_len.len] Unique fingerprints found.
" + var/list/fibers = outputs[3] + if(fibers && fibers.len) + var/dat = "[fibers[1]]" + for(var/j = 2, j < (fibers.len + 1), j++) + dat += ",
      [fibers[j]]" + temp += "    Fibers: [dat]
" + else + temp += "    No fibers found.
" + var/list/blood = outputs[4] + if(blood && blood.len) + var/dat = "[blood[1]]" + if(blood.len > 1) + for(var/j = 2, j < (blood.len + 1), j++) + dat += ",
      [blood[j]]" + temp += "    Blood: [dat]
" + else + temp += "    No blood found.
" + else + temp = "ERROR. Database not found!
" + temp += "
{Print}" + temp += "
{Return}" + if("databaseprint") + if(files) + var/obj/item/weapon/paper/P = new(loc) + P.name = "Database File (Dossier [href_list["identifier"]])" + P.overlays += "paper_words" + P.info = "Criminal Evidence Database

" + P.info += "Consolidated data points: Dossier [href_list["identifier"]]
" + var/list/dossier = files[text2num(href_list["identifier"])] + var/list/prints = params2list(dossier[1]) + var/print_string = "Fingerprints: Print not complete!
" + if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE) + print_string = "Fingerprints: " + prints[num2text(2)] + "
" + P.info += print_string + for(var/i = 2, i < (dossier.len + 1), i++) + var/list/outputs = dossier[i] + var/item_name = get_name(outputs[1]) + var/list/prints_len = outputs[2] + P.info += "Object: [item_name]
" + P.info += "    [prints_len.len] Unique fingerprints found.
" + var/list/fibers = outputs[3] + if(fibers && fibers.len) + var/dat = "[fibers[1]]" + for(var/j = 2, j < (fibers.len + 1), j++) + dat += ",
      [fibers[j]]" + P.info += "    Fibers: [dat]
" + else + P.info += "    No fibers found.
" + var/list/blood = outputs[4] + if(blood && blood.len) + var/dat = "[blood[1]]" + if(blood.len > 1) + for(var/j = 2, j < (blood.len + 1), j++) + dat += ",
      [blood[j]]" + P.info += "    Blood: [dat]
" + else + P.info += "    No blood found." + else + usr << "ERROR. Database not found!
" + if("auxiliary") + canclear = 0 + if(misc) + temp = "Auxiliary Evidence Database

" + var/identifier = text2num(href_list["identifier"]) + var/list/outputs = misc[identifier] + var/item_name = get_name(outputs[1]) + temp += "Consolidated data points: [item_name]
" + var/list/fibers = outputs[2] + if(fibers && fibers.len) + var/dat = "[fibers[1]]" + for(var/j = 2, j <= fibers.len, j++) + dat += "
      [fibers[j]]" + temp += "    Fibers: [dat]
" + else + temp += "    No fibers found." + var/list/blood = outputs[3] + if(blood && blood.len) + var/dat = "[blood[1]]" + for(var/j = 2, j <= blood.len, j++) + dat += "
      [blood[j]]" + temp += "    Blood: [dat]
" + else + temp += "    No blood found.
" + else + temp = "ERROR. Database not found!
" + temp += "
{Delete This Record}" + temp += "
{Print}" + temp += "
{Return}" + if("auxiliaryprint") + if(misc) + var/obj/item/weapon/paper/P = new(loc) + var/identifier = text2num(href_list["identifier"]) + var/list/outputs = misc[identifier] + var/item_name = get_name(outputs[1]) + P.name = "Auxiliary Database File ([item_name])" + P.overlays += "paper_words" + P.info = "Auxiliary Evidence Database

" + P.info += "Consolidated data points: [item_name]
" + var/list/fibers = outputs[2] + if(fibers && fibers.len) + var/dat = "[fibers[1]]" + for(var/j = 2, j <= fibers.len, j++) + dat += "
      [fibers[j]]" + P.info += "    Fibers: [dat]
" + else + P.info += "    No fibers found." + var/list/blood = outputs[3] + if(blood && blood.len) + var/dat = "[blood[1]]" + for(var/j = 2, j <= blood.len, j++) + dat += "
      [blood[j]]" + P.info += "    Blood: [dat]
" + else + P.info += "    No blood found.
" + else + usr << "ERROR. Database not found!
" + if("scan") + if(scanning) + scan_process = 3 + scan_data = "Scanning [scanning]: 25% complete" + updateDialog() + sleep(50) + if(!scan_process) + scan_data = null + updateDialog() + return + scan_data = "Scanning [scanning]: 50% complete" + updateDialog() + scan_process = 2 + sleep(50) + if(!scan_process) + scan_data = null + updateDialog() + return + scan_data = "Scanning [scanning]: 75% complete" + updateDialog() + scan_process = 1 + sleep(50) + if(!scan_process) + scan_data = null + updateDialog() + return + scan_process = 0 + scan_name = scanning.name + scan_data = "[scanning]

" + if (scanning.blood_DNA) + scan_data += "Blood Found:
" + for(var/i = 1, i < (scanning.blood_DNA.len + 1), i++) + var/list/templist = scanning.blood_DNA[i] + scan_data += "-Blood type: [templist[2]]\nDNA: [templist[1]]

" + else + scan_data += "No Blood Found

" + if (!length(scanning.fingerprints)) + scan_data += "No Fingerprints Found

" + else + var/list/L = scanning.fingerprints + scan_data += "Isolated [L.len] Fingerprints. Loaded into database.
" + add_data(scanning) + + if(!scanning.suit_fibers) + /*if(istype(scanning,/obj/item/device/detective_scanner)) + var/obj/item/device/detective_scanner/scanner = scanning + if(scanner.stored_name) + scan_data += "Fibers/Materials Data - [scanner.stored_name]:
" + for(var/data in scanner.stored_fibers) + scan_data += "- [data]
" + else + scan_data += "No Fibers/Materials Data
" + else*/ + scan_data += "No Fibers/Materials Located
" + else + /*if(istype(scanning,/obj/item/device/detective_scanner)) + var/obj/item/device/detective_scanner/scanner = scanning + if(scanner.stored_name) + scan_data += "Fibers/Materials Data - [scanner.stored_name]:
" + for(var/data in scanner.stored_fibers) + scan_data += "- [data]
" + else + scan_data += "No Fibers/Materials Data
"*/ + + scan_data += "Fibers/Materials Found:
" + for(var/data in scanning.suit_fibers) + scan_data += "- [data]
" + if(istype(scanning,/obj/item/device/detective_scanner)) + scan_data += "
Data transfered from Scanner to Database.
" + add_data_scanner(scanning) + else if(!length(scanning.fingerprints)) + scan_data += "
Add to Database?
" + else + temp = "Scan Failed: No Object" + + + if("print") + if(scan_data) + temp = "Scan Data Printed." + var/obj/item/weapon/paper/P = new(loc) + P.name = "Scan Data ([scan_name])" + P.info = "[scan_data]" + P.overlays += "paper_words" + else + temp = "Print Failed: No Data" + if("erase") + scan_data = "" + if("cancel") + scan_process = 0 + if("add") + if(scanning) + add_data(scanning) + else + temp = "Data Transfer Failed: No Object." + updateUsrDialog() + + verb/reset() + set name = "Reset Screen" + set category = "Object" + set src in oview(1) + temp = "" + add_fingerprint(usr) + return + + ex_act() return @@ -312,289 +625,16 @@ obj/machinery/computer/forensic_scanning del(card) return + proc/delete_record(var/location) + if(misc && misc.len) + for(var/i = location, i < misc.len, i++) + misc[i] = misc[i+i] + misc.len-- + return + proc/get_name(var/atom/A) return A.name - Topic(href,href_list) - switch(href_list["operation"]) - if("login") - var/mob/M = usr - if(istype(M,/mob/living/silicon)) - authenticated = 1 - updateDialog() - return - var/obj/item/weapon/card/id/I = M.equipped() - if (I && istype(I)) - if(src.check_access(I)) - authenticated = 1 - //usr << "\green Access Granted" - //if(!authenticated) - //usr << "\red Access Denied" - if("logout") - authenticated = 0 - if("clear") - if(canclear) - temp = null - if("eject") - if(scanning) - scanning.loc = loc - scanning = null - else - temp = "Eject Failed: No Object" - if("insert") - var/mob/M = usr - var/obj/item/I = M.equipped() - if(I && istype(I)) - if(istype(I, /obj/item/weapon/evidencebag)) - scanning = I.contents[1] - scanning.loc = src - I.overlays -= scanning - I.icon_state = "evidenceobj" - else - scanning = I - M.drop_item() - I.loc = src - else - temp = "Invalid Object Rejected." - if("card") - var/mob/M = usr - var/obj/item/I = M.equipped() - if(I && istype(I,/obj/item/weapon/f_card)) - card = I - M.drop_item() - I.loc = src - process_card() - usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints." - else - usr << "\red Invalid Object Rejected." - if("database") - canclear = 1 - if(!misc && !files) - temp = "Database is empty." - else - if(files) - temp = "Criminal Evidence Database

" - temp += "Consolidated data points:
" - for(var/i = 1, i < (files.len + 1), i++) - temp += "{Dossier [i]}
" - temp += "
{Insert Finger Print Card}


" - else - temp = "" - if(misc) - temp += "Auxiliary Evidence Database

" - temp += "This is where anything without fingerprints goes.

" - for(var/i = 1, i < (misc.len + 1), i++) - var/list/temp_list = misc[i] - var/item_name = get_name(temp_list[1]) - temp += "{[item_name]}
" - if("record") - canclear = 0 - if(files) - temp = "Criminal Evidence Database

" - temp += "Consolidated data points: Dossier [href_list["identifier"]]
" - var/identifier = text2num(href_list["identifier"]) - var/list/dossier = files[identifier] - var/list/prints = params2list(dossier[1]) - var/print_string = "Fingerprints: Print not complete!
" - if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE) - print_string = "Fingerprints: (80% or higher completion reached)
" + prints[num2text(2)] + "
" - temp += print_string - for(var/i = 2, i < (dossier.len + 1), i++) - var/list/outputs = dossier[i] - var/item_name = get_name(outputs[1]) - var/list/prints_len = outputs[2] - temp += "Object: [item_name]
" - temp += "    [prints_len.len] Unique fingerprints found.
" - var/list/fibers = outputs[3] - if(fibers && fibers.len) - var/dat = "[fibers[1]]" - for(var/j = 2, j < (fibers.len + 1), j++) - dat += ",
      [fibers[j]]" - temp += "    Fibers: [dat]
" - else - temp += "    No fibers found.
" - var/list/blood = outputs[4] - if(blood && blood.len) - var/dat = "[blood[1]]" - if(blood.len > 1) - for(var/j = 2, j < (blood.len + 1), j++) - dat += ",
      [blood[j]]" - temp += "    Blood: [dat]
" - else - temp += "    No blood found.
" - else - temp = "ERROR. Database not found!
" - temp += "
{Print}" - temp += "
{Return}" - if("databaseprint") - if(files) - var/obj/item/weapon/paper/P = new(loc) - P.name = "Database File (Dossier [href_list["identifier"]])" - P.overlays += "paper_words" - P.info = "Criminal Evidence Database

" - P.info += "Consolidated data points: Dossier [href_list["identifier"]]
" - var/list/dossier = files[text2num(href_list["identifier"])] - var/list/prints = params2list(dossier[1]) - var/print_string = "Fingerprints: Print not complete!
" - if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE) - print_string = "Fingerprints: " + prints[num2text(2)] + "
" - P.info += print_string - for(var/i = 2, i < (dossier.len + 1), i++) - var/list/outputs = dossier[i] - var/item_name = get_name(outputs[1]) - var/list/prints_len = outputs[2] - P.info += "Object: [item_name]
" - P.info += "    [prints_len.len] Unique fingerprints found.
" - var/list/fibers = outputs[3] - if(fibers && fibers.len) - var/dat = "[fibers[1]]" - for(var/j = 2, j < (fibers.len + 1), j++) - dat += ",
      [fibers[j]]" - P.info += "    Fibers: [dat]
" - else - P.info += "    No fibers found.
" - var/list/blood = outputs[4] - if(blood && blood.len) - var/dat = "[blood[1]]" - if(blood.len > 1) - for(var/j = 2, j < (blood.len + 1), j++) - dat += ",
      [blood[j]]" - P.info += "    Blood: [dat]
" - else - P.info += "    No blood found." - else - usr << "ERROR. Database not found!
" - if("auxiliary") - canclear = 0 - if(misc) - temp = "Auxiliary Evidence Database

" - var/identifier = text2num(href_list["identifier"]) - var/list/outputs = misc[identifier] - var/item_name = get_name(outputs[1]) - temp += "Consolidated data points: [item_name]
" - var/list/fibers = outputs[2] - if(fibers && fibers.len) - var/dat = "[fibers[1]]" - for(var/j = 2, j <= fibers.len, j++) - dat += "
      [fibers[j]]" - temp += "    Fibers: [dat]
" - else - temp += "    No fibers found." - var/list/blood = outputs[3] - if(blood && blood.len) - var/dat = "[blood[1]]" - for(var/j = 2, j <= blood.len, j++) - dat += "
      [blood[j]]" - temp += "    Blood: [dat]
" - else - temp += "    No blood found.
" - else - temp = "ERROR. Database not found!
" - temp += "
{Return}" - if("scan") - if(scanning) - scan_process = 3 - scan_data = "Scanning [scanning]: 25% complete" - updateDialog() - sleep(50) - if(!scan_process) - scan_data = null - updateDialog() - return - scan_data = "Scanning [scanning]: 50% complete" - updateDialog() - scan_process = 2 - sleep(50) - if(!scan_process) - scan_data = null - updateDialog() - return - scan_data = "Scanning [scanning]: 75% complete" - updateDialog() - scan_process = 1 - sleep(50) - if(!scan_process) - scan_data = null - updateDialog() - return - scan_process = 0 - scan_name = scanning.name - scan_data = "[scanning]

" - if (scanning.blood_DNA) - scan_data += "Blood Found:
" - for(var/i = 1, i < (scanning.blood_DNA.len + 1), i++) - var/list/templist = scanning.blood_DNA[i] - scan_data += "-Blood type: [templist[2]]\nDNA: [templist[1]]

" - else - scan_data += "No Blood Found

" - if (!length(scanning.fingerprints)) - scan_data += "No Fingerprints Found

" - else - var/list/L = scanning.fingerprints - scan_data += "Isolated [L.len] Fingerprints. Loaded into database.
" - add_data(scanning) - - if(!scanning.suit_fibers) - /*if(istype(scanning,/obj/item/device/detective_scanner)) - var/obj/item/device/detective_scanner/scanner = scanning - if(scanner.stored_name) - scan_data += "Fibers/Materials Data - [scanner.stored_name]:
" - for(var/data in scanner.stored_fibers) - scan_data += "- [data]
" - else - scan_data += "No Fibers/Materials Data
" - else*/ - scan_data += "No Fibers/Materials Located
" - else - /*if(istype(scanning,/obj/item/device/detective_scanner)) - var/obj/item/device/detective_scanner/scanner = scanning - if(scanner.stored_name) - scan_data += "Fibers/Materials Data - [scanner.stored_name]:
" - for(var/data in scanner.stored_fibers) - scan_data += "- [data]
" - else - scan_data += "No Fibers/Materials Data
"*/ - - scan_data += "Fibers/Materials Found:
" - for(var/data in scanning.suit_fibers) - scan_data += "- [data]
" - if(istype(scanning,/obj/item/device/detective_scanner)) - scan_data += "
Data transfered from Scanner to Database.
" - add_data_scanner(scanning) - else if(!length(scanning.fingerprints)) - scan_data += "
Add to Database?
" - else - temp = "Scan Failed: No Object" - - - if("print") - if(scan_data) - temp = "Scan Data Printed." - var/obj/item/weapon/paper/P = new(loc) - P.name = "Scan Data ([scan_name])" - P.info = "[scan_data]" - P.overlays += "paper_words" - else - temp = "Print Failed: No Data" - if("erase") - scan_data = "" - if("cancel") - scan_process = 0 - if("add") - if(scanning) - add_data(scanning) - else - temp = "Data Transfer Failed: No Object." - updateUsrDialog() - - verb/reset() - set name = "Reset Screen" - set category = "Object" - set src in oview(1) - temp = "" - add_fingerprint(usr) - return - detective icon_state = "old" name = "PowerScan Mk.I" @@ -663,7 +703,7 @@ turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info) T.desc = "These bloody footprints appear to have been made by [info]." if(istype(M,/mob/living/carbon/human)) T.blood_DNA.len++ - T.blood_DNA[T.blood_DNA.len] = list(M.dna.unique_enzymes,M.b_type) + T.blood_DNA[T.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type) return var/obj/effect/decal/cleanable/blood/tracks/this = new(src) this.icon = 'footprints.dmi' diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 0305d64ef21..cb0572d8451 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -92,14 +92,17 @@ if(src.fingerprintslast != H.key) src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key) src.fingerprintslast = H.key - return 0 - if (H.dna.uni_identity || (H.gloves && prob(25) && istype(H.gloves, /obj/item/clothing/gloves/latex))) + 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(src.fingerprintslast != H.key) src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key) src.fingerprintslast = H.key var/new_prints = 0 var/prints - for(var/i = 1, i < (src.fingerprints.len + 1), i++) + for(var/i = 1, i <= src.fingerprints.len, i++) var/list/L = params2list(src.fingerprints[i]) if(L[num2text(1)] == md5(H.dna.uni_identity)) new_prints = i @@ -117,9 +120,12 @@ else src.fingerprints[i] = "1=" + L[num2text(1)] + "&2=" + test_print if(new_prints) - src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40)))) + src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), (H.gloves ? rand(10,20) : rand(25,40))))) else if(new_prints == 0) src.fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40))) + for(var/i = 1, i <= src.fingerprints.len, i++) + if(length(src.fingerprints[i]) != 69) + src.fingerprints.Remove(src.fingerprints[i]) return 1 else if(src.fingerprintslast != M.key) @@ -133,7 +139,7 @@ return 0 if (!( src.flags ) & 256) return - if (!( src.blood_DNA )) + if (src.blood_DNA) if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected. var/obj/item/source2 = src source2.icon_old = src.icon @@ -158,7 +164,7 @@ return var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source2) var/list/blood_DNA_temp[1] - blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.b_type) + blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type) this.blood_DNA = blood_DNA_temp this.virus2 = M.virus2 for(var/datum/disease/D in M.viruses) @@ -201,7 +207,8 @@ if( istype(src, /turf/simulated) ) var/turf/simulated/source1 = src var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1) - this.blood_DNA = M.dna.unique_enzymes + this.blood_DNA = list(M.dna.unique_enzymes, M.dna.b_type) + this.OriginalMob = M.dna.original_name for(var/datum/disease/D in M.viruses) var/datum/disease/newDisease = new D.type this.viruses += newDisease diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 3326604e932..441a7f06fbe 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -698,13 +698,8 @@ // calculates a path to the current destination // given an optional turf to avoid /obj/machinery/bot/mulebot/proc/calc_path(var/turf/avoid = null) - if(src.target) - src.path = AStar(src.loc, src.target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_ortho, 0, 250, id=botcard, exclude=avoid) - src.path = reverselist(src.path) - else - for (var/mob/M in world) - if (M.client && M.client.holder) - M << "ERROR:A Mulebot has attempted to path to a null target! This is a bug!" + src.path = AStar(src.loc, src.target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_ortho, 0, 250, id=botcard, exclude=avoid) + src.path = reverselist(src.path) // sets the current destination diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index f7262da2a7b..43771949da9 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1028,6 +1028,8 @@ About the new airlock wires panel: /obj/machinery/door/airlock/attackby(C as obj, mob/user as mob) //world << text("airlock attackby src [] obj [] mob []", src, C, user) + if(istype(C, /obj/item/device/detective_scanner)) + return if (!istype(usr, /mob/living/silicon)) if (src.isElectrified()) if(src.shock(user, 75)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 7bb30b00cb9..0a697d414c1 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -129,6 +129,8 @@ return 1 /obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I, /obj/item/device/detective_scanner)) + return ..() if (src.operating) return src.add_fingerprint(user) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index f22e963b133..09abb12e1ab 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -176,18 +176,25 @@ newmeat.reagents.add_reagent("nutriment", sourcenutriment / totalslabs) // Thehehe. Fat guys go first allmeat += newmeat + for (var/mob/M in world) + if (M.client && M.client.holder && (M.client.holder.level != -3)) + M << "\red [user.name]/[user.ckey] has gibbed [src.occupant.name]/[src.occupant.ckey]" src.occupant.death(1) src.occupant.ghostize() del(src.occupant) spawn(src.gibtime) playsound(src.loc, 'splat.ogg', 50, 1) operating = 0 + var/iterator = 0 for (var/i=1 to allmeat.len) var/obj/item/meatslab = allmeat[i] - var/turf/Tx = locate(src.x - i, src.y, src.z) + var/turf/Tx = locate(src.x - i + iterator, src.y, src.z) + if(Tx.density) + iterator += 1 + Tx = locate(src.x - i + iterator, src.y, src.z) meatslab.loc = src.loc meatslab.throw_at(Tx,i,3) if (!Tx.density) - new /obj/effect/decal/cleanable/blood/gibs(Tx,i) + new /obj/effect/decal/cleanable/blood/gibs(Tx,i + iterator) src.operating = 0 update_icon() diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index c1576d41d34..01462387d29 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -132,6 +132,8 @@ MASS SPECTROMETER return afterattack(atom/A as obj|turf|area, mob/user as mob) + if(!(locate(A) in oview(1,user))) + return if(src.loc != user) return 0 src.add_fingerprint(user) diff --git a/code/game/objects/devices/taperecorder.dm b/code/game/objects/devices/taperecorder.dm index 3f6572a034a..da6e8946db3 100644 --- a/code/game/objects/devices/taperecorder.dm +++ b/code/game/objects/devices/taperecorder.dm @@ -13,7 +13,7 @@ var/playsleepseconds = 0.0 var/list/storedinfo = new/list() var/list/timestamp = new/list() - flags = FPRINT | TABLEPASS| CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT throwforce = 2 throw_speed = 4 throw_range = 20 @@ -23,18 +23,18 @@ var/ending = copytext(msg, length(msg)) src.timestamp+= src.timerecorded if (M.stuttering) - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\"" + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] stammers, \"[msg]\"" return if (M.getBrainLoss() >= 60) - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\"" + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] gibbers, \"[msg]\"" return if (ending == "?") - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\"" + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] asks, \"[msg]\"" return else if (ending == "!") - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\"" + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] exclaims, \"[msg]\"" return - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\"" + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] says, \"[msg]\"" return /obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -69,12 +69,12 @@ usr << "\red The tape recorder makes a scratchy noise." return src.icon_state = "taperecorderrecording" - if(src.timerecorded < 3600 && src.playing == 0) + if(src.timerecorded < 10800 && src.playing == 0) usr << "\blue Recording started." src.recording = 1 src.timestamp+= src.timerecorded - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started." - for(src.timerecorded, src.timerecorded<3600) + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording started." + for(src.timerecorded, src.timerecorded<10800) if(src.recording == 0) break src.timerecorded++ @@ -96,7 +96,7 @@ if (src.recording == 1) src.recording = 0 src.timestamp+= src.timerecorded - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped." + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording stopped." usr << "\blue Recording stopped." src.icon_state = "taperecorderidle" return @@ -149,7 +149,7 @@ src.playing = 1 src.icon_state = "taperecorderplaying" usr << "\blue Playing started." - for(var/i=1,src.timerecorded<3600,sleep(10 * (src.playsleepseconds) )) + for(var/i=1,src.timerecorded<10800,sleep(10 * (src.playsleepseconds) )) if (src.playing == 0) break if (src.storedinfo.len < i) @@ -219,12 +219,12 @@ usr << "\red The tape recorder makes a scratchy noise." return src.icon_state = "taperecorderrecording" - if(src.timerecorded < 3600 && src.playing == 0) + if(src.timerecorded < 10800 && src.playing == 0) usr << "\blue Recording started." src.recording = 1 src.timestamp+= src.timerecorded - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started." - for(src.timerecorded, src.timerecorded<3600) + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording started." + for(src.timerecorded, src.timerecorded<10800) if(src.recording == 0) break src.timerecorded++ @@ -241,7 +241,7 @@ if (src.recording == 1) src.recording = 0 src.timestamp+= src.timerecorded - src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped." + src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording stopped." usr << "\blue Recording stopped." src.icon_state = "taperecorderidle" return diff --git a/code/game/objects/displaycase.dm b/code/game/objects/displaycase.dm index aa06f50f3f3..ea1f08b8c48 100644 --- a/code/game/objects/displaycase.dm +++ b/code/game/objects/displaycase.dm @@ -81,6 +81,7 @@ if ((O.client && !( O.blinded ))) O << text("\red [] kicks the display case.", usr) src.health -= 2 + src.add_fingerprint(user) healthcheck() return diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index 25d4fabd2ca..69902324703 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -195,6 +195,8 @@ return /obj/item/attackby(obj/item/W as obj, mob/user as mob) + if(istype(W, /obj/item/device/detective_scanner)) + return if (istype(W, /obj/item/weapon/packageWrap)) var/location = get_turf(src.loc) if(istype(src,/obj/item/weapon/storage) && istype(src.loc, /mob)) //Put it into the bag @@ -439,7 +441,7 @@ mob/proc/flash_weak_pain() else M.take_organ_damage(7) M.eye_blurry += rand(3,4) - M.eye_stat += rand(2,4) + M.eye_stat += rand(5,9) if (M.eye_stat >= 10) M.eye_blurry += 15+(0.1*M.eye_blurry) M.disabilities |= 1 diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 14838b1ef74..bedcbf3f3d5 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -357,6 +357,9 @@ CIRCULAR SAW /obj/item/weapon/autopsy_scanner/verb/print_data() set src in view(usr, 1) + if(usr.stat == 2) + src << "No." + return var/scan_data = "" var/n = 1 diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index b95d019cd77..fb7b81f6dde 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -1450,6 +1450,8 @@ datum M:adjustOxyLoss(-3) M:heal_organ_damage(3,3) M:adjustToxLoss(-3) + M:halloss = 0 + M:hallucination -= 5 ..() return diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 3ead36c0de6..48f8df1be85 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -141,24 +141,25 @@ mob/living/carbon/proc/handle_hallucinations() if(66 to 70) //Flashes of danger //src << "Danger Flash" - var/possible_points = list() - for(var/turf/simulated/floor/F in view(src,world.view)) - possible_points += F - var/turf/simulated/floor/target = pick(possible_points) - switch(rand(1,3)) - if(1) - halbody = image('human.dmi',target,"husk_l",TURF_LAYER) - if(2,3) - halbody = image('human.dmi',target,"husk_s",TURF_LAYER) - spawn(2) - step_towards(halbody,src) - sleep(2) - step_towards(halbody,src) + if(!halbody) + var/possible_points = list() + for(var/turf/simulated/floor/F in view(src,world.view)) + possible_points += F + var/turf/simulated/floor/target = pick(possible_points) + switch(rand(1,5)) + if(1) + halbody = image('human.dmi',target,"husk_l",TURF_LAYER) + if(2,3) + halbody = image('human.dmi',target,"husk_s",TURF_LAYER) + if(4) + halbody = image('alien.dmi',target,"alienother",TURF_LAYER) + if(5) + halbody = image('xcomalien.dmi',target,"chryssalid",TURF_LAYER) - if(client) client.images += halbody - spawn(rand(50,80)) //Only seen for a brief moment. - if(client) client.images -= halbody - halbody = null + if(client) client.images += halbody + spawn(rand(50,80)) //Only seen for a brief moment. + if(client) client.images -= halbody + halbody = null if(71 to 75) //Fake death src.sleeping_willingly = 1 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index f5db92ac0b9..5a551dd5fd5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -159,7 +159,7 @@ // a.hallucinate(src) if(!handling_hal && hallucination > 20) spawn handle_hallucinations() //The not boring kind! - hallucination -= 1 + hallucination -= 2 //if(health < 0) // for(var/obj/a in hallucinations) // del a diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index dedb7221542..9b267e58854 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -50,15 +50,16 @@ src << "While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc." src << "To use something, simply double-click it." src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI." - src << "Remember to adjust your camera network if you are having difficulty navigating the camera networks with the arrow keys or clicking on certain objects." + src << "Remember to adjust your camera network if you are having difficulty navigating the camera networks with the arrow keys or clicking on certain objects.
" + src << "
IMPORTANT GAMEPLAY ASPECTS:" + src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\"" + src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1." + src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)" + src << "
We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible." + if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai))) show_laws() src << "These laws may be changed by other players, or by you being the traitor." - src << "
IMPORTANT GAMEPLAY ASPECTS:" - src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\"" - src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1." - src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)" - src << "
We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible." job = "AI" spawn(0) diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 5c668e9508d..079a6c280a1 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/maps/tgstation.2.0.8.dmm b/maps/tgstation.2.0.8.dmm index 1a2f72638fd..a0af85a2b5e 100644 --- a/maps/tgstation.2.0.8.dmm +++ b/maps/tgstation.2.0.8.dmm @@ -1498,7 +1498,7 @@ "aCP" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/wall,/area/maintenance/fpmaint) "aCQ" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/obj/structure/disposalpipe/segment{dir = 1},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor/plating,/area/maintenance/fpmaint) "aCR" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area/maintenance/fpmaint) -"aCS" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/maintenance{name = "Autolathe Storage"; req_access_txt = "12"},/turf/simulated/floor,/area/maintenance/fpmaint) +"aCS" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/maintenance{name = "Autolathe Storage"; req_access_txt = "0"},/turf/simulated/floor,/area/maintenance/fpmaint) "aCT" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/fpmaint) "aCU" = (/obj/structure/cable,/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva) "aCV" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/command{name = "E.V.A."; req_access = null; req_access_txt = "18"},/turf/simulated/floor,/area/ai_monitored/storage/eva)