obj/WSource
well
density = 1
icon = 'well.dmi'
desc = "Well, well, well, if it isn't a well..."
verb
drink()
set category = null
set src in oview(1)
var/tmp/mob/pc/M = usr
if(M.water >= 100)
M << "Drinking any more would be wasteful"
else
M << "You drink from the well"
M.water = 100
oview() << "[M] drinks from the well"
fill(var/obj/Containers/M)
set category = null
M.fill()
obj
Containers
icon = 'items.dmi'
proc
fill()
world << "woo"
verb
get()
set src in oview(1)
Move(usr)
flask
icon_state = "water"
Ok so the basic idea of the code above is that I want to be able to create containers like flasks and pots and stuff, which the user can carry to a water source and fill it up.
I was just wondering how I can call the fill() proc on the container from the water source, but my way just doesn't work. I'd prefere to do it from a fill verb in the container but I don't know how to check if there's a water source within usr view(1).