Blob mobs use astar/jps for automated movement pathing, no longer get blocked by blob tiles (#65598)

* Blob mobs use astar/jps for automated movement pathing, no longer get blocked by blob mobs

I could easily make all hostile mobs do this, but there are *concerns*. behavior isn't the same, performance would be bad, requires more careful testing.

Where as overriding this just for blobs fixes a mob that is functionally broken right now as they think they can't cross blob tiles because they use byond's walk_to and that checks density

* Minor improvements
This commit is contained in:
Kyle Spier-Swenson
2022-03-22 12:18:59 -07:00
committed by GitHub
parent d4ece8a007
commit e352d6026e
@@ -18,6 +18,7 @@
see_in_dark = 8
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
initial_language_holder = /datum/language_holder/empty
retreat_distance = null //! retreat doesn't obey pass_flags, so won't work on blob mobs.
var/mob/camera/blob/overmind = null
var/obj/structure/blob/special/factory = null
var/independent = FALSE
@@ -67,6 +68,18 @@
if(istype(mover, /obj/structure/blob))
return TRUE
///override to use astar/JPS instead of walk_to so we can take our blob pass_flags into account.
/mob/living/simple_animal/hostile/blob/Goto(target, delay, minimum_distance)
if(prevent_goto_movement)
return FALSE
if(target == src.target)
approaching_target = TRUE
else
approaching_target = FALSE
SSmove_manager.jps_move(moving = src, chasing = target, delay = delay, repath_delay = 2 SECONDS, minimum_distance = minimum_distance, simulated_only = FALSE, skip_first = TRUE, timeout = 5 SECONDS, flags = MOVEMENT_LOOP_IGNORE_GLIDE)
return TRUE
/mob/living/simple_animal/hostile/blob/Process_Spacemove(movement_dir = 0)
for(var/obj/structure/blob/B in range(1, src))
return 1