diff --git a/code/WorkInProgress/SkyMarshal/portalathe.dm b/code/WorkInProgress/SkyMarshal/portalathe.dm index 083ce09a192..9fdc0e757ef 100644 --- a/code/WorkInProgress/SkyMarshal/portalathe.dm +++ b/code/WorkInProgress/SkyMarshal/portalathe.dm @@ -17,5 +17,5 @@ L.status = 0 L.on = 1 L.update() - user.visible_message("[user] repairs \the [target] on the spot with their [src]!","You repair the lightbulb!") + user.visible_message("[user] repairs \the [target] on the spot with their [src]!","You repair the lightbulb!","You hear a soft whiiir-pop noise over the sound of flexing glass, followed by the soft hum of an activated [target].") return \ No newline at end of file diff --git a/code/modules/DetectiveWork/detective_work.dm b/code/modules/DetectiveWork/detective_work.dm index 55a18aa3e34..9dee00f6014 100644 --- a/code/modules/DetectiveWork/detective_work.dm +++ b/code/modules/DetectiveWork/detective_work.dm @@ -166,7 +166,7 @@ obj/machinery/computer/forensic_scanning I.loc = src else usr << "Invalid Object Rejected." - if("card") + if("card") //Processing a fingerprint card. var/mob/M = usr var/obj/item/I = M.equipped() if(!(I && istype(I,/obj/item/weapon/f_card))) @@ -186,7 +186,7 @@ obj/machinery/computer/forensic_scanning process_card() else usr << "\red Invalid Object Rejected." - if("database") + if("database") //Viewing all records in each database canclear = 1 if(href_list["delete_record"]) delete_dossier(href_list["delete_record"]) @@ -211,7 +211,7 @@ obj/machinery/computer/forensic_scanning for(var/atom in misc) var/list/data_entry = misc[atom] temp += "{[data_entry[3]]}
" - if("record") + if("record") //Viewing a record from the "files" database. canclear = 0 if(files) temp = "Criminal Evidence Database

" @@ -245,7 +245,7 @@ obj/machinery/computer/forensic_scanning else temp = "ERROR. Database not found!
" temp += "
{Return}" - if("databaseprint") + if("databaseprint") //Printing from the "files" database. if(files) var/obj/item/weapon/paper/P = new(loc) P.name = "Database File (Dossier [files.Find(href_list["identifier"])])" @@ -274,12 +274,11 @@ obj/machinery/computer/forensic_scanning var/list/blood = outputs[3] if(blood && blood.len) P.info += " Blood:
" - for(var/j = 1, j <= blood.len, j++) - var/list/templist2 = blood[j] - P.info += "      Type: [templist2[2]], DNA: [templist2[1]]
" + for(var/named in blood) + P.info += "      Type: [blood[named]], DNA: [named]
" else usr << "ERROR. Database not found!
" - if("auxiliary") + if("auxiliary") //Viewing a record from the "misc" database. canclear = 0 if(misc) temp = "Auxiliary Evidence Database

" @@ -301,7 +300,7 @@ obj/machinery/computer/forensic_scanning else temp = "ERROR. Database not found!
" temp += "
{Return}" - if("auxiliaryprint") + if("auxiliaryprint") //Printing from the "misc" database. if(misc) var/obj/item/weapon/paper/P = new(loc) var/list/outputs = misc[href_list["identifier"]] @@ -402,7 +401,7 @@ obj/machinery/computer/forensic_scanning temp = "Scan Failed: No Object" - if("print") + if("print") //Printing scan data if(scan_data) temp = "Scan Data Printed." var/obj/item/weapon/paper/P = new(loc) @@ -415,7 +414,7 @@ obj/machinery/computer/forensic_scanning scan_data = "" if("cancel") scan_process = 0 - if("add") + if("add") //Adding an object (Manually) to the database. if(scanning) add_data(scanning) else @@ -540,7 +539,7 @@ obj/machinery/computer/forensic_scanning if(master) master[1] = stringmerge(master[1],new_print) else - CRASH("Fucking hell. Something went wrong, and it tried to update a null print or something. Tell SkyMarshal") + CRASH("Fucking hell. Something went wrong, and it tried to update a null print or something. Tell SkyMarshal (and give him this call stack)") return proc/process_card() //Same as above, but for fingerprint cards @@ -768,7 +767,7 @@ proc/blood_incompatible(donor,receiver) ..() afterattack(atom/A as obj|turf|area, mob/user as mob) - if(istype(A)) + if(istype(A) && src in user) user.visible_message("[user] starts to wipe down [A] with [src]!") if(do_after(user,30)) user.visible_message("[user] finishes wiping off the [A]!") @@ -776,7 +775,7 @@ proc/blood_incompatible(donor,receiver) return examine() - if (!( usr )) + if (!usr) return usr << "That's \a [src]." usr << desc diff --git a/code/modules/DetectiveWork/evidence.dm b/code/modules/DetectiveWork/evidence.dm index 5ff551d1ada..a35a4982a2d 100644 --- a/code/modules/DetectiveWork/evidence.dm +++ b/code/modules/DetectiveWork/evidence.dm @@ -1,8 +1,6 @@ //CONTAINS: //Evidence bags and stuff /////////// -//Shamelessly ripped from Mini's old code. - /obj/item/weapon/evidencebag name = "evidence bag" desc = "An empty evidence bag." @@ -10,34 +8,43 @@ icon_state = "evidenceobj" w_class = 1 -/* buggy and stuff -/obj/item/weapon/evidencebag/attackby(obj/item/weapon/O, mob/user as mob) - return src.afterattack(O, user) -*/ - /obj/item/weapon/evidencebag/afterattack(obj/item/O, mob/user as mob) + if(!in_range(O,user)) + return + if(istype(O, /obj/item/weapon/storage) && O in user) return ..() + if(!(O && istype(O)) || O.anchored == 1) - user << "You can't put that inside the [src]!" + user << "You can't put that inside \the [src]!" return ..() - if(O in user) + + if(istype(O, /obj/item/weapon/evidencebag)) + user << "You find putting an evidence bag in another evidence bag to be slightly absurd." + return + + if(O in user && (user.l_hand != O && user.r_hand != O)) //If it is in their inventory, but not in their hands, don't grab it off of them. user << "You are wearing that." return - if(src.contents.len > 0) + + if(contents.len) user << "The [src] already has something inside it." return ..() + if(istype(O.loc,/obj/item/weapon/storage)) var/obj/item/weapon/storage/U = O.loc user.client.screen -= O U.contents.Remove(O) + if(istype(O.loc,/obj/item/clothing/suit/storage/)) var/obj/item/clothing/suit/storage/U = O.loc user.client.screen -= O U.contents.Remove(O) - user << "You put the [O] inside the [src]." + + user.visible_message("\The [user] puts \a [O] into \a [src]", "You put \the [O] inside \the [src].",\ + "You hear a rustle as someone puts something into a plastic bag.") icon_state = "evidence" - src.overlays += O + overlays += O desc = "An evidence bag containing \a [O]. [O.desc]" O.loc = src w_class = O.w_class @@ -45,17 +52,19 @@ /obj/item/weapon/evidencebag/attack_self(mob/user as mob) - if (src.contents.len > 0) - var/obj/item/I = src.contents[1] - user << "You take the [I] out of the [src]." - src.overlays -= I - I.loc = get_turf(user.loc) + if (contents.len) + var/obj/item/I = contents[1] + user.visible_message("\The [user] takes \a [I] out of \a [src]", "You take \the [I] out of \the [src].",\ + "You hear someone rustle around in a plastic bag, and remove something.") + overlays -= I + user.put_in_hands(I) w_class = 1 - src.icon_state = "evidenceobj" + icon_state = "evidenceobj" desc = "An empty evidence bag." + else - user << "[src] is empty." - src.icon_state = "evidenceobj" + user << "\The [src] is empty." + icon_state = "evidenceobj" return /obj/item/weapon/storage/box/evidence diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 21b05206db0..91b60d91753 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -19,7 +19,7 @@ proc/unwrap() if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 - wrapped.loc = (get_turf(src.loc)) + wrapped.loc = (get_turf(loc)) if(istype(wrapped, /obj/structure/closet)) var/obj/structure/closet/O = wrapped O.welded = waswelded @@ -47,7 +47,7 @@ if(istype(W, /obj/item/device/destTagger)) var/obj/item/device/destTagger/O = W user << "\blue *TAGGED*" - src.sortTag = O.currTag + sortTag = O.currTag update_icon() else if(istype(W, /obj/item/weapon/pen)) switch(alert("What would you like to alter?",,"Title","Description", "Cancel")) @@ -56,9 +56,10 @@ if(!str || !length(str)) usr << "\red Invalid text." return - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] as [str]." - src.name = "[src.name] ([str])" + user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[examtext]\"",\ + "\blue You title \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") + name = "[name] ([str])" update_icon() if("Description") var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN) @@ -66,8 +67,9 @@ usr << "\red Invalid text." return examtext = str - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] with the note: [examtext]." + user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\ + "\blue You label \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") update_icon() return @@ -87,11 +89,29 @@ F.opened = 0 break + ex_act(severity) + switch(severity) + if(1.0) + del(src) + if(2.0) + if(prob(10)) + del(src) + else + wrapped.loc = get_turf(src) + wrapped:welded = waswelded + del(src) + return + if(3.0) + wrapped.loc = get_turf(src) + wrapped:welded = waswelded + del(src) + return + /obj/item/smallDelivery desc = "A small wrapped package." name = "small parcel" icon = 'storage.dmi' - icon_state = "deliverycrateSmall" + icon_state = "deliverycrateSmall1" var/tmp/obj/item/wrapped = null var/sortTag = null flags = FPRINT @@ -99,9 +119,8 @@ attack_self(mob/user) - if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 - src.wrapped.loc = (get_turf(src.loc)) - + if (wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 + wrapped.loc = (get_turf(loc)) del(src) return @@ -116,7 +135,7 @@ if(istype(W, /obj/item/device/destTagger)) var/obj/item/device/destTagger/O = W user << "\blue *TAGGED*" - src.sortTag = O.currTag + sortTag = O.currTag update_icon() else if(istype(W, /obj/item/weapon/pen)) switch(alert("What would you like to alter?",,"Title","Description", "Cancel")) @@ -125,9 +144,10 @@ if(!str || !length(str)) usr << "\red Invalid text." return - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] as [str]." - src.name = "[src.name] ([str])" + user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[examtext]\"",\ + "\blue You title \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") + name = "[name] ([str])" update_icon() if("Description") var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN) @@ -135,8 +155,9 @@ usr << "\red Invalid text." return examtext = str - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] with the note: [examtext]." + user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\ + "\blue You label \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") update_icon() return @@ -149,6 +170,22 @@ ..() return + ex_act(severity) + switch(severity) + if(1.0) + del(src) + if(2.0) + if(prob(40)) + del(src) + else + wrapped.loc = get_turf(src) + del(src) + return + if(3.0) + wrapped.loc = get_turf(src) + del(src) + return + /obj/item/weapon/packageWrap name = "package wrapper" icon = 'items.dmi' @@ -158,6 +195,8 @@ afterattack(var/obj/target as obj, mob/user as mob) + if(!in_range(target,user)) + return if(!(istype(target, /obj))) //this really shouldn't be necessary (but it is). -Pete return if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack) || istype(target,/obj/item/smallDelivery)) @@ -167,43 +206,54 @@ if(target in user) return - user.attack_log += text("\[[time_stamp()]\] Has used [src.name] on \ref[target]") + user.attack_log += text("\[[time_stamp()]\] Has used \a [src] on \ref[target]") if (istype(target, /obj/item)) var/obj/item/O = target - if (src.amount > 1) + if (amount > 1) var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(O.loc)) //Aaannd wrap it up! if(!istype(O.loc, /turf)) if(user.client) user.client.screen -= O P.wrapped = O O.loc = P - src.amount -= 1 + amount -= 1 + P.w_class = O.w_class + P.icon_state = "deliverycrateSmall[P.w_class]" + user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\ + "\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\ + "You hear someone taping paper around a small object.") else if (istype(target, /obj/structure/closet/crate)) var/obj/structure/closet/crate/O = target - if (src.amount > 3 && !O.opened) + if (amount > 3 && !O.opened) var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc)) P.icon_state = "deliverycrate" P.wrapped = O O.loc = P - src.amount -= 3 - else if(src.amount < 3) + amount -= 3 + user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\ + "\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\ + "You hear someone pondering a problem, using a tape measure, and taping paper around a large object.") + else if(amount < 3) user << "\blue You need more paper." else if (istype (target, /obj/structure/closet)) var/obj/structure/closet/O = target - if (src.amount > 3 && !O.opened) + if (amount > 3 && !O.opened) var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc)) P.wrapped = O P.waswelded = O.welded O.welded = 1 O.loc = P - src.amount -= 3 - else if(src.amount < 3) + amount -= 3 + user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\ + "\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\ + "You hear someone pondering a problem, using a tape measure, and taping paper around a large object.") + else if(amount < 3) user << "\blue You need more paper." else user << "\blue The object you are trying to wrap is unsuitable for the sorting machinery!" - if (src.amount <= 0) - new /obj/item/weapon/c_tube( src.loc ) + if (amount <= 0) + new /obj/item/weapon/c_tube( loc ) del(src) return return @@ -275,15 +325,15 @@ Topic(href, href_list) usr.machine = src - src.add_fingerprint(usr) + add_fingerprint(usr) if(href_list["nextTag"]) var/n = text2num(href_list["nextTag"]) if(n > locationList.len) var/t1 = input("Which tag?","Tag") as null|text if(t1) - src.currTag = t1 + currTag = t1 else - src.currTag = locationList[n] + currTag = locationList[n] if(istype(loc,/mob)) interact(loc) else @@ -291,18 +341,15 @@ return attack(target as obj, mob/user as mob) - if (istype(target, /obj/structure/bigDelivery)) - user << "\blue *TAGGED*" - var/obj/structure/bigDelivery/O = target - O.sortTag = src.currTag - O.update_icon() - else if (istype(target, /obj/item/smallDelivery)) - user << "\blue *TAGGED*" - var/obj/item/smallDelivery/O = target - O.sortTag = src.currTag - O.update_icon() + if (istype(target, /obj/structure/bigDelivery) || istype(target, /obj/item/smallDelivery)) + user.visible_message("\The [user] tags \a [target] with \a [src].", "\blue *TAGGED*",\ + "You hear a short electronic click-shunk, like something being printed on a surface.") + target:sortTag = currTag + target:update_icon() else - user << "\blue You can only tag properly wrapped delivery packages!" + user.visible_message("\The [user] tries to tag \a [target], but their [src] refuses to work on anything but packages.",\ + "\blue Your [src] flashes: \"You can only tag properly wrapped delivery packages!\"",\ + "You hear a short click then a sad synthesized noise.") return /obj/machinery/disposal/deliveryChute @@ -311,6 +358,7 @@ density = 0 icon_state = "intake" var/currentlyFlushing = 0 + var/defaultDestination = "Disposals" interact() return @@ -322,7 +370,7 @@ else if (istype(AM, /mob)) var/mob/M = AM M.loc = src - src.flush() + flush() flush() flushing = 1 @@ -333,13 +381,13 @@ for(var/obj/structure/bigDelivery/O in src) deliveryCheck = 1 if(!O.sortTag) - O.sortTag = "Disposals" + O.sortTag = defaultDestination for(var/obj/item/smallDelivery/O in src) deliveryCheck = 1 if (!O.sortTag) - O.sortTag = "Disposals" + O.sortTag = defaultDestination if(deliveryCheck == 0) - H.destinationTag = "Disposals" + H.destinationTag = defaultDestination H.init(src) // copy the contents of disposer to holder @@ -366,11 +414,11 @@ return CanPass(atom/A, turf/T) - if(istype(A, /mob/living)) // You Shall Not Pass! + if(istype(A, /mob/living)) // You Shall Get Sucked In And Killed! var/mob/living/M = A HasEntered(M) return 0 - if(istype(A, /obj)) // You Shall Not Pass! + if(istype(A, /obj)) // You Shall Get Mailed! var/obj/M = A HasEntered(M) return 1 diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index ce38d4553de..fb313fc33b5 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ