Bot code improvement (2/??) (#62671)

This commit is contained in:
John Willard
2021-11-25 20:41:52 -08:00
committed by GitHub
parent ec695922d0
commit 03604bfb77
29 changed files with 603 additions and 610 deletions
@@ -37,7 +37,7 @@
for(var/B in GLOB.bots_list)
var/mob/living/simple_animal/bot/Bot = B
if(!Bot.on || Bot.z != zlevel || Bot.remote_disabled) //Only non-emagged bots on the same Z-level are detected!
if(!(Bot.bot_mode_flags & BOT_MODE_ON) || Bot.z != zlevel || !(Bot.bot_mode_flags & BOT_MODE_REMOTE_ENABLED)) //Only non-emagged bots on the same Z-level are detected!
continue
else if(computer) //Also, the inserted ID must have access to the bot type
var/obj/item/card/id/id_card = card_slot ? card_slot.stored_card : null
@@ -45,7 +45,7 @@
continue
else if(id_card && !Bot.bot_core.check_access(id_card))
continue
var/list/newbot = list("name" = Bot.name, "mode" = Bot.get_mode_ui(), "model" = Bot.model, "locat" = get_area(Bot), "bot_ref" = REF(Bot), "mule_check" = FALSE)
var/list/newbot = list("name" = Bot.name, "mode" = Bot.get_mode_ui(), "model" = Bot.bot_type, "locat" = get_area(Bot), "bot_ref" = REF(Bot), "mule_check" = FALSE)
if(Bot.bot_type == MULE_BOT)
var/mob/living/simple_animal/bot/mulebot/MULE = Bot
mulelist += list(list("name" = MULE.name, "dest" = MULE.destination, "power" = MULE.cell ? MULE.cell.percent() : 0, "home" = MULE.home_destination, "autoReturn" = MULE.auto_return, "autoPickup" = MULE.auto_pickup, "reportDelivery" = MULE.report_delivery, "mule_ref" = REF(MULE)))