add/fix(fax): Fixes inability to remove I.D

Adds a new verb to fax machines to retrieve the user's I.D card if the fax machine loses power suddenly, or TGUI acts up.
This commit is contained in:
Runa Dacino
2023-08-04 10:52:28 +02:00
parent 2ee55009d4
commit 86d5fa4299
+23
View File
@@ -38,6 +38,29 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
tgui_interact(user)
/obj/machinery/photocopier/faxmachine/verb/remove_card()
set name = "Remove ID card"
set category = "Object"
set src in oview(1)
var/mob/living/L = usr
if(!L || !isturf(L.loc) || !isliving(L))
return
if(!ishuman(L) && !issilicon(L))
return
if(L.stat || L.restrained())
return
if(!scan)
to_chat(L, span_notice("There is no I.D card to remove!"))
return
scan.forceMove(loc)
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(scan)
scan = null
authenticated = null
/obj/machinery/photocopier/faxmachine/verb/request_roles()
set name = "Staff Request Form"
set category = "Object"