ID:269673
 
Whenever I do a verb that requires you to have a certain object in your inventory I use this format:

verb
FillJar(M as obj in view(-1))
set src in oview(1)
if(istype(M,/obj/EmptyJar))
var/obj/WaterJar/T = new
T.loc = usr
del(M)

This format works though the player always has to specify the empty jar. Is there an easier way so that the player doesnt have to specify it like using in contents.
In response to Cheetoz
I dont get it. How is it going to work with my code.
In response to ADT_CLONE
It works with using verbs while in your inventory, I thought it would be able to help you.
ADT_CLONE wrote:
This format works though the player always has to specify the empty jar. Is there an easier way so that the player doesnt have to specify it like using in contents.

Aye. Use this:
var/obj/EmptyJar/O = locate() in usr
if(!O) return


Lummox JR
In response to Cheetoz
Cheetoz wrote:
It works with using verbs while in your inventory, I thought it would be able to help you.

Again, you weren't even close to right on this one. You just picked something at random that seemed tangentially related (and it wasn't even that!) to what he was asking. If you have nothing that's actually helpful to say, don't just toss stuff out. Heck, you're not even trying to understand the questions before you answer them. If you're not even going to put in a little effort to 1) understand the problem and 2) offer a working and relevant solution, please don't clutter the forums with arbitrary suggestions. You're only making things worse by doing that.

Lummox JR