Cleans up leftover telesci teleporter code (#38789)

This commit is contained in:
ShizCalev
2018-06-30 04:54:20 -04:00
committed by letterjay
parent 0029919b80
commit 452b34caa2
2 changed files with 1 additions and 37 deletions
+1 -36
View File
@@ -5,13 +5,11 @@
icon_keyboard = "teleport_key"
light_color = LIGHT_COLOR_BLUE
circuit = /obj/item/circuitboard/computer/teleporter
var/obj/item/gps/locked
var/regime_set = "Teleporter"
var/id
var/obj/machinery/teleport/station/power_station
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/turf/target
/obj/machinery/computer/teleporter/Initialize()
. = ..()
@@ -33,18 +31,6 @@
break
return power_station
/obj/machinery/computer/teleporter/attackby(obj/I, mob/living/user, params)
if(istype(I, /obj/item/gps))
var/obj/item/gps/L = I
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
if(!user.transferItemToLoc(L, src))
to_chat(user, "<span class='warning'>\the [I] is stuck to your hand, you cannot put it in \the [src]!</span>")
return
locked = L
to_chat(user, "<span class='caution'>You insert the GPS device into the [name]'s slot.</span>")
else
return ..()
/obj/machinery/computer/teleporter/ui_interact(mob/user)
. = ..()
var/data = "<h3>Teleporter Status</h3>"
@@ -65,12 +51,6 @@
data += "<A href='?src=[REF(src)];regimeset=1'>Change regime</A><BR>"
data += "<A href='?src=[REF(src)];settarget=1'>Set target</A><BR>"
if(locked)
data += "<BR><A href='?src=[REF(src)];locked=1'>Get target from memory</A><BR>"
data += "<A href='?src=[REF(src)];eject=1'>Eject GPS device</A><BR>"
else
data += "<BR><span class='linkOff'>Get target from memory</span><BR>"
data += "<span class='linkOff'>Eject GPS device</span><BR>"
data += "<BR><A href='?src=[REF(src)];calibrate=1'>Calibrate Hub</A>"
@@ -82,11 +62,6 @@
if(..())
return
if(href_list["eject"])
eject()
updateDialog()
return
if(!check_hub_connection())
say("Error: Unable to detect hub.")
return
@@ -104,11 +79,6 @@
power_station.teleporter_hub.update_icon()
power_station.teleporter_hub.calibrated = 0
set_target(usr)
if(href_list["locked"])
power_station.engaged = 0
power_station.teleporter_hub.update_icon()
power_station.teleporter_hub.calibrated = 0
target = get_turf(locked.locked_location)
if(href_list["calibrate"])
if(!target)
say("Error: No target set to calibrate to.")
@@ -144,11 +114,6 @@
else
regime_set = "Teleporter"
/obj/machinery/computer/teleporter/proc/eject()
if(locked)
locked.forceMove(get_turf(src))
locked = null
/obj/machinery/computer/teleporter/proc/set_target(mob/user)
var/list/L = list()
var/list/areaindex = list()
-1
View File
@@ -9,7 +9,6 @@ GLOBAL_LIST_EMPTY(GPS_list)
obj_flags = UNIQUE_RENAME
var/gpstag = "COM0"
var/emped = FALSE
var/turf/locked_location
var/tracking = TRUE
var/updating = TRUE //Automatic updating of GPS list. Can be set to manual by user.
var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown