The view essentially looks like this:
XXXXXX
XXXX
XX
I just need to know how to do this for diagonals.
ob/var/sightDist = 3
var/test[] = new/list()
mob
proc
getView()
var/list/turfs[] = new/list()
for(var/turf/T as turf in view(src.sightDist,src))
switch(src.dir)
if(NORTH)
if(abs(src.x-T.x) <= T.y - src.y)
turfs += T
test += T
if(SOUTH)
if(abs(src.x-T.x) <= src.y - T.y)
turfs += T
test += T
if(EAST)
if(abs(src.y-T.y) <= T.x - src.x)
turfs += T
test += T
if(WEST)
if(abs(src.y-T.y) <= src.x - T.x)
turfs += T
test += T
return turfs
Even onefishdown didnt know how to do this . Maybe a code guru like Lummox could help.