ID:145854
 
Code:
                    for(var/turf/Tu in range(4))
for(var/area/Dark/Ar in world)
if(Tu in Ar.contents)
Ar.contents -= Tu


Problem description:

I'm trying to have a certain item destroy all of the /Dark in a radius of 4. Originally, I had it 'remove instances within 4 squares', but I was kindly informed by someone that there's only one actual instance of /area/Dark in the world. So I've researched, and figured that I have to remove all the turfs in view from /Dark's contents. This did absolutely nothing. I can't figure out how to get this owrking right. Can anybody assist?
You can just easily check all of the turf's locs in the range, since a turf's loc variable is the area it is inside of.

mob/proc
blah()
for(var/turf/T in range(src, 4))
if(istype(T.loc, /area/Dark))
del(T)


~~> Unknown Person
In response to Unknown Person
Well, thanks, but that seems to delete the turfs instead of the /Dark....
In response to Vexonater
Sorry, I thought you meant to delete the turfs. In this case, you can put the a blank /area type on top of the /area/Dark.

mob/proc
blah()
for(var/turf/T in range(src, 4))
if(istype(T.loc, /area/Dark)) new /area (T)


~~> Unknown Person
In response to Unknown Person
Yeah, I figured that out. Thanks, though!