Merge pull request #35542 from ShizCalev/free-spam-removal
Cleans up some duplicate canusetopic warnings
This commit is contained in:
committed by
CitadelStationBot
parent
86f27dd5e8
commit
5dc3549801
@@ -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, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -172,7 +172,6 @@
|
||||
if(!briefcase || !usr.can_hold_items())
|
||||
return
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] starts closing [src]...</span>", "<span class='notice'>You start closing [src]...</span>")
|
||||
if(do_after(usr, 30, target = usr))
|
||||
|
||||
@@ -226,10 +226,7 @@
|
||||
|
||||
/obj/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(unique_reskin && !current_skin && in_range(user,src))
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(unique_reskin && !current_skin && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
reskin_obj(user)
|
||||
|
||||
/obj/proc/reskin_obj(mob/M)
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
|
||||
if(istype(L))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
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, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] grabs \the [src.name].</span>", "<span class='notice'>You grab \the [src.name].</span>")
|
||||
var/C = new item_chair(loc)
|
||||
|
||||
@@ -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, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!isnull(new_angle))
|
||||
setAngle(SIMPLIFY_DEGREES(new_angle))
|
||||
|
||||
@@ -94,8 +94,10 @@
|
||||
|
||||
/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
if(incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
if(be_close && !in_range(M, src))
|
||||
to_chat(src, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -245,7 +245,6 @@ BLIND // can't see anything
|
||||
return 1
|
||||
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
else
|
||||
if(attached_accessory)
|
||||
|
||||
@@ -724,11 +724,13 @@
|
||||
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
if(incapacitated() || lying )
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
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, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -787,13 +787,15 @@
|
||||
|
||||
/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
if(incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
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, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
if(!no_dextery)
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return FALSE
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/can_use_guns(obj/item/G)
|
||||
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
|
||||
|
||||
@@ -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, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
if(be_close && !in_range(M, src))
|
||||
to_chat(src, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
return can_see(M) //stop AIs from leaving windows open and using then after they lose vision
|
||||
|
||||
|
||||
@@ -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, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -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, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
if(be_close && !in_range(M, src))
|
||||
to_chat(src, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -377,11 +377,12 @@
|
||||
|
||||
/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
if(incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
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, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
if(!(no_dextery || dextrous))
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user