It does not collaborate itself correctly. Instead it stays the default icon.
atom
proc
Offset(D, xo, yo)//D = a directional number
var/J = yo // yo is changed in some cases
switch(D)
// 1 North is excluded because it is unmodified. xo = xo;yo = yo
if(2)//South
xo = -xo
yo = -yo // invert both variables -/+ factor
if(4)//East
yo = -xo
xo = J //yo equals -xo, xo = initial yo
if(8)//West
yo = xo
xo = -J//opposite of East
return locate(x + xo, y + yo, 1)//return turf that is found using the new vars.
IPL(T)
if(T && istype(T, /turf/wall)) return 1
if(T && istype(T, /turf/floor)) return 1
for(var/obj/electronics/powerlines/O in world)
if(istype(O, /obj/electronics/powerlines)) return 1
turf
var
powerlines
obj
electronics
powerlines
layer = MOB_LAYER +1
icon = 'powerlines.dmi'
New()
..()
var
I
K
for(K in nsew)
if(!IPL(Offset(K, 0, 1)))
I += K//for direction in cardinal directions. the offset returns immediatly surrounding with these args. If it is not a road + direction number to I. The master number
if(I in list(3,12))
icon_state = num2text(I)// If I is 1,2,4,8 then create an icon_state