From 20cbb1b800c6679feb768bdbf4a8cb9456de75a3 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Sun, 12 Dec 2010 21:33:43 +0000 Subject: [PATCH] Fixed radios not working if you have a PDA in your wear_id slot. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@597 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/devices/PDA.dm | 4 +++- code/game/objects/radio/radio.dm | 9 +++++---- code/modules/mob/living/say.dm | 8 +++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/code/game/objects/devices/PDA.dm b/code/game/objects/devices/PDA.dm index 6cbd6a3204c..dec10edee1a 100644 --- a/code/game/objects/devices/PDA.dm +++ b/code/game/objects/devices/PDA.dm @@ -1063,7 +1063,9 @@ Code: if(emptyHand) src.id.DblClick() - src.id = null + if(!istype(src.id.loc, /obj/item/device/pda)) + + src.id = null // src.id.loc = src.loc // else if (istype(src.loc, /turf)) src.id.loc = src.loc else diff --git a/code/game/objects/radio/radio.dm b/code/game/objects/radio/radio.dm index 9240325126f..1915b329490 100644 --- a/code/game/objects/radio/radio.dm +++ b/code/game/objects/radio/radio.dm @@ -147,12 +147,13 @@ Frequency: if (istype(M, /mob/living/carbon)) if (M:wear_id) - var/obj/item/weapon/card/id/id + var/id if (istype(M:wear_id, /obj/item/device/pda)) var/obj/item/device/pda/pda = M:wear_id - id = pda.id - else id = M:wear_id - if (id.assignment) eqjobname = M:wear_id:assignment + if (pda.id) id = pda.id.assignment + else id = pda.ownjob + else id = M:wear_id.assignment + if (id) eqjobname = id else eqjobname = "No job" else eqjobname = "No id" diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 05d9ba3d7ea..d48365a4e31 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -28,11 +28,13 @@ var/alt_name = "" if (istype(src, /mob/living/carbon/human) && src.name != src.real_name) if (src:wear_id) - var/obj/item/weapon/card/id/id = src:wear_id + var/id if(istype(src:wear_id, /obj/item/device/pda)) var/obj/item/device/pda/pda = src:wear_id - id = pda.id - alt_name = " (as [id:registered])" + id = pda.owner + else + id = src:wear_id.registered + alt_name = " (as [id])" else alt_name = " (as Unknown)"