[MIRROR] Refactor, improve, and rename canUseTopic to be can_perform_action [MDB IGNORE] (#19391)

* Refactor, improve, and rename canUseTopic to be can_perform_action

* updoot

* https://github.com/tgstation/tgstation/pull/72876

https://github.com/tgstation/tgstation/pull/72876

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-10 04:19:25 +00:00
committed by GitHub
co-authored by Tim Gandalf
parent 7305d12d29
commit f8f2abb11f
209 changed files with 455 additions and 354 deletions
+1 -1
View File
@@ -115,7 +115,7 @@
updateDialog(usr) // make sure updates when complete
/datum/song/Topic(href, href_list)
if(!usr.canUseTopic(parent, be_close = TRUE, no_dexterity = FALSE, no_tk = FALSE, need_hands = FALSE, floor_okay = TRUE))
if(!usr.can_perform_action(parent, ALLOW_RESTING))
usr << browse(null, "window=instrument")
usr.unset_machine()
return
+3 -1
View File
@@ -20,7 +20,9 @@
if(!(anchored || can_play_unanchored) || !ismob(music_player))
return STOP_PLAYING
var/mob/user = music_player
if(!user.canUseTopic(src, FALSE, TRUE, FALSE, FALSE)) //can play with TK and while resting because fun.
if(!ISADVANCEDTOOLUSER(user))
to_chat(src, span_warning("You don't have the dexterity to do this!"))
return STOP_PLAYING
/obj/structure/musician/ui_interact(mob/user)