From 6f96c169e1a2a247d5011460e8e3e910fd1dd595 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Thu, 11 Jan 2018 12:09:57 -0800 Subject: [PATCH 1/2] Fixes megafauna being able to port through jaunt tunnels due to snowflake code (#34164) * Fixed megafauna porting through jaunt tunnels * Update portals.dm --- code/game/objects/effects/portals.dm | 3 ++- code/modules/mining/equipment/wormhole_jaunter.dm | 10 +++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 51a5778383..a7a6d75bd1 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -26,6 +26,7 @@ var/turf/open/atmos_source //Atmos link source var/turf/open/atmos_destination //Atmos link destination var/allow_anchored = FALSE + var/innate_accuracy_penalty = 0 /obj/effect/portal/anom name = "wormhole" @@ -150,7 +151,7 @@ return if(ismegafauna(M)) message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].") - if(do_teleport(M, real_target, 0)) + if(do_teleport(M, real_target, innate_accuracy_penalty)) if(istype(M, /obj/item/projectile)) var/obj/item/projectile/P = M P.ignore_source_check = TRUE diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm index f714e3f471..a482b36949 100644 --- a/code/modules/mining/equipment/wormhole_jaunter.dm +++ b/code/modules/mining/equipment/wormhole_jaunter.dm @@ -89,15 +89,11 @@ icon_state = "bhole3" desc = "A stable hole in the universe made by a wormhole jaunter. Turbulent doesn't even begin to describe how rough passage through one of these is, but at least it will always get you somewhere near a beacon." mech_sized = TRUE //save your ripley + innate_accuracy_penalty = 6 /obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M) - if(!ismob(M) && !isobj(M)) //No don't teleport lighting and effects! - return - - if(M.anchored && (!ismob(M) || (ismecha(M) && !mech_sized))) - return - - if(do_teleport(M, hard_target, 6)) + . = ..() + if(.) // KERPLUNK playsound(M,'sound/weapons/resonator_blast.ogg',50,1) if(iscarbon(M))