mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 17:42:26 +00:00
Huge fukken commit. Very game-changing new feature has been added but it isn't actually available to players yet.
Spess Networking Technology:
▪ The machines are located in Centcom near the cargo shuttle.
▪ A new admin debug verb "Change Radio Type". Using this will toggle between old (current) radio code and the new radio code. ADMINS: I recommend only doing this if Doohl (me) is around to take note of anything that happens.
▪ The whole thing works, in theory, but hasn't been stress-tested with the usual 60+ players. I will write up a Tgstation Wiki article and/or explain what some of the stuff does in IRC or ingame.
One last thing to point out: this is a PROTOTYPE. I have tested it myself and optimized the code very well. In theory, this new radio system is significantly less laggy AND has many more features. However, because of it's a prototype, it can at any time destroy the server. The reason I am committing this and not updating the changelog is because it's not an actual feature YET. I want to stress test this on the servers to see how it fairs, then add some more stuff to it like the ability to link machines and repair networks.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2807 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -115,4 +115,58 @@
|
||||
var/dy = T.y - centerturf.y
|
||||
if(dx*dx + dy*dy <= rsq)
|
||||
turfs += T
|
||||
return turfs
|
||||
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
|
||||
Reference in New Issue
Block a user