mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
Fixes Chainlink Fence Pathing (#20677)
Fixes an issue where you could not walk on the tile where a chainlink fence existed. Altered the passing code and added some flags to ensure it would check direction. @RustingWithYou I tested it several times to make sure that it could not be lept. It seemed the intention was for it to never be passable so nothing living is able to move through it in this configuration. I left the probability for projectiles to sometimes not pass.
This commit is contained in:
@@ -520,24 +520,21 @@ ABSTRACT_TYPE(/obj/structure/stairs/urban/road_ramp)
|
||||
color = null
|
||||
anchored = TRUE
|
||||
can_be_unanchored = FALSE
|
||||
atom_flags = ATOM_FLAG_CHECKS_BORDER
|
||||
layer = ABOVE_HUMAN_LAYER //The sprite will be in front of players when positioned correctly.
|
||||
|
||||
/obj/structure/chainlink_fence/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
|
||||
if(mover?.movement_type & PHASING)
|
||||
return TRUE
|
||||
if(air_group || (height==0))
|
||||
return TRUE
|
||||
if(istype(mover, /obj/projectile))
|
||||
var/obj/projectile/P = mover
|
||||
if(P.original == src)
|
||||
if(isliving(mover))
|
||||
return FALSE
|
||||
if(P.firer && Adjacent(P.firer))
|
||||
return TRUE
|
||||
return prob(35)
|
||||
if(isliving(mover))
|
||||
return FALSE
|
||||
if(istype(mover) && mover.pass_flags & PASSTABLE)
|
||||
if(!istype(mover) || mover.pass_flags & PASSGRILLE)
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/chainlink_fence/CheckExit(var/atom/movable/O, var/turf/target)
|
||||
if(istype(O) && CanPass(O, target))
|
||||
|
||||
Reference in New Issue
Block a user