Skip to content

Commit

Permalink
[MIRROR] Fix telekinesis being unable to open doors [MDB IGNORE] (#338)
Browse files Browse the repository at this point in the history
* Fix telekinesis being unable to open doors

* Update access.dm

---------

Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2023
1 parent 2d280b1 commit 380cc8b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions code/modules/jobs/access.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
//returns TRUE if this mob has sufficient access to use this object

//
/**
* Returns TRUE if this mob has sufficient access to use this object
*
* * accessor - mob trying to access this object, !!CAN BE NULL!! because of telekiesis because we're in hell
*/
/obj/proc/allowed(mob/accessor)
var/result_bitflags = SEND_SIGNAL(src, COMSIG_OBJ_ALLOWED, accessor)
if(result_bitflags & COMPONENT_OBJ_ALLOW)
return TRUE
if(result_bitflags & COMPONENT_OBJ_DISALLOW) // override all other checks
return FALSE
if(HAS_TRAIT(accessor, TRAIT_ALWAYS_NO_ACCESS))
if(!isnull(accessor) && HAS_TRAIT(accessor, TRAIT_ALWAYS_NO_ACCESS))
return FALSE
//check if it doesn't require any access at all
if(check_access(null))
return TRUE
if(!istype(accessor)) //likely a TK user.
if(isnull(accessor)) //likely a TK user.
return FALSE
if(issilicon(accessor))
if(ispAI(accessor))
Expand Down

0 comments on commit 380cc8b

Please sign in to comment.