mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
* tgu * ok.. * they killed the fucking grab proc im not fixing this * fixes some map shit * huh * Merge remote-tracking branch 'tgstation/master' into tgu24 * this is weird af * idk what went on with this merge but ig its fixed * fixes windoors * this time for realsies passes * i promise now it does * fixes tgui + add boulder
30 lines
1001 B
Plaintext
30 lines
1001 B
Plaintext
/obj/item/barcodescanner
|
|
name = "barcode scanner"
|
|
icon = 'icons/obj/service/library.dmi'
|
|
icon_state ="scanner"
|
|
desc = "A fabulous tool if you need to scan a barcode."
|
|
throw_speed = 3
|
|
throw_range = 5
|
|
w_class = WEIGHT_CLASS_TINY
|
|
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
|
|
///Weakref to the library computer we are connected to.
|
|
var/datum/weakref/computer_ref
|
|
///The current scanning mode (BARCODE_SCANNER_CHECKIN|BARCODE_SCANNER_INVENTORY)
|
|
var/scan_mode = BARCODE_SCANNER_CHECKIN
|
|
|
|
/obj/item/barcodescanner/attack_self(mob/user)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
if(!computer_ref?.resolve())
|
|
user.balloon_alert(user, "not connected to computer!")
|
|
return
|
|
switch(scan_mode)
|
|
if(BARCODE_SCANNER_CHECKIN)
|
|
scan_mode = BARCODE_SCANNER_INVENTORY
|
|
user.balloon_alert(user, "inventory adding mode")
|
|
if(BARCODE_SCANNER_INVENTORY)
|
|
scan_mode = BARCODE_SCANNER_CHECKIN
|
|
user.balloon_alert(user, "check-in mode")
|
|
playsound(loc, 'sound/items/click.ogg', 20, TRUE)
|