[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 05:19:25 +01:00
committed by GitHub
parent 7305d12d29
commit f8f2abb11f
209 changed files with 455 additions and 354 deletions
@@ -251,7 +251,7 @@
if (!input_message || !sending_and_receiving)
return
if(!user.canUseTopic(computer, be_close = TRUE))
if(!user.can_perform_action(computer))
return
return sanitize(input_message)
@@ -423,7 +423,7 @@
if(computer.active_program != src)
if(!computer.open_program(usr, src))
return
if(!href_list["close"] && usr.canUseTopic(computer, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
if(!href_list["close"] && usr.can_perform_action(computer, FORBID_TELEKINESIS_REACH))
switch(href_list["choice"])
if("Message")
send_message(usr, list(locate(href_list["target"])))