mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 06:22:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user