From cdc3e5c174812bfcef950b1230e7080418e82ad7 Mon Sep 17 00:00:00 2001 From: GunHog Date: Thu, 7 May 2015 08:42:31 -0500 Subject: [PATCH] Removes bots from NPC Pool It was causing unexpected and buggy behavior with certain bots, and has been tossed in the bin along with radio code. --- code/controllers/subsystem/npcpool.dm | 34 +-------------------------- code/game/machinery/bots/bots.dm | 1 - 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/code/controllers/subsystem/npcpool.dm b/code/controllers/subsystem/npcpool.dm index 55a11252c35..7226ad211b3 100644 --- a/code/controllers/subsystem/npcpool.dm +++ b/code/controllers/subsystem/npcpool.dm @@ -15,13 +15,10 @@ var/datum/subsystem/npcpool/SSbp /datum/subsystem/npcpool/proc/insertBot(var/toInsert) if(istype(toInsert,/mob/living/carbon/human/interactive)) botPool_l |= toInsert - else if(istype(toInsert,/obj/machinery/bot)) - botPool_l_non |= toInsert /datum/subsystem/npcpool/New() NEW_SS_GLOBAL(SSbp) - /datum/subsystem/npcpool/stat_entry() ..("T:[botPool_l.len + botPool_l_non.len]|D:[needsDelegate.len]|A:[needsAssistant.len + needsHelp_non.len]|U:[canBeUsed.len + canBeUsed_non.len]") @@ -36,21 +33,6 @@ var/datum/subsystem/npcpool/SSbp // 5. Do all assignments: goes through the delegated/coordianted bots and assigns the right variables/tasks to them. var/npcCount = 1 - //bot handling - for(var/obj/machinery/bot/check in botPool_l_non) - if(!check) - botPool_l_non.Cut(npcCount,npcCount+1) - continue - if(check.hacked) - needsHelp_non |= check - else if(check.frustration > 5) //average for most bots - needsHelp_non |= check - else if(check.mode == 0) - canBeUsed_non |= check - npcCount++ - - npcCount = 1 //reset the count - //SNPC handling for(var/mob/living/carbon/human/interactive/check in botPool_l) if(!check) @@ -116,18 +98,4 @@ var/datum/subsystem/npcpool/SSbp needsAssistant -= check canBeUsed -= candidate candidate.eye_color = "yellow" - npcCount++ - - if(needsHelp_non.len) - npcCount = 1 //reset the count - for(var/obj/machinery/bot/B in needsHelp_non) - if (!B) - needsHelp_non.Cut(npcCount,npcCount+1) - continue - if(canBeUsed_non.len) - var/obj/machinery/bot/candidate = pick(canBeUsed_non) - candidate.call_bot(B,get_turf(B),FALSE) - canBeUsed_non -= B - needsHelp_non -= candidate - npcCount++ - + npcCount++ \ No newline at end of file diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index 8af76442b14..ed60a26be70 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -104,7 +104,6 @@ /obj/machinery/bot/New() ..() SSbot.processing += src //Global bot list - SSbp.insertBot(src) botcard = new /obj/item/weapon/card/id(src) //This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first. botcard.access += access_robotics