mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 01:21:30 +00:00
## About The Pull Request Resprites the barcode scanner & adds unique sounds for switching modes & scanning books ## Why It's Good For The Game This Pr was a labor of love. I love playing curator and thought the scanner could use some sounds and then thought it could benefit from a new sprite ## Changelog 🆑 sound: Adds unique sounds to library barcode scanner image: Removes soul from library /🆑 https://github.com/tgstation/tgstation/assets/97811257/3ee693a4-7a75-46c5-aa58-66a870e83357
29 lines
918 B
Plaintext
29 lines
918 B
Plaintext
/obj/item/barcodescanner
|
|
name = "barcode scanner"
|
|
icon = 'icons/obj/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
|
|
///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)
|