diff --git a/_maps/map_files/generic/centcomm.dmm b/_maps/map_files/generic/centcomm.dmm index dba18f9119d..6dfd1852d14 100644 --- a/_maps/map_files/generic/centcomm.dmm +++ b/_maps/map_files/generic/centcomm.dmm @@ -4463,7 +4463,7 @@ }, /area/centcom/control) "oP" = ( -/obj/machinery/teleport/station, +/obj/machinery/teleport/station/upgraded, /turf/simulated/floor/plasteel{ dir = 4; icon_state = "darkred" @@ -13681,7 +13681,7 @@ /turf/simulated/floor/plasteel, /area/admin) "Wx" = ( -/obj/machinery/teleport/station, +/obj/machinery/teleport/station/upgraded, /turf/simulated/floor/plasteel, /area/admin) "Wy" = ( diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index a64d2b4228d..6ca72c4ed53 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -18,7 +18,7 @@ /// Whether calibration is in progress or not. Calibration prevents changes. var/calibrating = FALSE /// The target turf of the teleporter - var/turf/target + var/atom/target /* var/area_bypass is for one-time-use teleport cards Setting this to TRUE will set var/obj/item/gps/locked to null after a player enters the portal and will not allow hand-teles to open portals to that location. @@ -26,6 +26,9 @@ var/area_bypass = FALSE var/cc_beacon = FALSE + /// When the teleporter is upgraded, it can lock onto beacons directly, rather than turfs. This is the variable for it. + var/advanced_beacon_locking = FALSE + /obj/machinery/computer/teleporter/Initialize() . = ..() link_power_station() @@ -98,6 +101,9 @@ data["calibrating"] = calibrating data["locked"] = locked ? TRUE : FALSE data["targetsTeleport"] = null + if(power_station && power_station.efficiency >= 7) + data["adv_beacon_allowed"] = 1 + data["advanced_beacon_locking"] = advanced_beacon_locking switch(regime) if(REGIME_TELEPORT) data["targetsTeleport"] = targets_teleport() @@ -131,11 +137,14 @@ target = null if("settarget") resetPowerstation() - var/turf/tmpTarget = locate(text2num(params["x"]), text2num(params["y"]), text2num(params["z"])) - if(!isturf(tmpTarget)) - atom_say("No valid targets available.") - return - target = tmpTarget + if(!advanced_beacon_locking) + var/turf/tmpTarget = locate(text2num(params["x"]), text2num(params["y"]), text2num(params["z"])) + if(!isturf(tmpTarget)) + atom_say("No valid targets available.") + return + target = tmpTarget + else + target = locateUID(params["tptarget"]) if(regime == REGIME_TELEPORT) teleport_helper() if(regime == REGIME_GATE) @@ -151,6 +160,8 @@ atom_say("Processing hub calibration to target...") calibrating = TRUE addtimer(CALLBACK(src, PROC_REF(calibrateCallback)), 50 * (3 - power_station.teleporter_hub.accurate)) //Better parts mean faster calibration + if("advanced_beacon_locking") + advanced_beacon_locking = !advanced_beacon_locking /** * Resets the connected powerstation to initial values. Helper function of ui_act @@ -214,7 +225,8 @@ "name" = tmpname, "x" = T.x, "y" = T.y, - "z" = T.z) + "z" = T.z, + "pretarget" = R.UID()) for(var/obj/item/bio_chip/tracking/I in GLOB.tracked_implants) if(!I.implanted || !ismob(I.loc)) @@ -236,7 +248,8 @@ "name" = tmpname, "x" = T.x, "y" = T.y, - "z" = T.z) + "z" = T.z, + "pretarget" = M.UID()) return L /** @@ -263,7 +276,8 @@ "name" = tmpname, "x" = T.x, "y" = T.y, - "z" = T.z) + "z" = T.z, + "pretarget" = R.UID()) return L /** @@ -273,7 +287,8 @@ */ /obj/machinery/computer/teleporter/proc/teleport_helper() area_bypass = FALSE - for(var/item in target.contents) + var/turf/T = get_turf(target) + for(var/item in T.contents) if(istype(item, /obj/item/beacon)) var/obj/item/beacon/B = item if(B.area_bypass) @@ -361,7 +376,7 @@ component_parts = list() component_parts += new /obj/item/circuitboard/teleporter_hub(null) component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 3) - component_parts += new /obj/item/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null) RefreshParts() /obj/machinery/teleport/hub/process() @@ -577,6 +592,17 @@ RefreshParts() link_console_and_hub() +/obj/machinery/teleport/station/upgraded/Initialize(mapload) + . = ..() + component_parts = list() + component_parts += new /obj/item/circuitboard/teleporter_station(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) + component_parts += new /obj/item/stock_parts/capacitor/quadratic(null) + component_parts += new /obj/item/stock_parts/capacitor/quadratic(null) + component_parts += new /obj/item/stack/sheet/glass(null) + RefreshParts() + link_console_and_hub() + /obj/machinery/teleport/station/RefreshParts() var/E for(var/obj/item/stock_parts/capacitor/C in component_parts) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index e669ab95d37..ba6f449d1f0 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -86,7 +86,7 @@ /obj/effect/portal/attack_ghost(mob/dead/observer/O) if(target) - O.forceMove(target) + O.forceMove(get_turf(target)) /obj/effect/portal/multitool_act(mob/user, obj/item/I) . = TRUE diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm index 3e89ea63ae7..9238fb83fbd 100644 --- a/code/modules/mining/equipment/wormhole_jaunter.dm +++ b/code/modules/mining/equipment/wormhole_jaunter.dm @@ -41,7 +41,7 @@ to_chat(user, "[src] found no beacons in the world to anchor a wormhole to.") return var/chosen_beacon = pick(L) - var/obj/effect/portal/jaunt_tunnel/J = new(get_turf(src), get_turf(chosen_beacon), src, 100, user) + var/obj/effect/portal/jaunt_tunnel/J = new(get_turf(src), chosen_beacon, src, 100, user) J.emagged = emagged if(adjacent) try_move_adjacent(J) diff --git a/tgui/packages/tgui/interfaces/Teleporter.js b/tgui/packages/tgui/interfaces/Teleporter.js index 5f69c6c9c1f..c7bd71b0f42 100644 --- a/tgui/packages/tgui/interfaces/Teleporter.js +++ b/tgui/packages/tgui/interfaces/Teleporter.js @@ -16,6 +16,8 @@ export const Teleporter = (props, context) => { teleporterhub, target, locked, + adv_beacon_allowed, + advanced_beacon_locking, } = data; return ( @@ -34,7 +36,37 @@ export const Teleporter = (props, context) => { )} {powerstation && teleporterhub && ( -
+
+ {!!adv_beacon_allowed && ( + <> + + Advanced Beacon Locking:  + +