Port of the TG radio system. Tasty and I tested it out and it works smooth and clean :)

We were able to restore functionality after we blew up half the radio equipment, as well.
AI satellite is now the Comms satellite.
This commit is contained in:
SkyMarshal
2012-01-17 00:12:30 -07:00
parent 26e12e26d0
commit 0d7ce5f347
38 changed files with 4268 additions and 1979 deletions

View File

@@ -83,6 +83,60 @@
//turfs += centerturf
return turfs
/proc/get_mobs_in_view(var/R, var/atom/source)
// Returns a list of mobs in range of R from source. Used in radio and say code.
var/turf/T = get_turf(source)
var/list/hear = hearers(R, T)
var/list/V = view(R, T)
// Search for closets:
for(var/obj/structure/closet/C in V)
for(var/mob/M in C.contents)
if(M.client)
hear += M
// Cryos:
for(var/obj/machinery/atmospherics/unary/cryo_cell/C in V)
if(C.occupant)
if(C.occupant.client)
hear += C.occupant
// Intelicards
for(var/obj/item/device/aicard/C in V)
for(var/mob/living/silicon/ai/M in C)
if(M.client)
hear += M
// Brains/MMIs/pAIs
for(var/mob/living/carbon/brain/C in world)
if(get_turf(C) in V)
hear += C
for(var/mob/living/silicon/pai/C in world)
if(get_turf(C) in V)
hear += C
// Personal AIs
for(var/obj/item/device/paicard/C in V)
if(C.pai)
if(C.pai.client)
hear += C.pai
// Exosuits
for(var/obj/mecha/C in V)
if(C.occupant)
if(C.occupant.client)
hear += C.occupant
// Disposal Machines
for(var/obj/machinery/disposal/C in V)
for(var/mob/M in C.contents)
if(M.client)
hear += M
return hear
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
var/dx = Loc1.x - Loc2.x
var/dy = Loc1.y - Loc2.y