[MIRROR] Fixes a runtime for ModPCs running Plexagon Access Management without a secondary card slot (#750)

* Fixes a runtime for ModPCs running Plexagon Access Management without a secondary card slot (#53597)

As said by the title.

Also fixes an oversight where the Plexagon HR Core app (job management) was reading worn ID rather than inserted ID.

Also adds names to differentiate between primary and secondary card readers so both show on the screwdriver remove menu.

Also makes using IDs on a modPC actually call the InsertID proc, so that having the secondary ID come first in the list of parts doesn't give it priority.
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>

* Fixes a runtime for ModPCs running Plexagon Access Management without a secondary card slot

Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-09-11 23:18:07 +02:00
committed by GitHub
parent 307ddb6ce9
commit 76b951a104
4 changed files with 27 additions and 27 deletions

View File

@@ -103,7 +103,6 @@
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
var/obj/item/computer_hardware/card_slot/card_slot2 = all_components[MC_CARD2]
if(!(card_slot || card_slot2))
//to_chat(user, "<span class='warning'>There isn't anywhere you can fit a card into on this computer.</span>")
return FALSE
var/obj/item/card/inserting_id = inserting_item.RemoveID()
@@ -112,7 +111,6 @@
if((card_slot?.try_insert(inserting_id)) || (card_slot2?.try_insert(inserting_id)))
return TRUE
//to_chat(user, "<span class='warning'>This computer doesn't have an open card slot.</span>")
return FALSE
/obj/item/modular_computer/MouseDrop(obj/over_object, src_location, over_location)
@@ -350,6 +348,10 @@
/obj/item/modular_computer/attackby(obj/item/W as obj, mob/user as mob)
// Check for ID first
if(istype(W, /obj/item/card/id) && InsertID(W))
return
// Insert items into the components
for(var/h in all_components)
var/obj/item/computer_hardware/H = all_components[h]