obj/blah/one
Is arranged in a Row,Diagonal, or Column?
I have made this global list.
directions = list(NORTH,SOUTH,EAST,WEST,NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)
I looked up get_step. My original method was to check for get_step of that objects location while looping through the list for every object of the type. Then I checked the contents of the result I got from get_step. This may have worked but it seemed highly inefficient.
If you don't understand what I said just assume I asked for a checker that checks to see if 4 objects are arranged in any of the 8 directions. Also assume I looked up get_step in the reference but do not know how to efficiently solve the problem.
atom/proc/Check()
var/list/Vertical=newlist(NORTH,SOUTH)
var/list/Horizontal=newlist(EAST,WEST)
var/Diagonal=newlist(NORTHEAST,NORTHWEST,SOUTHEAST,SOUTHWEST)
for(var/obj/blah/one/O in oview())
if(Vertical.Find(O.dir))
src << "[O.name] is vertical"
else
if(Horizontal.Find(O.dir))
src<<"[O.name] is Horizontal"
else
if(Diagonal.Find(O.dir))
src<<"[O.name] is Diagonal"
Like something like that?