/*
//////////////////////////
Phase Atom
//////////////////////////
*/
var/list/PhasedIcons=list(/**/)
proc/PhaseWorld()
set background=1
for(var/turf/T in world)
T.PhaseAtom(/**/)
mob/see_invisible=1
atom/var/Phase=0
atom/var/DontPhase=0
obj/Phase
layer=5
density=0
invisibility=1
mouse_opacity=0
atom/proc/PhaseAtom(/**/)
if(src.Phase || (src.layer>=5 && !src.density))
if(src.layer>=6 || src.contents.len || src.overlays.len || src.DontPhase) return
src.layer=2.2
var/srcLoc=locate(src.x,src.y,src.z)
for(var/obj/Phase/P in srcLoc) return
var/icon/I
if("[src.icon]" in PhasedIcons) I=PhasedIcons["[src.icon]"]
else {I=src.icon-rgb(0,0,0,150);PhasedIcons["[src.icon]"]=I}
var/obj/Phase/O=new(srcLoc)
O.icon=I;O.icon_state=src.icon_state
O.pixel_x=src.pixel_x;O.pixel_y=src.pixel_y
World
New()
spawn() PhaseWorld()
Problem description:
I am just wondering if this can make game lagging ?
You only appear to perform PhaseWorld() at world startup, so I'd recommend setting all turfs that will be phased to turf/Phased/ rather than just /turf/, and only loop over those.