Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data detector tweaks #6194

Merged
merged 4 commits into from
May 10, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions code/game/objects/items/devices/data_detector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/obj/structure/machinery/computer/objective,
/obj/item/limb/head/synth,
)
var/detect_empty_vial_boxes = FALSE

/obj/item/device/motiondetector/intel/get_help_text()
. = "Green indicators on your HUD will show the location of intelligence objects detected by the scanner. Has two modes: slow long-range [SPAN_HELPFUL("(14 tiles)")] and fast short-range [SPAN_HELPFUL("(7 tiles)")]."
Expand All @@ -43,22 +42,17 @@
var/detected
for(var/DT in objects_to_detect)
if(istype(I, DT))
if(!detect_empty_vial_boxes && istype(I, /obj/item/storage/fancy/vials/random))
if(!I.contents)
continue
if((istype(I, /obj/item/storage/fancy/vials/random) && !length(I.contents)) || (istype(I, /obj/item/reagent_container/glass/beaker/vial/random) && !I.reagents?.total_volume))
break //We don't need to ping already looted containers
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
detected = TRUE
if(I.contents)
for(var/obj/item/CI in I.contents)
if(istype(CI, DT))
if(!detect_empty_vial_boxes && istype(I, /obj/item/storage/fancy/vials/random))
if(!I.contents)
continue
if((istype(CI, /obj/item/storage/fancy/vials/random) && !length(CI.contents)) || (istype(CI, /obj/item/reagent_container/glass/beaker/vial/random) && !CI.reagents?.total_volume))
break
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
detected = TRUE
break
if(human_user && detected)
show_blip(human_user, I)
if(detected)
break

if(detected)
detected_sound = TRUE
Expand All @@ -76,13 +70,9 @@
for(var/obj/I in M.contents_twice())
for(var/DT in objects_to_detect)
if(istype(I, DT))
if(!detect_empty_vial_boxes && istype(I, /obj/item/storage/fancy/vials/random))
if(!I.contents)
continue
if((istype(I, /obj/item/storage/fancy/vials/random) && !length(I.contents)) || (istype(I, /obj/item/reagent_container/glass/beaker/vial/random) && !I.reagents?.total_volume))
break
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
detected = TRUE
break
if(detected)
break

if(human_user && detected)
show_blip(human_user, M)
Expand Down
Loading