diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 8ecfc15fc56..06ddd1fba81 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -34,9 +34,12 @@
return A
return 0
-/proc/in_range(source, user)
- if(get_dist(source, user) <= 1)
+/proc/in_range(atom/source, mob/user)
+ if(source.Adjacent(user))
return 1
+ else if(istype(user) && user.mutations && user.mutations.len)
+ if((M_TK in user.mutations) && (get_dist(user,source) < tk_maxrange))
+ return 1
return 0 //not in range and not telekinetic
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index f300068ce62..2906a9c1568 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -175,7 +175,7 @@ Class Procs:
/obj/machinery/examine(mob/user)
..()
if(panel_open)
- to_chat(user, "Its maintenance panel is open.")
+ to_chat(user, "Its maintenance panel is open.")
/obj/machinery/Destroy()
if(src in machines)
@@ -286,7 +286,7 @@ Class Procs:
message_admins("[usr] ([formatPlayerPanel(usr,usr.ckey)]) attempted to modify variable(var = [href_list["set_tag"]], value = [newid]) using multitool - [formatJumpTo(usr)]")
return
if(!(href_list["set_tag"] in vars))
- to_chat(usr, "Something went wrong: Unable to find [href_list["set_tag"]] in vars!")
+ to_chat(usr, "Something went wrong: Unable to find [href_list["set_tag"]] in vars!")
return 1
var/current_tag = src.vars[href_list["set_tag"]]
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag", src, current_tag) as null|text),1,MAX_MESSAGE_LEN)
@@ -305,9 +305,9 @@ Class Procs:
return 1
if(unlinkFrom(usr, O))
- to_chat(usr, "A green light flashes on \the [P], confirming the link was removed.")
+ to_chat(usr, "A green light flashes on \the [P], confirming the link was removed.")
else
- to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices.")
+ to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices.")
update_mt_menu=1
if("link" in href_list)
@@ -315,32 +315,32 @@ Class Procs:
if(!O)
return 1
if(!canLink(O,href_list))
- to_chat(usr, "You can't link with that device.")
+ to_chat(usr, "You can't link with that device.")
return 1
if (isLinkedWith(O))
- to_chat(usr, "A red light flashes on \the [P]. The two devices are already linked.")
+ to_chat(usr, "A red light flashes on \the [P]. The two devices are already linked.")
return 1
if(linkWith(usr, O, href_list))
- to_chat(usr, "A green light flashes on \the [P], confirming the link has been created.")
+ to_chat(usr, "A green light flashes on \the [P], confirming the link has been created.")
else
- to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when linking the two devices.")
+ to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when linking the two devices.")
update_mt_menu=1
if("buffer" in href_list)
if(istype(src, /obj/machinery/telecomms))
if(!hasvar(src, "id"))
- to_chat(usr, "A red light flashes and nothing changes.")
+ to_chat(usr, "A red light flashes and nothing changes.")
return
else if(!hasvar(src, "id_tag"))
- to_chat(usr, "A red light flashes and nothing changes.")
+ to_chat(usr, "A red light flashes and nothing changes.")
return
P.buffer = src
- to_chat(usr, "A green light flashes, and the device appears in the multitool buffer.")
+ to_chat(usr, "A green light flashes, and the device appears in the multitool buffer.")
update_mt_menu=1
if("flush" in href_list)
- to_chat(usr, "A green light flashes, and the device disappears from the multitool buffer.")
+ to_chat(usr, "A green light flashes, and the device disappears from the multitool buffer.")
P.buffer = null
update_mt_menu=1
@@ -372,21 +372,15 @@ Class Procs:
if(usr.restrained() || usr.lying || usr.stat)
return 1
if (!usr.dexterity_check())
- to_chat(usr, "You don't have the dexterity to do this!")
+ to_chat(usr, "You don't have the dexterity to do this!")
return 1
var/turf/T = get_turf(usr)
if(!isAI(usr) && T.z != z)
if(usr.z != 2)
- to_chat(usr, "WARNING: Unable to interface with \the [src.name].")
- return 1
- var/norange = 0
- if(usr.mutations && usr.mutations.len)
- if(M_TK in usr.mutations)
- norange = 1
-
- if(!norange)
- if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
+ to_chat(usr, "WARNING: Unable to interface with \the [src.name].")
return 1
+ if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
+ return 1
else if(!custom_aghost_alerts)
log_adminghost("[key_name(usr)] screwed with [src] ([href])!")
@@ -428,7 +422,7 @@ Class Procs:
return 0
if(!user.dexterity_check())
- to_chat(user, "You don't have the dexterity to do this!")
+ to_chat(user, "You don't have the dexterity to do this!")
return 1
/*
//distance checks are made by atom/proc/DblClick
@@ -441,7 +435,7 @@ Class Procs:
visible_message("[H] stares cluelessly at [src] and drools.")
return 1
else if(prob(H.getBrainLoss()))
- to_chat(user, "You momentarily forget how to use [src].")
+ to_chat(user, "You momentarily forget how to use [src].")
return 1
src.add_fingerprint(user)
@@ -501,7 +495,7 @@ Class Procs:
icon_state = icon_state_open
else
icon_state = initial(icon_state)
- to_chat(user, "\icon[src] You [panel_open ? "open" : "close"] the maintenance hatch of \the [src].")
+ to_chat(user, "\icon[src] You [panel_open ? "open" : "close"] the maintenance hatch of \the [src].")
if(istype(toggleitem, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
update_icon()
@@ -509,17 +503,17 @@ Class Procs:
/obj/machinery/proc/wrenchAnchor(var/mob/user)
if(state == 2 && src.machine_flags & WELD_FIXED)
- to_chat(user, "\The [src] has to be unwelded from the floor first.")
+ to_chat(user, "\The [src] has to be unwelded from the floor first.")
return -1 //state set to 2, can't do it
for(var/obj/machinery/other in loc)
if(other.anchored == 1 && other.density == 1 && density && !anchored)
- to_chat(user, "\The [other] is already anchored in this location.")
+ to_chat(user, "\The [other] is already anchored in this location.")
return -1 //other machines are already taking up all the space in this location
if(!anchored)
if(!istype(src.loc, /turf/simulated/floor)) //Prevent from anchoring shit to shuttles / space
if( !(istype(src.loc, /turf/simulated/shuttle) && (machine_flags & SHUTTLEWRENCH)) ) //If NOT (on top of a shuttle AND can be secured to shuttles)
- to_chat(user, "You can't secure \the [src] to [istype(src.loc,/turf/space) ? "space" : "this"]!")
+ to_chat(user, "You can't secure \the [src] to [istype(src.loc,/turf/space) ? "space" : "this"]!")
return
user.visible_message( "[user] begins to [anchored ? "undo" : "wrench"] \the [src]'s securing bolts.",
@@ -539,7 +533,7 @@ Class Procs:
/obj/machinery/proc/weldToFloor(var/obj/item/weapon/weldingtool/WT, mob/user)
if(!anchored)
state = 0 //since this might be wrong, we go sanity
- to_chat(user, "You need to secure \the [src] before it can be welded.")
+ to_chat(user, "You need to secure \the [src] before it can be welded.")
return -1
if (WT.remove_fuel(0,user))
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
@@ -551,7 +545,7 @@ Class Procs:
return -1
switch(state)
if(0)
- to_chat(user, "You have to keep \the [src] secure before it can be welded down.")
+ to_chat(user, "You have to keep \the [src] secure before it can be welded down.")
return -1
if(1)
state = 2
@@ -562,7 +556,7 @@ Class Procs:
)
return 1
else
- to_chat(user, "You need more welding fuel to complete this task.")
+ to_chat(user, "You need more welding fuel to complete this task.")
return -1
/**
@@ -596,7 +590,7 @@ Class Procs:
if(!panel_open)
return wrenchAnchor(user)
else
- to_chat(user, "\The [src]'s maintenance panel must be closed first!")
+ to_chat(user, "\The [src]'s maintenance panel must be closed first!")
return -1 //we return -1 rather than 0 for the if(..()) checks
if(istype(O, /obj/item/weapon/screwdriver) && machine_flags & SCREWTOGGLE)
@@ -618,7 +612,7 @@ Class Procs:
return 1
if(!anchored && machine_flags & FIXED2WORK)
- return to_chat(user, "\The [src] must be anchored first!")
+ return to_chat(user, "\The [src] must be anchored first!")
if(istype(O, /obj/item/device/paicard) && machine_flags & WIREJACK)
for(var/mob/M in O)
@@ -698,14 +692,14 @@ Class Procs:
component_parts -= A
component_parts += B
B.loc = null
- to_chat(user, "[A.name] replaced with [B.name].")
+ to_chat(user, "[A.name] replaced with [B.name].")
shouldplaysound = 1 //Only play the sound when parts are actually replaced!
break
RefreshParts()
else
- to_chat(user, "Following parts detected in the machine:")
+ to_chat(user, "Following parts detected in the machine:")
for(var/var/obj/item/C in component_parts)
- to_chat(user, " [C.name]")
+ to_chat(user, " [C.name]")
if(shouldplaysound)
W.play_rped_sound()
return 1