obj/FoxHole
name = "Uncomplete Fox Hole"
icon = 'Holes.dmi'
icon_state = "blank"
var/obj/FoxHole/Complete/link
New()
..()
link = src
Complete
density = 1
proc/Link()
world << "link called"
if(usr.images["Link-Marker"] == null)
world << "no pending link"
usr.images["Link-Marker"] = image('Markers.dmi',src,"Link-Marker",6)
src << usr.images["Link-Marker"]
world << "link marker added"
usr.link_ref = src
src << "link_ref = [src]."
else
world << "pending link found"
del usr.images["Link-Marker"]
usr.images["Link-Marker"] = null
world << "link marker set to null"
src.link = usr.link_ref
usr.link_ref = null
src << "usr.link_ref is now null, and src.link = [src.link]."
Now, here is the problem: sometimes, the link marker pops up right on top of the hole. This is wanted. However, sometimes it appears to the side of the hole. How is this possible? Also, when the debugging message "link_ref = [src]" comes out in DS as "link_ref = Lord of Water". It seems to me that the src variable is getting messed up somewhere! Am I not correct in my understanding that src should be the hole, and not me?
-Lord of Water
world << "usr: [usr]. src: [src]."
And, upon running the program, it output the following:
usr: Lord of Water. src: Lord of Water.
Aah!