diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index f6f52af5b44..79fd53e5083 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -9,7 +9,7 @@ use_power = 1 idle_power_usage = 0 var/syndicate = 0 - var/bypasses_area_teleport_lock = FALSE + var/area_bypass = FALSE var/obj/item/radio/beacon/Beacon var/enabled = TRUE @@ -23,6 +23,7 @@ Beacon.invisibility = INVISIBILITY_MAXIMUM Beacon.loc = T Beacon.syndicate = syndicate + Beacon.area_bypass = area_bypass hide(T.intact) /obj/machinery/bluespace_beacon/proc/destroy_beacon() @@ -65,7 +66,7 @@ /obj/machinery/bluespace_beacon/syndicate syndicate = TRUE enabled = FALSE - bypasses_area_teleport_lock = TRUE + area_bypass = TRUE // This enables teleports to this beacon to bypass the tele_proof flag of /area/s. Intended for depot syndi teleport computer. var/obj/machinery/computer/syndicate_depot/teleporter/mycomputer /obj/machinery/bluespace_beacon/syndicate/New() diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index dfbabb4338d..6fa8377ca62 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -11,6 +11,7 @@ var/calibrating var/turf/target //Used for one-time-use teleport cards (such as clown planet coordinates.) //Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location. + var/area_bypass = FALSE /obj/machinery/computer/teleporter/New() src.id = "[rand(1000, 9999)]" @@ -172,6 +173,7 @@ locked = null /obj/machinery/computer/teleporter/proc/set_target(mob/user) + area_bypass = FALSE if(regime_set == "Teleporter") var/list/L = list() var/list/areaindex = list() @@ -211,7 +213,10 @@ var/desc = input("Please select a location to lock in.", "Locking Computer") in L target = L[desc] - + if(istype(target, /obj/item/radio/beacon)) + var/obj/item/radio/beacon/B = target + if(B.area_bypass) + area_bypass = TRUE else var/list/L = list() var/list/areaindex = list() @@ -335,9 +340,10 @@ to_chat(T, "[pick(TPError)]") return else - if(!teleport(M)) + if(!teleport(M) && isliving(M)) visible_message("[src] emits a loud buzz, as its teleport portal flickers and fails!") playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0) + power_station.toggle() use_power(5000) //--FalseIncarnate @@ -356,6 +362,7 @@ return ..() /obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj, turf/T) + . = TRUE var/obj/machinery/computer/teleporter/com = power_station.teleporter_console if(!com) return @@ -364,11 +371,10 @@ return if(istype(M, /atom/movable)) if(!calibrated && prob(25 - ((accurate) * 10))) //oh dear a problem - do_teleport(M, locate(rand((2*TRANSITIONEDGE), world.maxx - (2*TRANSITIONEDGE)), rand((2*TRANSITIONEDGE), world.maxy - (2*TRANSITIONEDGE)), 3), 2) + . = do_teleport(M, locate(rand((2*TRANSITIONEDGE), world.maxx - (2*TRANSITIONEDGE)), rand((2*TRANSITIONEDGE), world.maxy - (2*TRANSITIONEDGE)), 3), 2, bypass_area_flag = com.area_bypass) else - do_teleport(M, com.target) + . = do_teleport(M, com.target, bypass_area_flag = com.area_bypass) calibrated = 0 - return /obj/machinery/teleport/hub/update_icon() if(panel_open) @@ -577,8 +583,8 @@ visible_message("No target detected.") src.engaged = 0 teleporter_hub.update_icon() - src.add_fingerprint(user) - return + if(istype(user)) + add_fingerprint(user) /obj/machinery/teleport/station/power_change() ..() diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm index ff7fd6504d1..19e26f06bf5 100644 --- a/code/game/objects/items/devices/radio/beacon.dm +++ b/code/game/objects/items/devices/radio/beacon.dm @@ -7,6 +7,7 @@ origin_tech = "bluespace=1" var/emagged = 0 var/syndicate = 0 + var/area_bypass = FALSE /obj/item/radio/beacon/New() ..()