Merge pull request #6727 from Citadel-Station-13/upstream-merge-37684
[MIRROR] Linked teleporters now teleport to the hub instead of the power station
This commit is contained in:
@@ -174,25 +174,26 @@
|
|||||||
|
|
||||||
else
|
else
|
||||||
var/list/S = power_station.linked_stations
|
var/list/S = power_station.linked_stations
|
||||||
if(!S.len)
|
|
||||||
to_chat(user, "<span class='alert'>No connected stations located.</span>")
|
|
||||||
return
|
|
||||||
for(var/obj/machinery/teleport/station/R in S)
|
for(var/obj/machinery/teleport/station/R in S)
|
||||||
if(is_eligible(R))
|
if(is_eligible(R) && R.teleporter_hub)
|
||||||
var/area/A = get_area(R)
|
var/area/A = get_area(R)
|
||||||
L[avoid_assoc_duplicate_keys(A.name, areaindex)] = R
|
L[avoid_assoc_duplicate_keys(A.name, areaindex)] = R
|
||||||
|
if(!L.len)
|
||||||
|
to_chat(user, "<span class='alert'>No active connected stations located.</span>")
|
||||||
|
return
|
||||||
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
|
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
|
||||||
target = L[desc]
|
var/obj/machinery/teleport/station/target_station = L[desc]
|
||||||
if(target)
|
if(!target_station || !target_station.teleporter_hub)
|
||||||
var/obj/machinery/teleport/station/trg = target
|
return
|
||||||
trg.linked_stations |= power_station
|
target = target_station.teleporter_hub
|
||||||
trg.stat &= ~NOPOWER
|
target_station.linked_stations |= power_station
|
||||||
if(trg.teleporter_hub)
|
target_station.stat &= ~NOPOWER
|
||||||
trg.teleporter_hub.stat &= ~NOPOWER
|
if(target_station.teleporter_hub)
|
||||||
trg.teleporter_hub.update_icon()
|
target_station.teleporter_hub.stat &= ~NOPOWER
|
||||||
if(trg.teleporter_console)
|
target_station.teleporter_hub.update_icon()
|
||||||
trg.teleporter_console.stat &= ~NOPOWER
|
if(target_station.teleporter_console)
|
||||||
trg.teleporter_console.update_icon()
|
target_station.teleporter_console.stat &= ~NOPOWER
|
||||||
|
target_station.teleporter_console.update_icon()
|
||||||
|
|
||||||
/obj/machinery/computer/teleporter/proc/is_eligible(atom/movable/AM)
|
/obj/machinery/computer/teleporter/proc/is_eligible(atom/movable/AM)
|
||||||
var/turf/T = get_turf(AM)
|
var/turf/T = get_turf(AM)
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
return
|
return
|
||||||
if(is_ready())
|
if(is_ready())
|
||||||
teleport(AM)
|
teleport(AM)
|
||||||
use_power(5000)
|
|
||||||
|
|
||||||
/obj/machinery/teleport/hub/attackby(obj/item/W, mob/user, params)
|
/obj/machinery/teleport/hub/attackby(obj/item/W, mob/user, params)
|
||||||
if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W))
|
if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W))
|
||||||
@@ -61,13 +60,15 @@
|
|||||||
|
|
||||||
/obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj, turf/T)
|
/obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj, turf/T)
|
||||||
var/obj/machinery/computer/teleporter/com = power_station.teleporter_console
|
var/obj/machinery/computer/teleporter/com = power_station.teleporter_console
|
||||||
if (!com)
|
if (QDELETED(com))
|
||||||
return
|
return
|
||||||
if (!com.target)
|
if (QDELETED(com.target))
|
||||||
|
com.target = null
|
||||||
visible_message("<span class='alert'>Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.</span>")
|
visible_message("<span class='alert'>Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.</span>")
|
||||||
return
|
return
|
||||||
if (ismovableatom(M))
|
if (ismovableatom(M))
|
||||||
if(do_teleport(M, com.target))
|
if(do_teleport(M, com.target))
|
||||||
|
use_power(5000)
|
||||||
if(!calibrated && prob(30 - ((accurate) * 10))) //oh dear a problem
|
if(!calibrated && prob(30 - ((accurate) * 10))) //oh dear a problem
|
||||||
if(ishuman(M))//don't remove people from the round randomly you jerks
|
if(ishuman(M))//don't remove people from the round randomly you jerks
|
||||||
var/mob/living/carbon/human/human = M
|
var/mob/living/carbon/human/human = M
|
||||||
|
|||||||
Reference in New Issue
Block a user