Files
Bubberstation/code/modules/cargo/export_scanner.dm
SkyratBot 6355c9917e [MIRROR] Export scanner doesn't need to link + old bounty code is gone (#2197)
* Export scanner doesn't need to link + old bounty code is gone (#55504)

Removes the Export scanner's need to link with a console and cleans up the old bounty code

* Export scanner doesn't need to link + old bounty code is gone

Co-authored-by: spessbro <51048066+spessbro@users.noreply.github.com>
2020-12-17 08:02:12 +01:00

27 lines
986 B
Plaintext

/obj/item/export_scanner
name = "export scanner"
desc = "A device used to check objects against Nanotrasen exports database."
icon = 'icons/obj/device.dmi'
icon_state = "export_scanner"
inhand_icon_state = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
item_flags = NOBLUDGEON
w_class = WEIGHT_CLASS_SMALL
/obj/item/export_scanner/afterattack(obj/O, mob/user, proximity)
. = ..()
if(!istype(O) || !proximity)
return
// Before you fix it:
// yes, checking manifests is a part of intended functionality.
var/datum/export_report/ex = export_item_and_contents(O, dry_run=TRUE)
var/price = 0
for(var/x in ex.total_amount)
price += ex.total_value[x]
if(price)
to_chat(user, "<span class='notice'>Scanned [O], value: <b>[price]</b> credits[O.contents.len ? " (contents included)" : ""].</span>")
else
to_chat(user, "<span class='warning'>Scanned [O], no export value.</span>")