diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 856afafb25d..cb0f29d2fbc 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -537,19 +537,16 @@ Pass a positive integer as an argument to override a bot's default speed.
bot_reset() //Reset a bot before setting it to call mode.
var/area/end_area = get_area(waypoint)
- //For giving the bot temporary all-access.
- var/obj/item/card/id/all_access = new /obj/item/card/id
var/datum/job/captain/All = new/datum/job/captain
- all_access.access = All.get_access()
+ access_card.access = All.get_access() // Give the bot temporary all access
- set_path(get_path_to(src, waypoint, /turf/proc/Distance_cardinal, 0, 200, id=all_access))
+ set_path(get_path_to(src, waypoint, /turf/proc/Distance_cardinal, 0, 200, id = access_card))
calling_ai = caller //Link the AI to the bot!
ai_waypoint = waypoint
if(path && path.len) //Ensures that a valid path is calculated!
if(!on)
turn_on() //Saves the AI the hassle of having to activate a bot manually.
- access_card = all_access //Give the bot all-access while under the AI's command.
if(client)
reset_access_timer_id = addtimer(CALLBACK (src, .proc/bot_reset), 600, TIMER_OVERRIDE|TIMER_STOPPABLE) //if the bot is player controlled, they get the extra access for a limited time
to_chat(src, "Priority waypoint set by [calling_ai] [caller]. Proceed to [end_area.name].
[path.len-1] meters to destination. You have been granted additional door access for 60 seconds.")
@@ -562,6 +559,7 @@ Pass a positive integer as an argument to override a bot's default speed.
if(message)
to_chat(calling_ai, "Failed to calculate a valid route. Ensure destination is clear of obstructions and within range.")
calling_ai = null
+ access_card.access = prev_access // Don't forget to reset it
set_path(null)
/mob/living/simple_animal/bot/proc/call_mode() //Handles preparing a bot for a call, as well as calling the move proc.