handles incoming emagged teleport to syndibeacon

This commit is contained in:
Kyep
2018-08-16 02:05:40 -07:00
parent c1c98e46ef
commit f40127b348
3 changed files with 17 additions and 9 deletions
+3 -2
View File
@@ -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()
+13 -7
View File
@@ -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("<span class='warning'>[src] emits a loud buzz, as its teleport portal flickers and fails!</span>")
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("<span class='alert'>No target detected.</span>")
src.engaged = 0
teleporter_hub.update_icon()
src.add_fingerprint(user)
return
if(istype(user))
add_fingerprint(user)
/obj/machinery/teleport/station/power_change()
..()
@@ -7,6 +7,7 @@
origin_tech = "bluespace=1"
var/emagged = 0
var/syndicate = 0
var/area_bypass = FALSE
/obj/item/radio/beacon/New()
..()