Forensics QOL Changes (#7758)

Makes it so that using the forensics item on certain machinery such as airlocks, alarms, APCs, buttons, windoors etc doesn't apply fingerprints/fibers. This is necessary because these machines will call add_fingerprint BEFORE the forensic kit is used, thus polluting the sample with your own fibers, which is extremely annoying

Also made it so that using a forensics item on a fire alarm or button doesn't make you trigger them, because that's also really annoying.

This is take 2 because the first time I messed up my branches/forks because my brain is smooth.
This commit is contained in:
Crosarius
2020-01-02 11:49:51 +02:00
committed by Erki
parent 38a03fa0f8
commit e4d3993876
15 changed files with 80 additions and 20 deletions
+2 -1
View File
@@ -158,7 +158,8 @@
return attack_hand(user)
/obj/machinery/sleeper/attackby(var/obj/item/I, var/mob/user)
add_fingerprint(user)
if(!istype(I, /obj/item/forensics))
add_fingerprint(user)
if(istype(I, /obj/item/reagent_containers/glass))
if(!beaker)
beaker = I
+3 -2
View File
@@ -746,7 +746,8 @@
return 1
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
if(!istype(W, /obj/item/forensics))
src.add_fingerprint(user)
switch(buildstage)
if(2)
@@ -838,4 +839,4 @@ Just a object used in constructing air alarms
w_class = 2.0
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
// Fire Alarms moved to firealarm.dm
// Fire Alarms moved to firealarm.dm
+2 -1
View File
@@ -263,7 +263,8 @@ update_flag
if(!W.iswrench() && !istype(W, /obj/item/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
visible_message("<span class='warning'>\The [user] hits \the [src] with \a [W]!</span>")
src.health -= W.force
src.add_fingerprint(user)
if(!istype(W, /obj/item/forensics))
src.add_fingerprint(user)
healthcheck()
if(istype(user, /mob/living/silicon/robot) && istype(W, /obj/item/tank/jetpack))
+3 -1
View File
@@ -24,6 +24,8 @@
to_chat(user, "Error, no route to host.")
/obj/machinery/button/remote/attackby(obj/item/W, mob/user as mob)
if(istype(W, /obj/item/forensics))
return
return src.attack_hand(user)
/obj/machinery/button/remote/emag_act(var/remaining_charges, var/mob/user)
@@ -209,4 +211,4 @@
if(!active || (stat & NOPOWER))
icon_state = "launcherbtt"
else
icon_state = "launcheract"
icon_state = "launcheract"
+3 -2
View File
@@ -1014,7 +1014,8 @@ About the new airlock wires panel:
return
if(istype(C, /obj/item/taperoll))
return
src.add_fingerprint(user)
if(!istype(C, /obj/item/forensics))
src.add_fingerprint(user)
if (!repairing && (stat & BROKEN) && src.locked) //bolted and broken
if (!cut_bolts(C,user))
..()
@@ -1469,4 +1470,4 @@ About the new airlock wires panel:
#undef CYBORG_AIRLOCKCRUSH_RESISTANCE
#undef BOLTS_FINE
#undef BOLTS_EXPOSED
#undef BOLTS_CUT
#undef BOLTS_CUT
+2 -1
View File
@@ -116,7 +116,8 @@
// Description: If we are clicked with crowbar or wielded fire axe, try to manually open the door.
// This only works on broken doors or doors without power. Also allows repair with Plasteel.
/obj/machinery/door/blast/attackby(obj/item/C as obj, mob/user as mob)
src.add_fingerprint(user)
if(!istype(C, /obj/item/forensics))
src.add_fingerprint(user)
if((istype(C, /obj/item/material/twohanded/fireaxe) && C:wielded == 1) || (istype(C, /obj/item/melee/hammer)))
if (((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
force_toggle()
+2 -1
View File
@@ -269,7 +269,8 @@
return
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
src.add_fingerprint(user)
if(!istype(I, /obj/item/forensics))
src.add_fingerprint(user)
if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name())
if(stat & BROKEN)
+3 -1
View File
@@ -260,7 +260,8 @@
close()
/obj/machinery/door/firedoor/attackby(obj/item/C as obj, mob/user as mob)
add_fingerprint(user)
if(!istype(C, /obj/item/forensics))
add_fingerprint(user)
if(operating)
return//Already doing something.
if(C.iswelder() && !repairing)
@@ -525,4 +526,5 @@
icon = 'icons/obj/doors/DoorHazard2x1.dmi'
width = 2
dir = EAST
enable_smart_generation = FALSE
+3 -3
View File
@@ -220,8 +220,8 @@
take_damage(aforce)
return
src.add_fingerprint(user)
if(!istype(I, /obj/item/forensics))
src.add_fingerprint(user)
if (src.allowed(user))
if (src.density)
@@ -305,4 +305,4 @@
/obj/machinery/door/window/brigdoor/southright
dir = SOUTH
icon_state = "rightsecure"
base_state = "rightsecure"
base_state = "rightsecure"
+4 -1
View File
@@ -83,7 +83,10 @@
..()
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
if(!istype(W, /obj/item/forensics))
src.add_fingerprint(user)
else
return
if (W.isscrewdriver() && buildstage == 2)
if(!wiresexposed)
+2 -1
View File
@@ -165,7 +165,8 @@ datum/track/New(var/title_name, var/audio)
qdel(src)
/obj/machinery/media/jukebox/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
if(!istype(W, /obj/item/forensics))
src.add_fingerprint(user)
if(W.iswrench())
if(playing)
+3 -2
View File
@@ -99,7 +99,8 @@
return
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob)
src.add_fingerprint(usr)
if(!istype(W, /obj/item/forensics))
src.add_fingerprint(usr)
if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter))
to_chat(usr, "<span class='notice'>You put [W] back to [src].</span>")
user.drop_from_inventory(W,get_turf(src))
@@ -258,4 +259,4 @@ Nah
/obj/machinery/pipedispenser/disposal/orderable
anchored = 0
unwrenched = 1
unwrenched = 1
@@ -363,7 +363,8 @@
W.on_enter_storage(src)
if(user)
W.dropped(user)
add_fingerprint(user)
if(!istype(W, /obj/item/forensics))
add_fingerprint(user)
if(!prevent_warning)
for(var/mob/M in viewers(user, null))
@@ -732,4 +733,4 @@
//return 2**(w_class-1) //1,2,4,8,16,...
#undef STORAGE_SPACE_CAP
#undef STORAGE_SPACE_CAP
+2 -1
View File
@@ -440,7 +440,8 @@
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
return src.attack_hand(user)
src.add_fingerprint(user)
if(!istype(W, /obj/item/forensics))
src.add_fingerprint(user)
if (W.iscrowbar() && opened)
if (has_electronics==1)
if (terminal)
@@ -0,0 +1,43 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: Crosarius
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Adds checks to some machinery/airlocks/alarms/buttons to preclude forensics items from applying fibers/fingterprints BEFORE you take a sample."
- rscadd: "Stops fire alarms and remote airlock/blastdoor/etc buttons from being triggered when you use a forensics item on them, in addition to the above changes."
- rscadd: "Adds a check to the to preclude forensics items from applying fibers/fingterprints BEFORE you take the sample when you put an item in a bag."