mob/var/radius = 15
mob/proc/radar( r = radius )
for( var/x in client.screen )
if( !istype( x, /obj/hudbg ) )
client.screen -= x
var/isOdd = ( radius*2+1 % 2 )
screen_loc = "radar:" + ( isOdd ? "[radius+1],[radius+1]": "[radius+1]:16,[radius+1]:16" )
client.screen += src
for( var/atom/movable/a in orange( r, src ) )
var/hx = "[r+1+(-( x-a.x ))][isOdd? "":":16"]"
var/hy = "[r+1+(-( y-a.y ))][isOdd? "":":16"]"
a.screen_loc = "radar:[hx],[hy]"
client.screen += a
mob/verb/changeRadius( n as num )
radius = min( max( 1, n ), 25 )
client.screen = list()
var/reach = radius*2+1
client.screen += new /obj/hudbg( "1,1 to [reach],[reach]" )
radar()
obj/hudbg
icon='GRND.dmi'
icon_state="grass"
layer = 1
New( screen_loc )
. = ..()
src.screen_loc = "radar:[screen_loc]"
client/New()
screen += new /obj/hudbg( "0,0 to 30,30" )
..()
mob/Move()
. = ..()
if( . )
radar()
Problem description:
i been trying to make it so it doesnt show just objects but turfs i made it show but it made so much lag i removed it and i been trying to add it but without success can anyone tell me if theres a way to do it