mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Fixes to SNPCs
* Fixes two runtimes (stat menu and taking a delegate/assistant) * Fixes SNPCs not being inserted into the NPCPool * Makes the NPCPool fire more often for maximum robustness.
This commit is contained in:
@@ -2,7 +2,7 @@ var/datum/subsystem/npcpool/SSbp
|
||||
|
||||
/datum/subsystem/npcpool
|
||||
name = "NPCPool"
|
||||
priority = 27
|
||||
priority = 100
|
||||
|
||||
var/list/canBeUsed = list()
|
||||
var/list/canBeUsed_non = list()
|
||||
@@ -23,7 +23,7 @@ var/datum/subsystem/npcpool/SSbp
|
||||
|
||||
|
||||
/datum/subsystem/npcpool/stat_entry()
|
||||
stat(name, "[round(cost,0.001)]ds (CPU:[round(cpu,1)]%) (T:[botPool_l.len + botPool_l_non] | D: [needsDelegate.len] | A: [needsAssistant.len + needsHelp_non.len] | U: [canBeUsed.len + canBeUsed_non.len])")
|
||||
stat(name, "[round(cost,0.001)]ds (CPU:[round(cpu,1)]%) (T:[botPool_l.len + botPool_l_non.len] | D: [needsDelegate.len] | A: [needsAssistant.len + needsHelp_non.len] | U: [canBeUsed.len + canBeUsed_non.len])")
|
||||
|
||||
|
||||
/datum/subsystem/npcpool/fire()
|
||||
@@ -76,9 +76,10 @@ var/datum/subsystem/npcpool/SSbp
|
||||
var/facCount = 0
|
||||
var/helpProb = 0
|
||||
for(var/C in check.faction)
|
||||
if(candidate.faction[facCount] == C)
|
||||
helpProb = min(100,helpProb + 25)
|
||||
facCount++
|
||||
for(var/D in candidate.faction)
|
||||
if(D == C)
|
||||
helpProb = min(100,helpProb + 25)
|
||||
facCount++
|
||||
if(facCount == 1 && helpProb > 0)
|
||||
helpProb = 100
|
||||
if(prob(helpProb))
|
||||
@@ -94,9 +95,10 @@ var/datum/subsystem/npcpool/SSbp
|
||||
var/facCount = 0
|
||||
var/helpProb = 0
|
||||
for(var/C in check.faction)
|
||||
if(candidate.faction[facCount] == C)
|
||||
helpProb = min(100,helpProb + 10)
|
||||
facCount++
|
||||
for(var/D in candidate.faction)
|
||||
if(D == C)
|
||||
helpProb = min(100,helpProb + 25)
|
||||
facCount++
|
||||
if(facCount == 1 && helpProb > 0)
|
||||
helpProb = 100
|
||||
if(prob(helpProb))
|
||||
|
||||
@@ -196,6 +196,8 @@
|
||||
if(TRAITS & TRAIT_THIEVING)
|
||||
slyness = 75
|
||||
|
||||
SSbp.insertBot(src)
|
||||
|
||||
|
||||
/mob/living/carbon/human/interactive/attack_hand(mob/living/carbon/human/M as mob)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user