diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm index 0a985a69cc..c7c6b40754 100644 --- a/code/datums/components/rotation.dm +++ b/code/datums/components/rotation.dm @@ -90,7 +90,6 @@ /datum/component/simple_rotation/proc/default_can_user_rotate(mob/living/user, rotation_type) if(!istype(user) || !user.canUseTopic(parent, BE_CLOSE, NO_DEXTERY)) - to_chat(user, "You can't do that right now!") return FALSE return TRUE diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index e00e172e68..b292ae7a3f 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -172,7 +172,6 @@ if(!briefcase || !usr.can_hold_items()) return if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr))) - to_chat(usr, "You can't do that right now!") return usr.visible_message("[usr] starts closing [src]...", "You start closing [src]...") if(do_after(usr, 30, target = usr)) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 08df6e9481..e048599225 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -226,10 +226,7 @@ /obj/AltClick(mob/user) . = ..() - if(unique_reskin && !current_skin && in_range(user,src)) - if(user.incapacitated()) - to_chat(user, "You can't do that right now!") - return + if(unique_reskin && !current_skin && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) reskin_obj(user) /obj/proc/reskin_obj(mob/M) diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index b60849028a..120fe15a00 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -37,7 +37,6 @@ if(istype(L)) if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user))) - to_chat(user, "You can't do that right now!") return FALSE else return TRUE @@ -226,7 +225,6 @@ if(!item_chair || !usr.can_hold_items() || has_buckled_mobs() || src.flags_1 & NODECONSTRUCT_1) return if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr))) - to_chat(usr, "You can't do that right now!") return usr.visible_message("[usr] grabs \the [src.name].", "You grab \the [src.name].") var/C = new item_chair(loc) diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index 3d9789785c..a6e8135dc5 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -161,7 +161,6 @@ return FALSE var/new_angle = input(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle) as null|num if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user))) - to_chat(user, "You can't do that right now!") return if(!isnull(new_angle)) setAngle(SIMPLIFY_DEGREES(new_angle)) diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm index 3ad71af961..6f448a28fb 100644 --- a/code/modules/antagonists/devil/true_devil/_true_devil.dm +++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm @@ -94,8 +94,10 @@ /mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) if(incapacitated()) + to_chat(src, "You can't do that right now!") return FALSE if(be_close && !in_range(M, src)) + to_chat(src, "You are too far away!") return FALSE return TRUE diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 0ea1328299..26c20d0082 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -245,7 +245,6 @@ BLIND // can't see anything return 1 if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) - to_chat(user, "You can't do that right now!") return else if(attached_accessory) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 94d1cfef91..d59c3cfba2 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -724,11 +724,13 @@ /mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=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))) if(tkMaxRangeCheck(src, M)) return TRUE + to_chat(src, "You are too far away!") return FALSE return TRUE diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f4c14ab353..0a89ad1f11 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -787,13 +787,15 @@ /mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) if(incapacitated()) + to_chat(src, "You can't do that right now!") return FALSE - if(no_dextery) - if(be_close && in_range(M, src)) - return TRUE - else + if(be_close && !in_range(M, src)) + to_chat(src, "You are too far away!") + return FALSE + if(!no_dextery) to_chat(src, "You don't have the dexterity to do this!") - return FALSE + return FALSE + return TRUE /mob/living/proc/can_use_guns(obj/item/G) if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser()) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 7056239121..f11b7af88b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -798,8 +798,10 @@ /mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) if(control_disabled || incapacitated()) + to_chat(src, "You can't do that right now!") return FALSE if(be_close && !in_range(M, src)) + to_chat(src, "You are too far away!") return FALSE return can_see(M) //stop AIs from leaving windows open and using then after they lose vision diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index cd6cbebbda..3d78830a54 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -186,6 +186,7 @@ /mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) if(be_close && !in_range(M, src)) + to_chat(src, "You are too far away!") return FALSE return TRUE diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index bc170eff68..474bd6669d 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -875,8 +875,10 @@ /mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) if(stat || lockcharge || low_power_mode) + to_chat(src, "You can't do that right now!") return FALSE if(be_close && !in_range(M, src)) + to_chat(src, "You are too far away!") return FALSE return TRUE diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 631e4589d6..61105fc046 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -377,11 +377,12 @@ /mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) if(incapacitated()) + to_chat(src, "You can't do that right now!") return FALSE - if(no_dextery || dextrous) - if(be_close && !in_range(M, src)) - return FALSE - else + if(be_close && !in_range(M, src)) + to_chat(src, "You are too far away!") + return FALSE + if(!(no_dextery || dextrous)) to_chat(src, "You don't have the dexterity to do this!") return FALSE return TRUE diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 955f7e5810..2a6c92752a 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -124,39 +124,28 @@ . = ..() /obj/item/pen/afterattack(obj/O, mob/living/user, proximity) - //Changing Name/Description of items. Only works if they have the 'unique_rename' var set - if(isobj(O) && proximity) - if(O.obj_flags & UNIQUE_RENAME) - var/penchoice = input(user, "What would you like to edit?", "Rename or change description?") as null|anything in list("Rename","Change description") - if(!QDELETED(O) && user.canUseTopic(O, BE_CLOSE)) - - if(penchoice == "Rename") - var/input = stripped_input(user,"What do you want to name \the [O.name]?", ,"", MAX_NAME_LEN) - var/oldname = O.name - if(!QDELETED(O) && user.canUseTopic(O, BE_CLOSE)) - if(oldname == input) - to_chat(user, "You changed \the [O.name] to... well... \the [O.name].") - return - else - O.name = input - to_chat(user, "\The [oldname] has been successfully been renamed to \the [input].") - return - else - to_chat(user, "You are too far away!") - - if(penchoice == "Change description") - var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100) - if(!QDELETED(O) && user.canUseTopic(O, BE_CLOSE)) - O.desc = input - to_chat(user, "You have successfully changed \the [O.name]'s description.") - return - else - to_chat(user, "You are too far away!") - else - to_chat(user, "You are too far away!") + //Changing Name/Description of items. Only works if they have the 'unique_rename' flag set + if(isobj(O) && proximity && (O.obj_flags & UNIQUE_RENAME)) + var/penchoice = input(user, "What would you like to edit?", "Rename or change description?") as null|anything in list("Rename","Change description") + if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE)) + return + if(penchoice == "Rename") + var/input = stripped_input(user,"What do you want to name \the [O.name]?", ,"", MAX_NAME_LEN) + var/oldname = O.name + if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE)) return - else - return + if(oldname == input) + to_chat(user, "You changed \the [O.name] to... well... \the [O.name].") + else + O.name = input + to_chat(user, "\The [oldname] has been successfully been renamed to \the [input].") + + if(penchoice == "Change description") + var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100) + if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE)) + return + O.desc = input + to_chat(user, "You have successfully changed \the [O.name]'s description.") /* * Sleepypens