[TM] Port TG Jump Point Search and SSpathfinder (#18984)

* move along move along

* Update bot.dm

* Diagonals are now more expensive

* Update path.dm

* Update parrot.dm

* Update path.dm

* Tweaks

* Fix cleanbot, add path safety

* Tweaked, added a safety, removed the previous one

* Update medbot.dm

* path.len isn't very safe as a whole, floorbots also had order of operations wrong

* Update medbot.dm

* clings not even once

* Back to the drawing board

* Update path.dm

* Make mules actually clear the drawn path.

* Make bots use step_towards unconditionally instead of flipping between step_to and Move

* Making extra sure the path is cleared. Somehow path was left over.

* Check for length as get_path_to is always true

* This and that
This commit is contained in:
Vi3trice
2022-10-30 15:54:51 +00:00
committed by GitHub
parent d253e13c35
commit 05d93f665a
28 changed files with 630 additions and 286 deletions
-3
View File
@@ -328,9 +328,6 @@ a {
/obj/proc/container_resist(mob/living)
return
/obj/proc/CanAStarPass(ID, dir, caller)
. = !density
/obj/proc/on_mob_move(dir, mob/user)
return
+1 -1
View File
@@ -384,7 +384,7 @@
else
return 0
/obj/structure/girder/CanAStarPass(ID, dir, caller)
/obj/structure/girder/CanPathfindPass(obj/item/card/id/ID, dir, caller, no_id = FALSE)
. = !density
if(ismovable(caller))
var/atom/movable/mover = caller
+1 -1
View File
@@ -118,7 +118,7 @@
else
return !density
/obj/structure/grille/CanAStarPass(ID, dir, caller)
/obj/structure/grille/CanPathfindPass(obj/item/card/id/ID, dir, caller, no_id = FALSE)
. = !density
if(ismovable(caller))
var/atom/movable/mover = caller
+1 -1
View File
@@ -264,7 +264,7 @@
return FALSE
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
/obj/structure/tray/m_tray/CanPathfindPass(obj/item/card/id/ID, dir, caller, no_id = FALSE)
. = !density
if(ismovable(caller))
var/atom/movable/mover = caller
+2 -2
View File
@@ -76,7 +76,7 @@
return ..()
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
/obj/structure/plasticflaps/CanPathfindPass(obj/item/card/id/ID, to_dir, caller, no_id = FALSE)
if(isliving(caller))
if(isbot(caller))
return TRUE
@@ -86,7 +86,7 @@
return FALSE
var/atom/movable/M = caller
if(M && M.pulling)
return CanAStarPass(ID, to_dir, M.pulling)
return CanPathfindPass(ID, to_dir, M.pulling)
return TRUE //diseases, stings, etc can pass
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
+2 -2
View File
@@ -61,7 +61,7 @@
/obj/structure/railing/corner/CanPass()
return TRUE
/obj/structure/railing/corner/CanAStarPass(ID, to_dir, caller)
/obj/structure/railing/corner/CanPathfindPass(obj/item/card/id/ID, to_dir, caller, no_id = FALSE)
return TRUE
/obj/structure/railing/corner/CheckExit()
@@ -86,7 +86,7 @@
return density
return FALSE
/obj/structure/railing/CanAStarPass(ID, to_dir, caller)
/obj/structure/railing/CanPathfindPass(obj/item/card/id/ID, to_dir, caller, no_id = FALSE)
if(to_dir == dir)
return FALSE
if(ordinal_direction_check(to_dir))
+2 -2
View File
@@ -138,7 +138,7 @@
return TRUE
return FALSE
/obj/structure/table/CanAStarPass(ID, dir, caller)
/obj/structure/table/CanPathfindPass(obj/item/card/id/ID, dir, caller, no_id = FALSE)
. = !density
if(ismovable(caller))
var/atom/movable/mover = caller
@@ -834,7 +834,7 @@
else
return 0
/obj/structure/rack/CanAStarPass(ID, dir, caller)
/obj/structure/rack/CanPathfindPass(obj/item/card/id/ID, dir, caller, no_id = FALSE)
. = !density
if(ismovable(caller))
var/atom/movable/mover = caller
+2 -2
View File
@@ -125,10 +125,10 @@
return 0
return 1
/obj/structure/window/CanAStarPass(ID, to_dir)
/obj/structure/window/CanPathfindPass(obj/item/card/id/ID, to_dir, atom/movable/caller, no_id = FALSE)
if(!density)
return 1
if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir))
if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir) || fulltile)
return 0
return 1