diff --git a/code/modules/jobs/access.dm b/code/modules/jobs/access.dm index 436a728e6ba99..9e92d060937c5 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -7,6 +7,8 @@ //check if it doesn't require any access at all if(src.check_access(null)) return TRUE + if(length(accessor.buckled_mobs) && handle_buckled_access(accessor)) + return TRUE if(issilicon(accessor)) var/mob/living/silicon/S = accessor return check_access(S.internal_id_card) //AI can do whatever it wants @@ -31,6 +33,15 @@ return TRUE return FALSE +/obj/proc/handle_buckled_access(mob/accessor) + . = FALSE + // check if someone riding on / buckled to them has access + for(var/mob/living/buckled in accessor.buckled_mobs) + if(accessor == buckled || buckled == src) // just in case to prevent a possible infinite loop scenario (but it won't happen) + continue + if(allowed(buckled)) + return TRUE + /obj/item/proc/GetAccess() return list()