From cf81a57efabdda021ec028e0c1e351c0491ca54f Mon Sep 17 00:00:00 2001 From: Ghommie Date: Mon, 5 Aug 2019 05:33:47 +0200 Subject: [PATCH] Adds in turf density checks, replaced object density checks with CanPass() --- .../modules/mob/living/carbon/human/species.dm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/modular_citadel/code/modules/mob/living/carbon/human/species.dm b/modular_citadel/code/modules/mob/living/carbon/human/species.dm index 1e86da47e1..1c7456a8d8 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/species.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/species.dm @@ -80,21 +80,23 @@ else target.Move(target_shove_turf, shove_dir) if(get_turf(target) == target_oldturf) - var/thoushallnotpass = FALSE - for(var/obj/O in target_shove_turf) - if(O.density) - shove_blocked = TRUE + if(target_shove_turf.density) + shove_blocked = TRUE + else + var/thoushallnotpass = FALSE + for(var/obj/O in target_shove_turf) if(istype(O, /obj/structure/table)) target_table = O - else + else if(!O.CanPass(src, target_shove_turf)) + shove_blocked = TRUE thoushallnotpass = TRUE - if(thoushallnotpass) - target_table = null + if(thoushallnotpass) + target_table = null if(target.is_shove_knockdown_blocked()) return - if(shove_blocked) + if(shove_blocked || target_table) var/directional_blocked = FALSE if(shove_dir in GLOB.cardinals) //Directional checks to make sure that we're not shoving through a windoor or something like that var/target_turf = get_turf(target)