mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-26 02:02:39 +00:00
Mobs in lockers now can hear radios. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1247 316c924e-a436-60f5-8080-3fe189b3f50e
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
|
src.add_fingerprint(user)
|
|
spawn (0)
|
|
attack_self(user)
|
|
|
|
/obj/item/device/radio/intercom/attack_paw(mob/user as mob)
|
|
if ((ticker && ticker.mode.name == "monkey"))
|
|
return src.attack_hand(user)
|
|
|
|
/obj/item/device/radio/intercom/attack_hand(mob/user as mob)
|
|
src.add_fingerprint(user)
|
|
spawn (0)
|
|
attack_self(user)
|
|
|
|
/obj/item/device/radio/intercom/send_hear()
|
|
if (!(src.wires & WIRE_RECEIVE))
|
|
return
|
|
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))
|
|
return
|
|
..() |