From e510f6625f8edb46323d23f87c0440dc332c6b53 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 26 May 2015 23:05:38 -0400 Subject: [PATCH] Fixes IV stands blocking bullets IV stands now check PASSTABLE, allowing projectiles and small mobs to pass through them. Flipped tables now block small mobs. --- code/game/machinery/iv_drip.dm | 7 ++++++- code/modules/tables/interactions.dm | 8 ++++---- .../changelogs/HarpyEagle-ProjectileTweaks.yml | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 html/changelogs/HarpyEagle-ProjectileTweaks.yml diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 99a2dc6607..4af33338d9 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -160,4 +160,9 @@ else usr << "\blue No chemicals are attached." - usr << "\blue [attached ? attached : "No one"] is attached." \ No newline at end of file + usr << "\blue [attached ? attached : "No one"] is attached." + +/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(height && istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through. + return 1 + return ..() \ No newline at end of file diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index 13350ee1d8..7c1778e4f3 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -3,15 +3,15 @@ if(air_group || (height==0)) return 1 if(istype(mover,/obj/item/projectile)) return (check_cover(mover,target)) - if(istype(mover) && mover.checkpass(PASSTABLE)) - return 1 - if(locate(/obj/structure/table) in get_turf(mover)) - return 1 if (flipped == 1) if (get_dir(loc, target) == dir) return !density else return 1 + if(istype(mover) && mover.checkpass(PASSTABLE)) + return 1 + if(locate(/obj/structure/table) in get_turf(mover)) + return 1 return 0 //checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops. diff --git a/html/changelogs/HarpyEagle-ProjectileTweaks.yml b/html/changelogs/HarpyEagle-ProjectileTweaks.yml new file mode 100644 index 0000000000..12266695bb --- /dev/null +++ b/html/changelogs/HarpyEagle-ProjectileTweaks.yml @@ -0,0 +1,18 @@ +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment + +author: HarpyEagle +delete-after: True + +changes: + - tweak: "IV stands are no longer bullet shields. They also allow mice, drones, pAIs et al to pass though."