ID:261250
 
How do I do this? I thought if a mob was dense, it couldn't be placed on another dense turf/mob/obj. I was wrong....so very wrong. Is there an easy way to accomplish this?
The Wizard of How wrote:
How do I do this? I thought if a mob was dense, it couldn't be placed on another dense turf/mob/obj. I was wrong....so very wrong. Is there an easy way to accomplish this?

Density only is checked with Move(), Enter(), and the step() procs. If you set loc manually, dense objects can occupy the same spot.
In response to Skysaw
However, if you are careful, you can expand the things you do... I beleive this would work:

mob/verb/teleport_north()
for(var/atom/A in locate(src.x,src.y + 3,src.z))
if(A.density)
return
src.loc = locate(src.x,src.y + 3,src.z)


This would check for a dense atom of any sort when you teleport. If there is a dense atom, it stops the proc right there. If there is not, it goes ahead and teleports you three spaces north. Good luck!