ID:158238
 
I've read around, but I can't find an answer. Is it possible to detect which area a click is in?
Couldn't you just do it like this?
turf
Click()
usr << "You clicked [src]!"
Or were you looking for something different?


EDIT: Nevermind, I understand the question now. Nevermind what I said :)


Then I tried this:
atom
var/owner
Click()
if(owner)
world<<"You clicked the area: [owner]"
area
New()
..()
for(var/atom/a in src)
a.owner = src
this
that
Of course there's probably a better way...
In response to Speedro (#1)
Indeed there is.
turf
Click()
usr << "You clicked [src.loc]"


The loc of a turf is the area it belongs to.
In response to Nadrew (#2)
Well yeah I knew that, but apart from that... lol. My bad! Thanks Nadrew; you are a genius!

~Ease~