mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[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:
@@ -30,7 +30,7 @@
|
||||
if(locked)
|
||||
to_chat(user, span_notice("The crate is locked with a Deca-code lock."))
|
||||
var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text|null
|
||||
if(user.canUseTopic(src, be_close = TRUE) && locked)
|
||||
if(user.can_perform_action(src) && locked)
|
||||
var/list/sanitised = list()
|
||||
var/sanitycheck = TRUE
|
||||
var/char = ""
|
||||
@@ -60,7 +60,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
if(!user.can_perform_action(src))
|
||||
return
|
||||
return attack_hand(user) //this helps you not blow up so easily by overriding unlocking which results in an immediate boom.
|
||||
|
||||
|
||||
@@ -60,12 +60,12 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list(
|
||||
transfer_fingerprints_to(M)
|
||||
|
||||
/obj/item/stack/marker_beacon/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
if(!istype(user) || !user.can_perform_action(src))
|
||||
return
|
||||
var/input_color = tgui_input_list(user, "Choose a color", "Beacon Color", GLOB.marker_beacon_colors)
|
||||
if(isnull(input_color))
|
||||
return
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
if(!istype(user) || !user.can_perform_action(src))
|
||||
return
|
||||
picked_color = input_color
|
||||
update_appearance()
|
||||
@@ -158,12 +158,12 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list(
|
||||
|
||||
/obj/structure/marker_beacon/AltClick(mob/living/user)
|
||||
..()
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
if(!istype(user) || !user.can_perform_action(src))
|
||||
return
|
||||
var/input_color = tgui_input_list(user, "Choose a color", "Beacon Color", GLOB.marker_beacon_colors)
|
||||
if(isnull(input_color))
|
||||
return
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
if(!istype(user) || !user.can_perform_action(src))
|
||||
return
|
||||
picked_color = input_color
|
||||
update_appearance()
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
return . | AFTERATTACK_PROCESSED_ITEM
|
||||
|
||||
/obj/item/organ/internal/monster_core/attack_self(mob/user)
|
||||
if (!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
if (!user.can_perform_action(src, FORBID_TELEKINESIS_REACH))
|
||||
return
|
||||
try_apply(user, user)
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
if(!user.can_perform_action(src))
|
||||
return
|
||||
if(panel_open)
|
||||
input_dir = turn(input_dir, -90)
|
||||
|
||||
Reference in New Issue
Block a user