mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
* Generalized AStar check for objects preventing passability
* Fixed AStar not detecting plastic flaps as impassable for mobs that can't pass them (fixes #14616)
This commit is contained in:
@@ -199,3 +199,6 @@
|
||||
tesla_zap(src, 3, power_bounced)
|
||||
spawn(10)
|
||||
being_shocked = 0
|
||||
|
||||
/obj/proc/CanAStarPass()
|
||||
. = !density
|
||||
@@ -7,6 +7,17 @@
|
||||
anchored = 1
|
||||
layer = 4
|
||||
|
||||
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
|
||||
if(istype(caller, /mob/living))
|
||||
if(istype(caller,/mob/living/simple_animal/bot/mulebot))
|
||||
return 1
|
||||
|
||||
var/mob/living/M = caller
|
||||
if(!M.ventcrawler && M.mob_size != MOB_SIZE_TINY)
|
||||
return 0
|
||||
|
||||
return 1 //diseases, stings, etc can pass
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/movable/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
@@ -439,6 +439,14 @@
|
||||
/obj/structure/window/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
return 0
|
||||
|
||||
/obj/structure/window/CanAStarPass(ID, to_dir)
|
||||
if(!density)
|
||||
return 1
|
||||
if((dir == SOUTHWEST) || (dir == to_dir))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
name = "reinforced window"
|
||||
icon_state = "rwindow"
|
||||
|
||||
Reference in New Issue
Block a user