Rechecked organs.dm so code compiles now.

Mobs in lockers now can hear radios.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1247 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rastaf.zero@gmail.com
2011-03-23 14:32:13 +00:00
parent d57b9f1d7d
commit 7ed34fe356
5 changed files with 42 additions and 14 deletions
+1 -1
View File
@@ -121,4 +121,4 @@ var/global/list/common_tools = list(
/proc/iscrowbar(O)
if(O && istype(O, /obj/item/weapon/crowbar))
return 1
return 0
return 0
+17 -2
View File
@@ -15,8 +15,23 @@
/obj/item/device/radio/intercom/send_hear()
if (!(src.wires & WIRE_RECEIVE))
return
if (src.listening)
return hearers(7, src.loc)
if (!src.listening)
return
var/turf/T = get_turf(src)
var/list/hear = hearers(7, T)
var/list/V
//find mobs in lockers, cryo and intellycards
for (var/mob/M in world)
if (isturf(M.loc))
continue //if M can hear us it is already was found by hearers()
if (!M.client)
continue //skip monkeys and leavers
if (!V) //lasy initialisation
V = view(7, T)
if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
hear+=M
return hear
/obj/item/device/radio/intercom/hear_talk(mob/M as mob, msg)
if(!src.anyai && !(M in src.ai))
+14 -9
View File
@@ -187,9 +187,7 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
//for (var/obj/item/device/radio/R in radio_connection.devices)
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"]) // Modified for security headset code -- TLE
//if(R.accept_rad(src, message))
for (var/i in R.send_hear(display_freq))
if (!(i in receive))
receive += i
receive |= R.send_hear(display_freq)
//world << "DEBUG: receive.len=[receive.len]"
var/list/heard_masked = list() // masked name or no real name
@@ -294,13 +292,20 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
break
if (!accept)
return
var/list/hear = hearers(1, src.loc)
// modified so that a mob holding the radio is always a hearer of it
// this fixes radio problems when inside something (e.g. mulebot)
if(ismob(loc))
if(! (loc in hear) )
hear += loc
var/turf/T = get_turf(src)
var/list/hear = hearers(1, T)
var/list/V
//find mobs in lockers, cryo and intellycards
for (var/mob/M in world)
if (isturf(M.loc))
continue //if M can hear us it is already was found by hearers()
if (!M.client)
continue //skip monkeys and leavers
if (!V) //lasy initialisation
V = view(1, T)
if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
hear+=M
return hear
/obj/item/device/radio/examine()