mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user