diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 0a1cd55d29c..34c89a4e9e2 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -81,8 +81,9 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level
-#define BE_CLOSE 1 //in the case of a silicon, to select if they need to be next to the atom
-#define NO_DEXTERY 1 //if other mobs (monkeys, aliens, etc) can use this
+#define BE_CLOSE TRUE //in the case of a silicon, to select if they need to be next to the atom
+#define NO_DEXTERY TRUE //if other mobs (monkeys, aliens, etc) can use this
+#define NO_TK TRUE
//used by canUseTopic()
//singularity defines
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 4468cc0ba6e..23ea2de6845 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -24,15 +24,13 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
- var/userloc = H.loc
-
//see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments!
//this is largely copypasted from there.
//handle facial hair (if necessary)
if(H.gender == MALE)
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list
- if(userloc != H.loc)
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return //no tele-grooming
if(new_style)
H.facial_hair_style = new_style
@@ -41,7 +39,7 @@
//handle normal hair
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list
- if(userloc != H.loc)
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return //no tele-grooming
if(new_style)
H.hair_style = new_style
@@ -90,9 +88,9 @@
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
- playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
+ playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
if(BURN)
- playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
+ playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
/obj/structure/mirror/magic
@@ -131,7 +129,7 @@
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes")
- if(!Adjacent(user))
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
switch(choice)
@@ -140,7 +138,7 @@
if(!newname)
return
- if(!Adjacent(user))
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
H.real_name = newname
H.name = newname
@@ -156,12 +154,14 @@
if(!newrace)
return
- if(!Adjacent(user))
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
H.set_species(newrace, icon_update=0)
if(H.dna.species.use_skintones)
var/new_s_tone = input(user, "Choose your skin tone:", "Race change") as null|anything in GLOB.skin_tones
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
+ return
if(new_s_tone)
H.skin_tone = new_s_tone
@@ -169,6 +169,8 @@
if(MUTCOLORS in H.dna.species.species_traits)
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
+ return
if(new_mutantcolor)
var/temp_hsv = RGBtoHSV(new_mutantcolor)
@@ -186,10 +188,10 @@
if("gender")
if(!(H.gender in list("male", "female"))) //blame the patriarchy
return
- if(!Adjacent(user))
- return
if(H.gender == "male")
if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
+ return
H.gender = "female"
to_chat(H, "Man, you feel like a woman!")
else
@@ -197,6 +199,8 @@
else
if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes")
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
+ return
H.gender = "male"
to_chat(H, "Whoa man, you feel like a man!")
else
@@ -207,12 +211,14 @@
if("hair")
var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
- if(!Adjacent(user))
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(hairchoice == "Style") //So you just want to use a mirror then?
..()
else
var/new_hair_color = input(H, "Choose your hair color", "Hair Color","#"+H.hair_color) as color|null
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
+ return
if(new_hair_color)
H.hair_color = sanitize_hexcolor(new_hair_color)
H.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK)
@@ -225,7 +231,7 @@
if(BODY_ZONE_PRECISE_EYES)
var/new_eye_color = input(H, "Choose your eye color", "Eye Color","#"+H.eye_color) as color|null
- if(!Adjacent(user))
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(new_eye_color)
H.eye_color = sanitize_hexcolor(new_eye_color)
diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm
index eb8b517070a..70ccc46e5f9 100644
--- a/code/modules/antagonists/devil/true_devil/_true_devil.dm
+++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm
@@ -94,7 +94,7 @@
visible_message("[src] easily breaks out of [p_their()] handcuffs!", \
"With just a thought your handcuffs fall off.")
-/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
if(incapacitated())
to_chat(src, "You can't do that right now!")
return FALSE
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 4b2823cbbc6..886b1c04110 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -731,7 +731,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
update_icon()
-/mob/dead/observer/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/dead/observer/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
return IsAdminGhost(usr)
/mob/dead/observer/is_literate()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 1aa0f03fd5e..edd1b8544bd 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -722,12 +722,12 @@
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000")
cut_overlay(MA)
-/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
if(incapacitated() || lying )
to_chat(src, "You can't do that right now!")
return FALSE
if(!Adjacent(M) && (M.loc != src))
- if((be_close == 0) || (dna.check_mutation(TK) && tkMaxRangeCheck(src, M)))
+ if((be_close == 0) || (!no_tk && (dna.check_mutation(TK) && tkMaxRangeCheck(src, M))))
return TRUE
to_chat(src, "You are too far away!")
return FALSE
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 9ab5aa1c128..d7b2e3b7856 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -792,7 +792,7 @@
/mob/living/proc/harvest(mob/living/user) //used for extra objects etc. in butchering
return
-/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
if(incapacitated())
to_chat(src, "You can't do that right now!")
return FALSE
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index e8a80fe948c..1bf46f6cc15 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -825,7 +825,7 @@
return TRUE
return ..()
-/mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
if(control_disabled || incapacitated())
to_chat(src, "You can't do that right now!")
return FALSE
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 896d8674bec..7fd861bfeb2 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -183,7 +183,7 @@
// See software.dm for Topic()
-/mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
if(be_close && !in_range(M, src))
to_chat(src, "You are too far away!")
return FALSE
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index d6da081d7d2..d4e0293007b 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -873,7 +873,7 @@
if(DISCONNECT) //Tampering with the wires
to_chat(connected_ai, "
NOTICE - Remote telemetry lost with [name].
")
-/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
if(stat || lockcharge || low_power_mode)
to_chat(src, "You can't do that right now!")
return FALSE
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index fcb201d0ad7..e43d838d37b 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -393,7 +393,7 @@
if(target)
return new childspawn(target)
-/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
if(incapacitated())
to_chat(src, "You can't do that right now!")
return FALSE
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 1aa89b45557..6912b8b81dd 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -766,7 +766,7 @@
return 0
//Can the mob use Topic to interact with machines
-/mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+/mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
return
/mob/proc/faction_check_mob(mob/target, exact_match)
diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm
index 20ad2214cf9..99d648d02ba 100644
--- a/code/modules/modular_computers/computers/item/processor.dm
+++ b/code/modules/modular_computers/computers/item/processor.dm
@@ -44,7 +44,7 @@
return machinery_computer.update_icon()
// This thing is not meant to be used on it's own, get topic data from our machinery owner.
-//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
+//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
// if(!machinery_computer)
// return 0