Skip to content

Commit

Permalink
hides ugly finger prints behind the Forensic Spray:tm: (#8060)
Browse files Browse the repository at this point in the history
title

gif

![47sjvfYo61Kfv1zo](https://github.com/user-attachments/assets/02634a55-a1f6-4ace-a201-30c742b43c23)


:cl:
add: fingerprints must now be revealed by forensic spray. they disappear
after a minute
/:cl:
  • Loading branch information
harryob authored Jan 12, 2025
1 parent 0a7f28e commit b7f28aa
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/game/machinery/vending/vending_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
/obj/item/explosive/grenade/flashbang = 4,
/obj/item/weapon/gun/energy/taser = 4,
/obj/item/reagent_container/spray/pepper = 4,
/obj/item/reagent_container/spray/investigation = 4,
/obj/item/weapon/baton = 4,
/obj/item/device/flashlight = 4,
/obj/item/storage/belt/security/MP = 4,
Expand Down
12 changes: 12 additions & 0 deletions code/game/objects/effects/decals/prints.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
gender = PLURAL
icon = 'icons/effects/fingerprints.dmi'
icon_state = "prints"
alpha = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
anchored = TRUE
unacidable = TRUE

Expand Down Expand Up @@ -79,6 +81,16 @@

return information

/// Toggles between the prints being hidden and shown, including in the context menu
/obj/effect/decal/prints/proc/set_visiblity(visible = FALSE)
if(!visible)
animate(src, time = 2 SECONDS, alpha = 0)
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
return

animate(src, time = 2 SECONDS, alpha = 255)
mouse_opacity = MOUSE_OPACITY_OPAQUE

/obj/effect/decal/prints/Destroy()
SSclues.prints_list -= src

Expand Down
9 changes: 9 additions & 0 deletions code/game/objects/items/reagent_containers/spray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,12 @@
/obj/item/reagent_container/spray/hydro/Initialize()
. = ..()
reagents.add_reagent("ammonia", src.volume)

/obj/item/reagent_container/spray/investigation
name = "forensic spray"
desc = /datum/reagent/forensic_spray::description

/obj/item/reagent_container/spray/investigation/Initialize()
. = ..()

reagents.add_reagent(/datum/reagent/forensic_spray::id, volume)
17 changes: 17 additions & 0 deletions code/modules/reagents/chemistry_reagents/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1069,3 +1069,20 @@
chemclass = CHEM_CLASS_SPECIAL
properties = list(PROPERTY_TRANSFORMATIVE = 4, PROPERTY_NUTRITIOUS = 3, PROPERTY_HEMOGENIC = 1)
flags = REAGENT_SCANNABLE

/datum/reagent/forensic_spray
name = "Forensic Spray"
id = "forensic_spray"
description = "A dye-containing spray that binds to the skin oils left behind by fingerprints."
reagent_state = LIQUID
color = "#79847a"
chemclass = CHEM_CLASS_RARE

/datum/reagent/forensic_spray/reaction_obj(obj/reacting_on, volume)
if(!istype(reacting_on, /obj/effect/decal/prints))
return

var/obj/effect/decal/prints/reacting_prints = reacting_on
reacting_prints.set_visiblity(TRUE)

addtimer(CALLBACK(reacting_prints, TYPE_PROC_REF(/obj/effect/decal/prints, set_visiblity), FALSE), 1 MINUTES, TIMER_UNIQUE|TIMER_OVERRIDE)

0 comments on commit b7f28aa

Please sign in to comment.