How would I construct an if() statement to check if an object is in someone's inventory without defining the person with the inventory?
Delete_Stuff()
for(var/obj/O in world)
if() continue // ?
del(O)
ID:172545
Apr 25 2004, 5:22 pm
|
|
Apr 25 2004, 5:32 pm
|
|
What you are asking is impossible. Try rewording it.
|
Enigmaster2002 wrote:
How would I construct an if() statement to check if an object is in someone's inventory without defining the person with the inventory? I just tried "!istype(O.loc,/mob)" and it worked, no garuntees though. ;) This may be a safer way to do it, though, if you just want to delete objs that are laying on the map. Delete_Stuff() Hope that helps. |
In response to Garthor
|
|
Okay, I have an admin, and I have a player. The Admin has a verb, Delete World. Both have inventories (things in their contents), and the admin uses his delete world verb. All objects in both inventories are deleted. How would I prevent the verb from deleting the inventory items without making a direct reference to a player?
|