Edit:
Ok for anybody whos interested I made a couple of short adjustments to Shadowdarke's Library in order to make directional projectiles face the right way. Now im not the most experienced coder so this might not be the best way to do it but it gets the job done and does it nicely. I use this verb to create the different icon states
mob/verb
Make_Icon(arg as icon)
var/icon/I=new(arg)
for(var/i=1,i<=12,i++)
var/icon/N=new(arg)
N.Turn(-i*30)
I.Insert(N,"[i*30]")
del(N)
usr.icon=I
usr<<ftp(I)
Then i modified part of the projectile code to change the icon state when the projectile was create like this
//this is under the object definition
direct(atom/A)
//returns the direction of the projectile in degrees rounded to the closest 30 degrees
var/sx = (A.x - x) * 32
var/sy = (A.y - y) * 32
var/sh=sqrt(sx*sx+sy*sy)
var/deg=round(arcsin(sy/sh))
if(sx<0&&sy>0)//probably not the best but its my work around for arctan its simple and works
deg+=90
if(sx<0&&sy<0)
deg+=270
if(sx<0&&sy==0)
deg+=180
if(sx>=0&&sy<0)
deg+=360
var/i=0
deg-=15//this little part rounds the degree to the nearest 30 either up or down depending on which is closer
for(deg,deg>=0,deg-=30)
i++
deg=i*30
return deg
//this is part of shadowdarke's projectile code that i added in the icon state changes to
if(isnum(destination)) // an angle
P.dx = cos(destination) * P.speed
P.dy = sin(destination) * P.speed
var/i=0
for(destination-15,destination>=0,destination-=30)
i++
P.icon_state="[i*30]"
else if(istype(destination, /atom))
P.icon_state="[P.direct(destination)]"
var
atom/A = destination
dx = (A.x - owner.x) * 32 + A.pixel_x - owner.pixel_x
dy = (A.y - owner.y) * 32 + A.pixel_y - owner.pixel_y
px_dist = sqrt(dx * dx + dy * dy)
if(px_dist) // unit vector times P.speed
P.dx = P.speed * dx / px_dist
P.dy = P.speed * dy / px_dist
else // owner and target in exact same position
P.Hit(A)
return P
1.) Dynamically create a rotated icon using icon.Turn().
2.) Make an icon state for all 361 angles. (integer angles)