This verb is used to take the ship into space. The verb itself only appears to the usr if he/she is in view(0) of the ship. The verb works when I stand under the ship (by turning my density off). But when i get into the ship (using usr.Move(src)) it doesnt work. It appears in the ship tab, but when i click it nothing happens.
verb
Orbital_Control()
set src in view(0)
set category = "Ship"
if(orbit==0)
if(src.z==9)
src.orbit=1
return
if(src.z==10)
src.orbit=1
return
if(src.z==8)
for(var/Ship/Deadalus/T in world)
src.loc=locate(T.loc)
return
loc=locate("[src.z]")
src.orbit=1
src.density=1
src.icon_state="302s"
src.takewing()
return
Problem description:
After working a lot trying to get verbs for my ships working they have just randomly stopped working lately! I had a theory it was due to byond updates, as the only thing that has changed is my byond version, however, i'm not so sure. Anyway, Take a gander...
1. If ship is most presumably an obj, obj.Enter() would not give you the results you want and Move( obj ) would move you into obj.contents instead of obj.loc.contents. In this case try usr.Move( src.loc ) or just plain old usr.loc = src.loc
2. If ship is a turf, and the turf under it is dense or the ship itself is dense or either of the turfs include dense atoms, then you can't enter ship since ship.Enter() would return 0. In this case, use usr.loc = src.loc as it does not call any checks for density and is a straightforward way.
3. You may have edited the Move() proc and not called ..() at the end or have done something to stop the proc altogether. Check for this.
Also, as a side note, src is never really needed to refer to procs and variables of the source atom since if you provide no source it defaults to the source object itself.