Allows toggling of reagent scans in deep scan devices (#19123)

* Allows toggling of reagent scans in deep scan devices

Adds a verb to deep scan devices that allows them to turn off the sediment scan info, as this pastes a lot of text.

I think usr is okay to use in verbs, right?

* range

* Like this?

* Killians suggestion
This commit is contained in:
SatinIsle
2026-02-01 18:21:46 +00:00
committed by GitHub
parent 7365cef38e
commit cf509261b8
+10 -1
View File
@@ -9,6 +9,7 @@
var/scan_time = 2 SECONDS
var/range = 2
var/exact = FALSE
var/sediment_scan = TRUE
/obj/item/mining_scanner/attack_self(mob/user)
. = ..(user)
@@ -22,6 +23,14 @@
ScanTurf(get_turf(user), user)
/obj/item/mining_scanner/verb/toggle_sediment_scan()
set name = "Toggle Sediment Scan"
set category = "Object"
set src in view(1)
to_chat(usr, span_notice("\The [src] will [sediment_scan ? "no longer" : "now"] scan for reagents."))
sediment_scan = !sediment_scan
/obj/item/mining_scanner/proc/ScanTurf(var/atom/target, var/mob/user)
var/list/metals = list(
"surface minerals" = 0,
@@ -75,7 +84,7 @@
message += "<br>" + span_notice("- [result] of [ore_type].")
if(reagents_found.len)
if(sediment_scan && reagents_found.len)
message += "<br>" + span_infoplain("Sediment sample contains: ")
for(var/reg_id in reagents_found)
var/amnt = reagents_found[reg_id]