fixes botkeeper displaying wrong states (#86786)

## About The Pull Request
bot modes werent correctly reflecting the bot's AI states. this pr fixes
that. also fixes some issues where the bot's AI might get stuck
inbetween switching modes

## Why It's Good For The Game
closes #86771

## Changelog
🆑
fix: botkeeper now displays bot's correct states!
/🆑
This commit is contained in:
Ben10Omintrix
2024-09-21 15:09:58 +02:00
committed by GitHub
parent 313d9cedf5
commit 51cc8d62dc
4 changed files with 16 additions and 6 deletions
+5 -2
View File
@@ -538,6 +538,7 @@ GLOBAL_LIST_INIT(command_strings, list(
/mob/living/basic/bot/proc/bot_reset(bypass_ai_reset = FALSE)
SEND_SIGNAL(src, COMSIG_BOT_RESET)
access_card.set_access(initial_access)
update_bot_mode(new_mode = src::mode)
diag_hud_set_botstat()
diag_hud_set_botmode()
clear_path_hud()
@@ -558,8 +559,7 @@ GLOBAL_LIST_INIT(command_strings, list(
// process control input
switch(command)
if("patroloff")
bot_reset() //HOLD IT!! //OBJECTION!!
set_mode_flags(bot_mode_flags & ~BOT_MODE_AUTOPATROL)
set_patrol_off()
if("patrolon")
set_mode_flags(bot_mode_flags | BOT_MODE_AUTOPATROL)
if("summon")
@@ -567,6 +567,9 @@ GLOBAL_LIST_INIT(command_strings, list(
if("ejectpai")
eject_pai_remote(user)
/mob/living/basic/bot/proc/set_patrol_off()
bot_reset()
set_mode_flags(bot_mode_flags & ~BOT_MODE_AUTOPATROL)
/mob/living/basic/bot/proc/bot_control_message(command, user)
if(command == "summon")