mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
- Reworked card reader code, it's cleaner and less copypaste now - Updated medical records, security records and HoP card computer to work with the update. It's however possible i missed something, can't go through all computers in game. Tell me if you find something that's broken due to this, i will fix it ASAP. - Security records color for "none" security status changed a bit so it doesn't burn eyes of anyone trying to read it (issue #5571 - white on light green? Bad choice imo) - Multi-card readers now actually WORK for laptops. This includes security records (issue #5569) and medical records (same case, just not reported). You still have to insert your card into read slot, if you insert it into wrong slot notification will be shown that you should use read slot instead of write one.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
req_one_access = list(access_security, access_forensics_lockers)
|
||||
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/obj/item/weapon/card/id/scan2 = null
|
||||
var/authenticated = null
|
||||
var/rank = null
|
||||
var/screen = null
|
||||
@@ -49,9 +50,13 @@
|
||||
return
|
||||
usr.set_machine(src)
|
||||
scan = computer.cardslot.reader
|
||||
|
||||
if (computer.cardslot.dualslot)
|
||||
scan2 = computer.cardslot.writer
|
||||
|
||||
if(!interactable())
|
||||
return
|
||||
return
|
||||
|
||||
if (computer.z > 6)
|
||||
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
@@ -60,7 +65,11 @@
|
||||
if (temp)
|
||||
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
|
||||
else
|
||||
dat = text("Confirm Identity: <A href='?src=\ref[];choice=Confirm Identity'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
|
||||
dat = text("Confirm Identity (R): <A href='?src=\ref[];choice=Confirm Identity R'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
|
||||
if (computer.cardslot.dualslot)
|
||||
dat += text("Check Identity (W): <A href='?src=\ref[];choice=Confirm Identity W'>[]</A><BR>", src, (scan2 ? text("[]", scan2.name) : "----------"))
|
||||
if(scan2 && !scan)
|
||||
dat += text("<div class='notice'>Insert card into reader slot to log in.</div><br>")
|
||||
if (authenticated)
|
||||
switch(screen)
|
||||
if(1.0)
|
||||
@@ -100,9 +109,9 @@
|
||||
if("Released")
|
||||
background = "'background-color:#3BB9FF;'"
|
||||
if("None")
|
||||
background = "'background-color:#00FF7F;'"
|
||||
if("")
|
||||
background = "'background-color:#00FF00;'"
|
||||
if("")
|
||||
background = "'background-color:#00FF7F;'"
|
||||
crimstat = "No Record."
|
||||
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
||||
dat += text("<td>[]</td>", R.fields["id"])
|
||||
@@ -236,19 +245,32 @@ What a mess.*/
|
||||
active1 = null
|
||||
active2 = null
|
||||
|
||||
if("Confirm Identity")
|
||||
if("Confirm Identity R")
|
||||
if (scan)
|
||||
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
||||
computer.cardslot.remove(scan)
|
||||
computer.cardslot.remove(1)
|
||||
else
|
||||
scan.loc = get_turf(src)
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
computer.cardslot.insert(I)
|
||||
computer.cardslot.insert(I, 1)
|
||||
scan = I
|
||||
|
||||
if("Confirm Identity W")
|
||||
if (scan2)
|
||||
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
||||
computer.cardslot.remove(2)
|
||||
else
|
||||
scan2.loc = get_turf(src)
|
||||
scan2 = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
computer.cardslot.insert(I, 2)
|
||||
scan2 = I
|
||||
|
||||
if("Log Out")
|
||||
authenticated = null
|
||||
screen = null
|
||||
|
||||
Reference in New Issue
Block a user