mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
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.
This commit is contained in:
@@ -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++
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user