I'm not sure if something like this will cause a transfer or if it is smart enough to use the client side cache...
turf/wall
New()
..()
var/turf/t = get_step(src, EAST)
if(t && !t.density)
t.overlays += icon('shadows.dmi', "slanted")
assuming shadows.dmi is included somewhere in the RSC
I also think this will take a very long time if you have a big map. I'd recommend either mapping all the shadows by hand or saving the map after doing your shadow generation so that you don't have to do it repeatedly
EDIT: overlays can be added using only an icon state. So if you had the shadow graphic in t's icon states, just do overlays += "shadow"