mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Simple bots now use a different snowflake method for all access. (#57861)
This commit is contained in:
@@ -560,8 +560,8 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
|
||||
//For giving the bot temporary all-access. This method is bad and makes me feel bad. Refactoring access to a component is for another PR.
|
||||
var/obj/item/card/id/all_access = new /obj/item/card/id/advanced/gold/captains_spare()
|
||||
|
||||
set_path(get_path_to(src, waypoint, 200, id=all_access))
|
||||
qdel(all_access)
|
||||
calling_ai = caller //Link the AI to the bot!
|
||||
ai_waypoint = waypoint
|
||||
|
||||
@@ -569,9 +569,9 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
var/end_area = get_area_name(waypoint)
|
||||
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.
|
||||
access_card.set_access(REGION_ACCESS_ALL_STATION) //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_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE) //if the bot is player controlled, they get the extra access for a limited time
|
||||
reset_access_timer_id = addtimer(CALLBACK (src, .proc/bot_reset), 60 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE) //if the bot is player controlled, they get the extra access for a limited time
|
||||
to_chat(src, "<span class='notice'><span class='big'>Priority waypoint set by [icon2html(calling_ai, src)] <b>[caller]</b>. Proceed to <b>[end_area]</b>.</span><br>[path.len-1] meters to destination. You have been granted additional door access for 60 seconds.</span>")
|
||||
if(message)
|
||||
to_chat(calling_ai, "<span class='notice'>[icon2html(src, calling_ai)] [name] called to [end_area]. [path.len-1] meters to destination.</span>")
|
||||
@@ -996,7 +996,7 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
// If we have any bonys player accesses, add them to our internal ID card.
|
||||
// If we have any bonus player accesses, add them to our internal ID card.
|
||||
if(length(player_access))
|
||||
access_card.add_access(player_access)
|
||||
diag_hud_set_botmode()
|
||||
|
||||
Reference in New Issue
Block a user