mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 17:43:35 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user