mob
proc
Problem_Code(atom/A)
var/x = A.x
var/y = A.y
var/step_x = 0
var/step_y = 0
if(A.parent_type == /mob)
step_x = A.step_x
step_y = A.step_y
Problem description:
I can get the x and y just fine. I can't get the step_x or step_y. By asking for mob/A, the code works just fine. But I want this function to also accept turfs. Is there a way to do this without giving it a mob specific argument slot?
That should do what I think you're asking.
Edit: whoops, forgot to do the typecasting.