ID:168144
 
Well, I'm working on a game where alot of people die, and they leave behind massive clutter. Now in normal cases this is okay, because other people will go behind them and collect what they've left behind, but how exactly would I go about making a verb to clean everything up? Past attempts have resulted in entire inventories being wiped, and I started getting slightly frustrated, so I just gave it a rest, and figured I'd ask for help.
Just check if their location is a turf. That way, you know the object isn't in another's contents.

proc/clean_up()
for(var/obj/item/I)
if(istype(I.loc, /turf)) del(I)


~~> Unknown Person
In response to Unknown Person
Doh, I don't know why I didn't think of something so simple. Thanks UP, I'll do that.