From b6fdcff5e2537ee78caf534ef579041d8d6c2003 Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 2 Aug 2018 09:32:04 -0700 Subject: [PATCH 1/9] splits teleportation fixes out of depot PR #8515 --- code/game/objects/items/weapons/teleportation.dm | 15 ++++++++++----- code/modules/hydroponics/plant_genes.dm | 11 +++++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 501bfaa5db7..17fb0b9745a 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -108,9 +108,11 @@ Frequency: /obj/item/hand_tele/attack_self(mob/user as mob) var/turf/current_location = get_turf(user)//What turf is the user on? - if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof + var/area/current_area = get_area(user) + if(!current_location || !is_teleport_allowed(current_location.z) || current_area.tele_proof)//If turf was not found or they're somewhere teleproof to_chat(user, "\The [src] is malfunctioning.") return + var/list/L = list( ) for(var/obj/machinery/computer/teleporter/com in world) if(com.target) @@ -118,13 +120,16 @@ Frequency: L["[com.id] (Active)"] = com.target else L["[com.id] (Inactive)"] = com.target - var/list/turfs = list( ) + var/list/turfs = list() var/area/A for(var/turf/T in orange(10)) - if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb - if(T.y>world.maxy-8 || T.y<8) continue + if(T.x>world.maxx-8 || T.x<8) + continue //putting them at the edge is dumb + if(T.y>world.maxy-8 || T.y<8) + continue A = get_area(T) - if(A.tele_proof == 1) continue // Telescience-proofed areas require a beacon. + if(A.tele_proof == 1) + continue // Telescience-proofed areas require a beacon. turfs += T if(turfs.len) L["None (Dangerous)"] = pick(turfs) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 5b4a35262d7..f4e8e60f948 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -307,14 +307,21 @@ /datum/plant_gene/trait/teleport/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target) if(isliving(target)) - var/teleport_radius = max(round(G.seed.potency / 10), 1) var/turf/T = get_turf(target) + var/area/A = get_area(T) + if(!T || !is_teleport_allowed(T.z) || A.tele_proof) + return + var/teleport_radius = max(round(G.seed.potency / 10), 1) new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... do_teleport(target, T, teleport_radius) /datum/plant_gene/trait/teleport/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C) - var/teleport_radius = max(round(G.seed.potency / 10), 1) var/turf/T = get_turf(C) + var/area/A = get_area(T) + if(!T || !is_teleport_allowed(T.z) || A.tele_proof) + qdel(G) + return + var/teleport_radius = max(round(G.seed.potency / 10), 1) to_chat(C, "You slip through spacetime!") do_teleport(C, T, teleport_radius) if(prob(50)) From de9e5197f6e0228f36297bfebb19cbfaa32d890c Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 2 Aug 2018 09:38:20 -0700 Subject: [PATCH 2/9] also wormhole jaunter --- code/modules/mining/equipment_locker.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index bf9c5a67783..4562eb798dc 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -620,7 +620,8 @@ /obj/item/wormhole_jaunter/attack_self(mob/user) var/turf/device_turf = get_turf(user) - if(!device_turf || !is_teleport_allowed(device_turf.z)) + var/area/current_area = get_area(device_turf) + if(!device_turf || !is_teleport_allowed(device_turf.z) || current_area.tele_proof) to_chat(user, "You're having difficulties getting the [src.name] to work.") return else From 1559887b174c2a5a2717ad1f0eaf3b5201c11fb5 Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 2 Aug 2018 09:51:03 -0700 Subject: [PATCH 3/9] Revert "splits teleportation fixes out of depot PR #8515" This reverts commit b6fdcff5e2537ee78caf534ef579041d8d6c2003. --- code/game/objects/items/weapons/teleportation.dm | 15 +++++---------- code/modules/hydroponics/plant_genes.dm | 11 ++--------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 17fb0b9745a..501bfaa5db7 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -108,11 +108,9 @@ Frequency: /obj/item/hand_tele/attack_self(mob/user as mob) var/turf/current_location = get_turf(user)//What turf is the user on? - var/area/current_area = get_area(user) - if(!current_location || !is_teleport_allowed(current_location.z) || current_area.tele_proof)//If turf was not found or they're somewhere teleproof + if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof to_chat(user, "\The [src] is malfunctioning.") return - var/list/L = list( ) for(var/obj/machinery/computer/teleporter/com in world) if(com.target) @@ -120,16 +118,13 @@ Frequency: L["[com.id] (Active)"] = com.target else L["[com.id] (Inactive)"] = com.target - var/list/turfs = list() + var/list/turfs = list( ) var/area/A for(var/turf/T in orange(10)) - if(T.x>world.maxx-8 || T.x<8) - continue //putting them at the edge is dumb - if(T.y>world.maxy-8 || T.y<8) - continue + if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb + if(T.y>world.maxy-8 || T.y<8) continue A = get_area(T) - if(A.tele_proof == 1) - continue // Telescience-proofed areas require a beacon. + if(A.tele_proof == 1) continue // Telescience-proofed areas require a beacon. turfs += T if(turfs.len) L["None (Dangerous)"] = pick(turfs) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index f4e8e60f948..5b4a35262d7 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -307,21 +307,14 @@ /datum/plant_gene/trait/teleport/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target) if(isliving(target)) - var/turf/T = get_turf(target) - var/area/A = get_area(T) - if(!T || !is_teleport_allowed(T.z) || A.tele_proof) - return var/teleport_radius = max(round(G.seed.potency / 10), 1) + var/turf/T = get_turf(target) new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... do_teleport(target, T, teleport_radius) /datum/plant_gene/trait/teleport/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C) - var/turf/T = get_turf(C) - var/area/A = get_area(T) - if(!T || !is_teleport_allowed(T.z) || A.tele_proof) - qdel(G) - return var/teleport_radius = max(round(G.seed.potency / 10), 1) + var/turf/T = get_turf(C) to_chat(C, "You slip through spacetime!") do_teleport(C, T, teleport_radius) if(prob(50)) From 8025d3aa23d8dbc111ace1a9ffe33f8e253338df Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 2 Aug 2018 09:51:27 -0700 Subject: [PATCH 4/9] Revert "also wormhole jaunter" This reverts commit de9e5197f6e0228f36297bfebb19cbfaa32d890c. --- code/modules/mining/equipment_locker.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 4562eb798dc..bf9c5a67783 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -620,8 +620,7 @@ /obj/item/wormhole_jaunter/attack_self(mob/user) var/turf/device_turf = get_turf(user) - var/area/current_area = get_area(device_turf) - if(!device_turf || !is_teleport_allowed(device_turf.z) || current_area.tele_proof) + if(!device_turf || !is_teleport_allowed(device_turf.z)) to_chat(user, "You're having difficulties getting the [src.name] to work.") return else From 8dbbddf86ebe4a8f070b68905ce3a2ca108e24ae Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 2 Aug 2018 09:57:32 -0700 Subject: [PATCH 5/9] modifies do_teleport instead --- code/datums/helper_datums/teleport.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 72f5b6545c8..0ff66bd9b8a 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -97,7 +97,12 @@ var/turf/destturf var/turf/curturf = get_turf(teleatom) + var/area/curarea = get_area(curturf) var/area/destarea = get_area(destination) + + if(!is_teleport_allowed(curturf.z) || curarea.tele_proof || !is_teleport_allowed(destturf.z) || destarea.tele_proof) + return 0 + if(precision) var/list/posturfs = list() var/center = get_turf(destination) From c1c98e46ef1fa5fab25033e74edd688d3d7c88ff Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 16 Aug 2018 00:57:59 -0700 Subject: [PATCH 6/9] failure messages, depot outgoing redspace portal --- code/datums/helper_datums/teleport.dm | 23 +++++++++++++++------- code/game/machinery/Beacon.dm | 2 ++ code/game/machinery/computer/depot.dm | 4 ++-- code/game/machinery/quantum_pad.dm | 5 ++++- code/game/machinery/teleporter.dm | 5 ++++- code/game/objects/effects/portals.dm | 25 ++++++++++++++++++++---- code/modules/hydroponics/plant_genes.dm | 14 ++++++++----- code/modules/mining/equipment_locker.dm | 3 +++ code/modules/telesci/telesci_computer.dm | 5 ++++- 9 files changed, 65 insertions(+), 21 deletions(-) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 0ff66bd9b8a..dc3903226f0 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -1,5 +1,5 @@ //wrapper -/proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) +/proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null, bypass_area_flag=FALSE) var/datum/teleport/instant/science/D = new if(D.start(arglist(args))) return 1 @@ -14,14 +14,15 @@ var/soundin //soundfile to play before teleportation var/soundout //soundfile to play after teleportation var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation) + var/ignore_area_flag = FALSE -/datum/teleport/proc/start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) +/datum/teleport/proc/start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null, bypass_area_flag=FALSE) if(!initTeleport(arglist(args))) return 0 return 1 -/datum/teleport/proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout) +/datum/teleport/proc/initTeleport(ateleatom, adestination, aprecision, afteleport, aeffectin, aeffectout, asoundin, asoundout, bypass_area_flag=FALSE) if(!setTeleatom(ateleatom)) return 0 if(!setDestination(adestination)) @@ -31,6 +32,7 @@ setEffects(aeffectin,aeffectout) setForceTeleport(afteleport) setSounds(asoundin,asoundout) + ignore_area_flag = bypass_area_flag return 1 //must succeed @@ -98,10 +100,6 @@ var/turf/destturf var/turf/curturf = get_turf(teleatom) var/area/curarea = get_area(curturf) - var/area/destarea = get_area(destination) - - if(!is_teleport_allowed(curturf.z) || curarea.tele_proof || !is_teleport_allowed(destturf.z) || destarea.tele_proof) - return 0 if(precision) var/list/posturfs = list() @@ -114,6 +112,17 @@ else destturf = get_turf(destination) + if(!is_teleport_allowed(destturf.z)) + return 0 + + var/area/destarea = get_area(destturf) + + if(!ignore_area_flag) + if(curarea.tele_proof) + return 0 + if(destarea.tele_proof) + return 0 + if(!destturf || !curturf) return 0 diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index 661453adfc3..f6f52af5b44 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -9,6 +9,7 @@ use_power = 1 idle_power_usage = 0 var/syndicate = 0 + var/bypasses_area_teleport_lock = FALSE var/obj/item/radio/beacon/Beacon var/enabled = TRUE @@ -64,6 +65,7 @@ /obj/machinery/bluespace_beacon/syndicate syndicate = TRUE enabled = FALSE + bypasses_area_teleport_lock = TRUE var/obj/machinery/computer/syndicate_depot/teleporter/mycomputer /obj/machinery/bluespace_beacon/syndicate/New() diff --git a/code/game/machinery/computer/depot.dm b/code/game/machinery/computer/depot.dm index 6bd5eadc822..009e5d92930 100644 --- a/code/game/machinery/computer/depot.dm +++ b/code/game/machinery/computer/depot.dm @@ -347,7 +347,7 @@ icon_screen = "telesci" icon_keyboard = "teleport_key" var/obj/machinery/bluespace_beacon/syndicate/mybeacon - var/obj/effect/portal/myportal + var/obj/effect/portal/redspace/myportal var/portal_enabled = FALSE var/portaldir = WEST @@ -401,7 +401,7 @@ if(!tele_target) return var/turf/portal_turf = get_step(src, portaldir) - var/obj/effect/portal/P = new(portal_turf, tele_target, src, 0) + var/obj/effect/portal/redspace/P = new(portal_turf, tele_target, src, 0) myportal = P P.failchance = 0 P.icon_state = "portal1" diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 29c43304b38..fe46d2746c8 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -132,6 +132,7 @@ playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, 1, extrarange = 3, falloff = 5) flick("qpad-beam", linked_pad) playsound(get_turf(linked_pad), 'sound/weapons/emitter2.ogg', 25, 1, extrarange = 3, falloff = 5) + var/tele_success = TRUE for(var/atom/movable/ROI in get_turf(src)) // if is anchored, don't let through if(ROI.anchored) @@ -145,4 +146,6 @@ continue else if(!isobserver(ROI)) continue - do_teleport(ROI, get_turf(linked_pad)) + tele_success = do_teleport(ROI, get_turf(linked_pad)) + if(!tele_success) + to_chat(user, "Teleport failed due to bluespace interference.") diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 46671a9f4fa..dfbabb4338d 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -335,7 +335,10 @@ to_chat(T, "[pick(TPError)]") return else - teleport(M) + if(!teleport(M)) + visible_message("[src] emits a loud buzz, as its teleport portal flickers and fails!") + playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0) + use_power(5000) //--FalseIncarnate return diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 8692e65dc9d..c43d0272e90 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -11,6 +11,7 @@ anchored = 1 var/precision = 1 // how close to the portal you will teleport. 0 = on the portal, 1 = adjacent var/can_multitool_to_remove = 0 + var/ignore_tele_proof_area_setting = FALSE /obj/effect/portal/Bumped(mob/M as mob|obj) teleport(M) @@ -42,12 +43,28 @@ qdel(src) return if(istype(M, /atom/movable)) - if(prob(failchance)) //oh dear a problem, put em in deep space + if(prob(failchance)) src.icon_state = "portal1" - do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0) + if(!do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to deep space. + invalid_teleport() else - do_teleport(M, target, precision) ///You will appear adjacent to the beacon + if(!do_teleport(M, target, precision, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to a turf adjacent to target. + invalid_teleport() /obj/effect/portal/attackby(obj/item/A, mob/user) if(istype(A, /obj/item/multitool) && can_multitool_to_remove) - qdel(src) \ No newline at end of file + qdel(src) + +/obj/effect/portal/proc/invalid_teleport() + visible_message("[src] flickers and fails due to bluespace interference!") + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() + spark_system.set_up(5, 0, loc) + spark_system.start() + qdel(src) + + +/obj/effect/portal/redspace + name = "redspace portal" + desc = "A rare kind of subspace portal, capable of cutting through interference that can jam normal bluespace portals." + icon_state = "portal1" + ignore_tele_proof_area_setting = TRUE \ No newline at end of file diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 5b4a35262d7..84db02cb89c 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -315,12 +315,16 @@ /datum/plant_gene/trait/teleport/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C) var/teleport_radius = max(round(G.seed.potency / 10), 1) var/turf/T = get_turf(C) - to_chat(C, "You slip through spacetime!") - do_teleport(C, T, teleport_radius) - if(prob(50)) - do_teleport(G, T, teleport_radius) + if(do_teleport(C, T, teleport_radius)) + to_chat(C, "You slip through spacetime!") + if(prob(50)) + do_teleport(G, T, teleport_radius) + else + new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... + qdel(G) else - new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... + to_chat(C, "[src] sparks, and burns up!") + new /obj/effect/decal/cleanable/molten_object(T) qdel(G) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index bf9c5a67783..852bcd3edf3 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -664,6 +664,9 @@ var/turf/T = get_turf(H) T.add_vomit_floor(H) playsound(H, 'sound/effects/splat.ogg', 50, 1) + else + visible_message("[src] flickers and fails, due to bluespace interference!") + qdel(src) /**********************Resonator**********************/ diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index b7cf78e5ed2..f0f1654ac30 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -311,7 +311,10 @@ return if(teles_left > 0) - doteleport(user) + if(!doteleport(user)) + telefail() + temp_msg = "ERROR! Target destination unreachable due to interference." + return else telefail() temp_msg = "ERROR!
Calibration required." From f40127b348d29bf6bacd2a4a216d26bf24fdd18a Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 16 Aug 2018 02:05:40 -0700 Subject: [PATCH 7/9] handles incoming emagged teleport to syndibeacon --- code/game/machinery/Beacon.dm | 5 +++-- code/game/machinery/teleporter.dm | 20 ++++++++++++------- .../objects/items/devices/radio/beacon.dm | 1 + 3 files changed, 17 insertions(+), 9 deletions(-) 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() ..() From f36468b8654d1d322c9b4e34c9df7a4eb6841073 Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 16 Aug 2018 02:11:20 -0700 Subject: [PATCH 8/9] comments, cleanup --- code/datums/helper_datums/teleport.dm | 1 + code/game/machinery/computer/depot.dm | 2 -- code/game/machinery/teleporter.dm | 4 ++-- code/game/objects/effects/portals.dm | 3 ++- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index dc3903226f0..015fa78df29 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -114,6 +114,7 @@ if(!is_teleport_allowed(destturf.z)) return 0 + // Only check the destination zlevel for is_teleport_allowed. Checking origin as well breaks ERT teleporters. var/area/destarea = get_area(destturf) diff --git a/code/game/machinery/computer/depot.dm b/code/game/machinery/computer/depot.dm index 009e5d92930..3085163d716 100644 --- a/code/game/machinery/computer/depot.dm +++ b/code/game/machinery/computer/depot.dm @@ -403,8 +403,6 @@ var/turf/portal_turf = get_step(src, portaldir) var/obj/effect/portal/redspace/P = new(portal_turf, tele_target, src, 0) myportal = P - P.failchance = 0 - P.icon_state = "portal1" var/area/A = get_area(tele_target) P.name = "[A] portal" else if(!portal_enabled && myportal) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 6fa8377ca62..63fe5f2391b 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -340,10 +340,10 @@ to_chat(T, "[pick(TPError)]") return else - if(!teleport(M) && isliving(M)) + if(!teleport(M) && isliving(M)) // the isliving(M) is needed to avoid triggering errors if a spark bumps the telehub 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() + power_station.toggle() // turn off the portal. use_power(5000) //--FalseIncarnate diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index c43d0272e90..a048ca1ebff 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -65,6 +65,7 @@ /obj/effect/portal/redspace name = "redspace portal" - desc = "A rare kind of subspace portal, capable of cutting through interference that can jam normal bluespace portals." + desc = "A portal capable of bypassing bluespace interference." icon_state = "portal1" + failchance = 0 ignore_tele_proof_area_setting = TRUE \ No newline at end of file From 5720bc96cf0821284815862d5c36084976ae77fa Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 16 Aug 2018 02:34:02 -0700 Subject: [PATCH 9/9] fixes potential runtime in teleporter.dm --- code/game/machinery/teleporter.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 63fe5f2391b..702d1eee8a2 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -88,7 +88,7 @@ data["accurate"] = null data["regime"] = regime_set var/area/targetarea = get_area(target) - data["target"] = (!target) ? "None" : sanitize(targetarea.name) + data["target"] = (!target || !targetarea) ? "None" : sanitize(targetarea.name) data["calibrating"] = calibrating data["locked"] = locked return data