mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Runtime fixes for using sechuds to examine people with wallets and null PDAs.
If the selected mob is wearing a PDA, it will pick the PDA owner instead of the ID inside of the PDA. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5488 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -270,20 +270,28 @@
|
||||
var/criminal = "None"
|
||||
|
||||
if(wear_id)
|
||||
var/obj/item/weapon/card/id/I = wear_id.GetID()
|
||||
perpname = I.registered_name
|
||||
if (istype(wear_id, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = wear_id
|
||||
perpname = I.registered_name
|
||||
else if (istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/P = wear_id
|
||||
perpname = P.owner
|
||||
else if (istype(wear_id, /obj/item/weapon/storage/wallet))
|
||||
var/obj/item/weapon/storage/wallet/W = wear_id
|
||||
perpname = W.front_id
|
||||
else
|
||||
perpname = name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
criminal = R.fields["criminal"]
|
||||
if(perpname)
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
criminal = R.fields["criminal"]
|
||||
|
||||
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user