mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +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:
@@ -91,7 +91,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
|
||||
///Toggles the tracking for the gps
|
||||
/datum/component/gps/item/proc/toggletracking(mob/user)
|
||||
if(!user.canUseTopic(parent, be_close = TRUE))
|
||||
if(!user.can_perform_action(parent))
|
||||
return //user not valid to use gps
|
||||
if(emped)
|
||||
to_chat(user, span_warning("It's busted!"))
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
if(user.mind.holy_role != HOLY_ROLE_HIGHPRIEST)
|
||||
to_chat(user, "<span class='warning'>You are not the high priest, and therefore cannot select a religious sect.")
|
||||
return
|
||||
if(!user.canUseTopic(parent, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
if(!user.can_perform_action(parent, FORBID_TELEKINESIS_REACH))
|
||||
to_chat(user,span_warning("You cannot select a sect at this time."))
|
||||
return
|
||||
if(GLOB.religious_sect)
|
||||
@@ -152,7 +152,7 @@
|
||||
if(performing_rite)
|
||||
to_chat(user, "<span class='notice'>There is a rite currently being performed here already.")
|
||||
return
|
||||
if(!user.canUseTopic(parent, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
if(!user.can_perform_action(parent, FORBID_TELEKINESIS_REACH))
|
||||
to_chat(user,span_warning("You are not close enough to perform the rite."))
|
||||
return
|
||||
performing_rite = new path(parent)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
AfterRotation.Invoke(user, degrees)
|
||||
|
||||
/datum/component/simple_rotation/proc/CanUserRotate(mob/user, degrees)
|
||||
if(isliving(user) && user.canUseTopic(parent, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
if(isliving(user) && user.can_perform_action(parent, NEED_DEXTERITY))
|
||||
return TRUE
|
||||
if((rotation_flags & ROTATION_GHOSTS_ALLOWED) && isobserver(user) && CONFIG_GET(flag/ghost_interaction))
|
||||
return TRUE
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
var/mob/living/living = movee
|
||||
|
||||
//Check if we can interact with stuff (checks for alive, arms, stun, etc)
|
||||
if(!living.canUseTopic(living, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE, need_hands = TRUE))
|
||||
if(!living.can_perform_action(living, FORBID_TELEKINESIS_REACH|NEED_HANDS))
|
||||
return NOT_HOLDING_ON
|
||||
|
||||
if(living.buckled)
|
||||
|
||||
Reference in New Issue
Block a user