////// ////// Teleporter computer ////// /obj/machinery/computer/teleporter name = "teleporter control console" desc = "Used to control a linked teleportation Hub and Station." icon_keyboard = "teleport_key" icon_screen = "teleport" circuit = /obj/item/circuitboard/teleporter dir = 4 var/id = null var/one_time_use = 0 //Used for one-time-use teleport cards (such as clown planet coordinates.) //Setting this to 1 will set locked to null after a player enters the portal and will not allow hand-teles to open portals to that location. var/datum/tgui_module/teleport_control/teleport_control /obj/machinery/computer/teleporter/New() id = "[rand(1000, 9999)]" ..() underlays.Cut() underlays += image('icons/obj/stationobjs_vr.dmi', icon_state = "telecomp-wires") //VOREStation Edit: different direction for wires to account for dirs /obj/machinery/computer/teleporter/Initialize() . = ..() teleport_control = new(src) var/obj/machinery/teleport/station/station = null var/obj/machinery/teleport/hub/hub = null // Search surrounding turfs for the station, and then search the station's surrounding turfs for the hub. for(var/direction in cardinal) station = locate(/obj/machinery/teleport/station, get_step(src, direction)) if(station) for(direction in cardinal) hub = locate(/obj/machinery/teleport/hub, get_step(station, direction)) if(hub) break break if(istype(station)) station.com = hub teleport_control.hub = hub if(istype(hub)) hub.com = src teleport_control.station = station /obj/machinery/computer/teleporter/Destroy() QDEL_NULL(teleport_control) return ..() /obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob) if(istype(I, /obj/item/card/data/)) var/obj/item/card/data/C = I if(stat & (NOPOWER|BROKEN) & (C.function != "teleporter")) attack_hand() var/obj/L = null for(var/obj/effect/landmark/sloc in landmarks_list) if(sloc.name != C.data) continue if(locate(/mob/living) in sloc.loc) continue L = sloc break if(!L) L = locate("landmark*[C.data]") // use old stype if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf)) to_chat(user, "You insert the coordinates into the machine.") to_chat(user, "A message flashes across the screen, reminding the user that the nuclear authentication disk is not transportable via insecure means.") user.drop_item() qdel(I) if(C.data == "Clown Land") //whoops for(var/mob/O in hearers(src, null)) O.show_message(span_warning("Incoming bluespace portal detected, unable to lock in."), 2) for(var/obj/machinery/teleport/hub/H in range(1)) var/amount = rand(2,5) for(var/i=0;i