okay, projectiles and bumping now properly works all the time

This commit is contained in:
S34NW
2021-09-10 22:07:46 +01:00
parent 0c4dcd1b62
commit 6d491f96a8
2 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -142,7 +142,7 @@
return
shock(user, 70)
shock_cooldown = TRUE // We do not want bump shock spam!
addtimer(CALLBACK(src, .proc/shock_cooldown), 1 SECONDS, TIMER_OVERRIDE)
addtimer(CALLBACK(src, .proc/shock_cooldown), 1 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
/obj/structure/fence/proc/shock_cooldown()
shock_cooldown = FALSE
+19 -9
View File
@@ -65,25 +65,35 @@
return TRUE
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSFENCE))
if(istype(mover) && mover.checkpass(PASSTABLE))
return TRUE
..()
var/mob/living/M = mover
if(M.flying || M.floating || mover.throwing)
if(istype(mover, /obj/item/projectile))
return TRUE
if(get_dir(loc, target) == dir)
return !density
return TRUE
if(ismob(mover))
var/mob/M = mover
if(M.flying)
return TRUE
if(mover.throwing)
return TRUE
if(get_dir(loc, target) != dir)
return density
return FALSE
/obj/structure/railing/corner/CanPass()
return TRUE
/obj/structure/railing/corner/CheckExit()
return TRUE
/obj/structure/railing/CheckExit(atom/movable/O, target)
var/mob/living/M = O
if(istype(O) && O.checkpass(PASSFENCE))
return TRUE
var/mob/living/M = O
if(M.flying | M.floating)
if(istype(O, /obj/item/projectile))
return TRUE
if(ismob(O))
if(M.flying | M.floating)
return TRUE
if(O.throwing)
return TRUE
if(O.move_force >= MOVE_FORCE_EXTREMELY_STRONG)