mobs on helpful intent no longer push pulled structures or players pulling structures, structure.dm follows mob.dm's issilicon for isstructure as per contributing no hacky code, pulledby now set to null when stop_pulling() is called, thus they actually stop pulling

This commit is contained in:
MINIMAN10000
2019-01-29 21:09:53 -08:00
parent fca2f0478d
commit 80322feeb5
3 changed files with 13 additions and 0 deletions
+11
View File
@@ -80,6 +80,10 @@
if(moving_diagonally) //no mob swap during diagonal moves.
return 1
if(a_intent == INTENT_HELP) // Help intent doesn't mob swap a mob pulling a structure
if(isstructure(M.pulling) || isstructure(pulling))
return 1
if(!M.buckled && !M.has_buckled_mobs())
var/mob_swap
//the puller can always swap with it's victim if on grab intent
@@ -128,6 +132,13 @@
//Called when we want to push an atom/movable
/mob/living/proc/PushAM(atom/movable/AM, force = move_force)
if(isstructure(AM) && AM.pulledby)
if(a_intent == INTENT_HELP && AM.pulledby != src) // Help intent doesn't push other peoples pulled structures
return FALSE
if(get_dist(get_step(AM, get_dir(src, AM)), AM.pulledby)>1)//Release pulled structures beyond 1 distance
AM.pulledby.stop_pulling()
if(now_pushing)
return TRUE
if(moving_diagonally) // no pushing during diagonal moves