diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 9247a89b350..f74625d16bd 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -151,11 +151,9 @@ datum/objective/anti_revolution/demote
return target
check_completion()
- if(target && target.current && istype(target,/mob/living/carbon/human))
- var/obj/item/card/id/I = target.current:wear_id
- if(istype(I, /obj/item/device/pda))
- var/obj/item/device/pda/P = I
- I = P.id
+ if(target && target.current && ishuman(target))
+ var/mob/living/carbon/human/H = target
+ var/obj/item/card/id/I = H.GetIdCard()
if(!istype(I)) return 1
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index 1df2ac4fc51..3980a4fe87d 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -768,7 +768,7 @@
update_icon()
return
- if (istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
+ if (W.GetID())// trying to unlock the interface with an ID card
if(stat & (NOPOWER|BROKEN))
to_chat(user, "Nothing happens.")
return
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index aaf591c302e..41d0d99f5d4 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -219,8 +219,8 @@
return
if(default_part_replacement(user, W))
return
- if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
- if(!check_access(W))
+ if(W.GetID())
+ if(!check_access(W.GetID()))
to_chat(user, "Access Denied.")
return
if((!locked) || (isnull(occupant)))
diff --git a/code/game/machinery/computer/camera_circuit.dm b/code/game/machinery/computer/camera_circuit.dm
index 1ff8676deff..e6e4d1d4911 100644
--- a/code/game/machinery/computer/camera_circuit.dm
+++ b/code/game/machinery/computer/camera_circuit.dm
@@ -86,10 +86,7 @@
authorised = 0
else if( href_list["auth"] )
var/mob/M = usr
- var/obj/item/card/id/I = M.equipped()
- if (istype(I, /obj/item/device/pda))
- var/obj/item/device/pda/pda = I
- I = pda.id
+ var/obj/item/card/id/I = M.GetIdCard()
if (I && istype(I))
if(access_captain in I.access)
authorised = 1
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index 213f69e959a..d28cbf58734 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -266,8 +266,8 @@
src.menu = 4
else if (src.menu == 4)
- var/obj/item/card/id/C = usr.get_active_hand()
- if (istype(C)||istype(C, /obj/item/device/pda))
+ var/obj/item/card/id/C = usr.GetIdCard()
+ if (istype(C))
if(src.check_access(C))
src.records.Remove(src.active_record)
qdel(src.active_record)
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index 65df25ceb74..12684596c1b 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -12,14 +12,8 @@
attackby(var/obj/item/card/W as obj, var/mob/user as mob)
if(stat & (BROKEN|NOPOWER)) return
if ((!( istype(W, /obj/item/card) ) || !(ROUND_IS_STARTED) || emergency_shuttle.location() || !( user ))) return
- if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
+ if (W.GetID())
var/obj/item/card/id/id = W
- if (istype(W, /obj/item/device/pda))
- var/obj/item/device/pda/pda = W
- id = pda.id
-
- if (!id)
- return
if (!id.access) //no access
to_chat(user, "The access level of [id.registered_name]\'s card is not high enough. ")
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index 50a35cdca6c..2ef8484c73c 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -259,7 +259,7 @@
/obj/machinery/access_button/attackby(obj/item/I as obj, mob/user as mob)
//Swiping ID on the access button
- if (istype(I, /obj/item/card/id) || istype(I, /obj/item/device/pda))
+ if (I.GetID())
attack_hand(user)
return
..()
diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm
index f7bc7135cff..228ef388fe8 100644
--- a/code/game/machinery/doors/airlock_electronics.dm
+++ b/code/game/machinery/doors/airlock_electronics.dm
@@ -61,11 +61,8 @@
locked = FALSE
last_configurator = usr.name
else
- var/obj/item/I = usr.get_active_hand()
- if(istype(I, /obj/item/device/pda))
- var/obj/item/device/pda/pda = I
- I = pda.id
- if(I && src.check_access(I))
+ var/obj/item/card/id/I = usr.GetIdCard()
+ if(istype(I) && src.check_access(I))
locked = FALSE
last_configurator = I:registered_name
@@ -112,26 +109,14 @@
src.one_access = A.one_access
src.last_configurator = A.last_configurator
to_chat(user, SPAN_NOTICE("Configuration settings copied successfully."))
- else if(istype(W, /obj/item/card/id))
- var/obj/item/card/id/I = W
+ else if(W.GetID())
+ var/obj/item/card/id/I = W.GetID()
if(check_access(I))
locked = !locked
last_configurator = I.registered_name
to_chat(user, SPAN_NOTICE("You swipe your ID over \the [src], [locked ? "locking" : "unlocking"] it."))
else
to_chat(user, SPAN_WARNING("Access denied."))
- else if(istype(W, /obj/item/device/pda))
- var/obj/item/device/pda/P = W
- var/obj/item/card/id/I = P.id
- if(!I)
- to_chat(user, SPAN_WARNING("Your PDA doesn't have an ID in it!"))
- return
- if(check_access(I))
- locked = !locked
- last_configurator = I.registered_name
- to_chat(user, SPAN_NOTICE("You swipe your PDA over \the [src], [locked ? "locking" : "unlocking"] it."))
- else
- to_chat(user, SPAN_WARNING("Access denied."))
else
..()
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 59279f0f7bc..3cec5671912 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -113,7 +113,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
update_icon()
- else if (istype(I, /obj/item/card/id)||istype(I, /obj/item/device/pda))
+ else if (I.GetID())
if(open)
if (src.allowed(user))
src.locked = !src.locked
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index cc65aaf8849..28d05e8ae91 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -351,7 +351,7 @@
update_icon()
wrenching = 0
- else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/device/pda))
+ else if(I.GetID())
//Behavior lock/unlock mangement
if(allowed(user))
locked = !locked
diff --git a/code/game/machinery/suit_cycler.dm b/code/game/machinery/suit_cycler.dm
index 7de8c91835f..b2bd20e46dd 100644
--- a/code/game/machinery/suit_cycler.dm
+++ b/code/game/machinery/suit_cycler.dm
@@ -192,7 +192,7 @@
if(src.shock(user, 100))
return
- if(istype(I, /obj/item/card/id) || istype(I, /obj/item/device/pda) || istype(I, /obj/item/modular_computer))
+ if(I.GetID())
if(allowed(user))
locked = !locked
to_chat(user, SPAN_NOTICE("You [locked ? "" : "un"]lock \the [src]."))
diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm
index 76856daba1a..981f152244e 100644
--- a/code/game/machinery/turret_control.dm
+++ b/code/game/machinery/turret_control.dm
@@ -95,7 +95,7 @@
if(stat & BROKEN)
return
- if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
+ if(W.GetID())
if(src.allowed(usr))
if(emagged)
to_chat(user, "The turret control is unresponsive.")
diff --git a/code/modules/admin/verbs/bluespacetech.dm b/code/modules/admin/verbs/bluespacetech.dm
index 1d51c36282c..1e83d4c94a1 100644
--- a/code/modules/admin/verbs/bluespacetech.dm
+++ b/code/modules/admin/verbs/bluespacetech.dm
@@ -184,11 +184,8 @@
voice_name = "Bluespace Cat"
real_name = "Bluespace Cat"
mind.name = "Bluespace Cat"
- if(wear_id)
- var/obj/item/card/id/id = wear_id
- if(istype(wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = wear_id
- id = pda.id
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
id.registered_name = "Bluespace Cat"
gender = "female"
regenerate_icons()
@@ -204,11 +201,8 @@
voice_name = "Bluespace Bot"
real_name = "Bluespace Bot"
mind.name = "Bluespace Bot"
- if(wear_id)
- var/obj/item/card/id/id = wear_id
- if(istype(wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = wear_id
- id = pda.id
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
id.registered_name = "Bluespace Bot"
regenerate_icons()
else
@@ -222,11 +216,8 @@
voice_name = "Bluespace Tree"
real_name = "Bluespace Tree"
mind.name = "Bluespace Tree"
- if(wear_id)
- var/obj/item/card/id/id = wear_id
- if(istype(wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = wear_id
- id = pda.id
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
id.registered_name = "Bluespace Tree"
regenerate_icons()
else
@@ -241,11 +232,8 @@
voice_name = "Bluespace Lizard"
real_name = "Bluespace Lizard"
mind.name = "Bluespace Lizard"
- if(wear_id)
- var/obj/item/card/id/id = wear_id
- if(istype(wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = wear_id
- id = pda.id
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
id.registered_name = "Bluespace Lizard"
regenerate_icons()
else
@@ -260,11 +248,8 @@
voice_name = "Bluespace Squid"
real_name = "Bluespace Squid"
mind.name = "Bluespace Squid"
- if(wear_id)
- var/obj/item/card/id/id = wear_id
- if(istype(wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = wear_id
- id = pda.id
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
id.registered_name = "Bluespace Squid"
gender = "female"
regenerate_icons()
@@ -280,11 +265,8 @@
voice_name = "Bluespace Bug"
real_name = "Bluespace Bug"
mind.name = "Bluespace Bug"
- if(wear_id)
- var/obj/item/card/id/id = wear_id
- if(istype(wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = wear_id
- id = pda.id
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
id.registered_name = "Bluespace Bug"
regenerate_icons()
else
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 72645d52755..7f28db208a3 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -131,11 +131,8 @@
return
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
- if (H.wear_id)
- var/obj/item/card/id/id = H.wear_id
- if(istype(H.wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = H.wear_id
- id = pda.id
+ if (H.GetIdCard())
+ var/obj/item/card/id/id = H.GetIdCard()
id.icon_state = "gold"
id.access = get_all_accesses()
else
diff --git a/code/modules/clothing/under/accessories/badges.dm b/code/modules/clothing/under/accessories/badges.dm
index 630fb875673..68f6d7f63ae 100644
--- a/code/modules/clothing/under/accessories/badges.dm
+++ b/code/modules/clothing/under/accessories/badges.dm
@@ -137,15 +137,12 @@
return 1
/obj/item/clothing/accessory/badge/holo/attackby(var/obj/item/O as obj, var/mob/user as mob)
- if(istype(O, /obj/item/card/id) || istype(O, /obj/item/device/pda))
+ if(O.GetID())
- var/obj/item/card/id/id_card = null
+ var/obj/item/card/id/id_card = O.GetID()
- if(istype(O, /obj/item/card/id))
- id_card = O
- else
- var/obj/item/device/pda/pda = O
- id_card = pda.id
+ if(!istype(id_card))
+ return
if(access_security in id_card.access || emagged)
to_chat(user, "You imprint your ID details onto the badge.")
diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm
index d6e4030b1d4..66be73f0633 100644
--- a/code/modules/economy/ATM.dm
+++ b/code/modules/economy/ATM.dm
@@ -470,14 +470,9 @@ log transactions
//stolen wholesale and then edited a bit from newscasters, which are awesome and by Agouri
/obj/machinery/atm/proc/scan_user(mob/living/carbon/human/human_user as mob)
if(!authenticated_account)
- if(human_user.wear_id)
- var/obj/item/card/id/I
- if(istype(human_user.wear_id, /obj/item/card/id) )
- I = human_user.wear_id
- else if(istype(human_user.wear_id, /obj/item/device/pda) )
- var/obj/item/device/pda/P = human_user.wear_id
- I = P.id
- if(I)
+ if(istype(human_user))
+ var/obj/item/card/id/I = human_user.GetIdCard()
+ if(istype(I))
authenticated_account = SSeconomy.attempt_account_access(I.associated_account_number)
if(authenticated_account)
to_chat(human_user, "[icon2html(src, usr)] Access granted. Welcome user '[authenticated_account.owner_name].'")
diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm
index 375796bdf76..fc98a805b77 100644
--- a/code/modules/mining/minebot.dm
+++ b/code/modules/mining/minebot.dm
@@ -85,7 +85,7 @@
to_chat(user, SPAN_WARNING("\The [src] is not compatible with \the [W]."))
return
- else if (istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))
+ else if (W.GetID())
if(!allowed(user))
to_chat(user, SPAN_WARNING("Access denied."))
return
diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm
index 09fb6de9e72..939cfd66977 100644
--- a/code/modules/mob/living/bot/secbot.dm
+++ b/code/modules/mob/living/bot/secbot.dm
@@ -598,7 +598,7 @@
/mob/living/bot/secbot/attackby(var/obj/item/O, var/mob/user)
..()
- if(istype(O, /obj/item/card/id) || O.ispen() || istype(O, /obj/item/device/pda))
+ if(O.GetID() || O.ispen())
return
target = user
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index d38b5e0cd74..25878efc4d8 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -71,7 +71,7 @@
return
- if((istype(O,/obj/item/card/id)||istype(O,/obj/item/device/pda)) && brainmob)
+ if(O.GetID() && brainmob)
if(allowed(user))
locked = !locked
to_chat(user, "You [locked ? "lock" : "unlock"] the brain holder.")
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 60ac3f24989..8ccf6d3d93c 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -477,13 +477,9 @@
//Useful when player is being seen by other mobs
/mob/living/carbon/human/proc/get_id_name(var/if_no_id = "Unknown")
. = if_no_id
- if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/P = wear_id
- return P.owner
- if(wear_id)
- var/obj/item/card/id/I = wear_id.GetID()
- if(I)
- return I.registered_name
+ var/obj/item/card/id/I = GetIdCard()
+ if(I)
+ return I.registered_name
return
//gets ID card object from special clothes slot or null.
@@ -639,12 +635,9 @@
var/perpname = "wot"
var/read = 0
- if(wear_id)
- if(istype(wear_id,/obj/item/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
+ perpname = id.registered_name
else
perpname = src.name
var/datum/record/general/R = SSrecords.find_record("name", perpname)
@@ -664,12 +657,9 @@
var/perpname = "wot"
var/read = 0
- if(wear_id)
- if(istype(wear_id,/obj/item/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
+ perpname = id.registered_name
else
perpname = src.name
var/datum/record/general/R = SSrecords.find_record("name", perpname)
@@ -689,12 +679,9 @@
if (href_list["secrecordadd"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
- if(wear_id)
- if(istype(wear_id,/obj/item/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
+ perpname = id.registered_name
else
perpname = src.name
var/datum/record/general/R = SSrecords.find_record("name", perpname)
@@ -714,12 +701,9 @@
var/perpname = "wot"
var/modified = 0
- if(wear_id)
- if(istype(wear_id,/obj/item/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
+ perpname = id.registered_name
else
perpname = src.name
@@ -749,12 +733,9 @@
var/perpname = "wot"
var/read = 0
- if(wear_id)
- if(istype(wear_id,/obj/item/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
+ perpname = id.registered_name
else
perpname = src.name
var/datum/record/general/R = SSrecords.find_record("name", perpname)
@@ -775,12 +756,9 @@
var/perpname = "wot"
var/read = 0
- if(wear_id)
- if(istype(wear_id,/obj/item/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
+ perpname = id.registered_name
else
perpname = src.name
var/datum/record/general/R = SSrecords.find_record("name", perpname)
@@ -800,12 +778,9 @@
if (href_list["medrecordadd"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
- if(wear_id)
- if(istype(wear_id,/obj/item/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
+ if(GetIdCard())
+ var/obj/item/card/id/id = GetIdCard()
+ perpname = id.registered_name
else
perpname = src.name
var/datum/record/general/R = SSrecords.find_record("name", perpname)
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index d31bfb3a647..b2fbe9a6f34 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -223,7 +223,7 @@
else if(W.iscrowbar())
to_chat(user, SPAN_WARNING("\The [src] is hermetically sealed. You can't open the case."))
return
- else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
+ else if(W.GetID())
if(stat == DEAD)
if(!config.allow_drone_spawn || emagged || health < -maxHealth) //It's dead, Dave.
to_chat(user, SPAN_WARNING("The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one."))
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index aca3266da57..85a87ed21b4 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -751,7 +751,7 @@
else
to_chat(user, SPAN_WARNING("\The [src] does not have a radio installed!"))
return
- else if(istype(W, /obj/item/card/id) ||istype(W, /obj/item/device/pda) || istype(W, /obj/item/card/robot)) // trying to unlock the interface with an ID card
+ else if(W.GetID()) // trying to unlock the interface with an ID card
if(emagged) //still allow them to open the cover
to_chat(user, SPAN_NOTICE("You notice that \the [src]'s interface appears to be damaged."))
if(opened)
diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
index b61b466de79..46316afe8f6 100644
--- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
+++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
@@ -112,18 +112,15 @@
else
to_chat(user, "You need more welding fuel for this task!")
return
- else if(istype(O, /obj/item/card/id)||istype(O, /obj/item/device/pda))
+ else if(O.GetID())
if (!mmi)
to_chat(user, "There's no reason to swipe your ID - \the [src] has no brain to remove.")
return 0
- var/obj/item/card/id/id_card
+ var/obj/item/card/id/id_card = O.GetID()
- if(istype(O, /obj/item/card/id))
- id_card = O
- else
- var/obj/item/device/pda/pda = O
- id_card = pda.id
+ if(!istype(id_card))
+ return 0
if(access_robotics in id_card.access)
to_chat(user, "You swipe your access card and pop the brain out of \the [src].")
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 85340a9c744..bd22bd34b55 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -572,7 +572,7 @@
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
update_icon()
- else if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
+ else if (W.GetID()) // trying to unlock the interface with an ID card
if(emagged)
to_chat(user, "The interface is broken.")
else if(opened != COVER_CLOSED)
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index 4baf609e02e..d78f057ab9d 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -84,7 +84,7 @@ var/global/list/rad_collectors = list()
else
disconnect_from_network()
return 1
- else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
+ else if(W.GetID())
if (src.allowed(user))
if(active)
src.locked = !src.locked
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index 648722a65b3..9163707e79a 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -234,7 +234,7 @@
to_chat(user, SPAN_WARNING("You need more welding fuel to complete this task."))
return
- if(istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))
+ if(W.GetID())
if(emagged)
to_chat(user, SPAN_WARNING("The lock seems to be broken."))
return
diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm
index c06a4c9b675..c7761dc2ad0 100644
--- a/code/modules/shieldgen/emergency_shield.dm
+++ b/code/modules/shieldgen/emergency_shield.dm
@@ -309,7 +309,7 @@
anchored = TRUE
- else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))
+ else if(W.GetID())
if(src.allowed(user))
src.locked = !src.locked
to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]")
diff --git a/code/modules/shieldgen/shieldwallgen.dm b/code/modules/shieldgen/shieldwallgen.dm
index 37255968283..24a2cd849c9 100644
--- a/code/modules/shieldgen/shieldwallgen.dm
+++ b/code/modules/shieldgen/shieldwallgen.dm
@@ -158,7 +158,7 @@
user.visible_message(others_msg, SPAN_NOTICE(self_msg), SPAN_NOTICE("You hear a ratcheting noise."))
return
- if(istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))
+ if(W.GetID())
add_fingerprint(user)
if(allowed(user))
locked = !locked
@@ -167,7 +167,6 @@
else
to_chat(user, SPAN_WARNING("Access denied."))
return
-
return ..()
/obj/machinery/shieldwallgen/proc/alldir_cleanup()
diff --git a/html/changelogs/johnwildkins-cardholders.yml b/html/changelogs/johnwildkins-cardholders.yml
new file mode 100644
index 00000000000..011a0feb03b
--- /dev/null
+++ b/html/changelogs/johnwildkins-cardholders.yml
@@ -0,0 +1,6 @@
+author: JohnWildkins
+
+delete-after: True
+
+changes:
+ - bugfix: "Removed many hard references to PDAs / ID cards. There should be fewer situations where an ID-holding item isn't recognized as a valid ID."