Closed Nifle-CGE closed 3 weeks ago
Might be related to #406
Thanks I'll try to get this solved tonight.
I was refactoring faction manager the other day and I tried my best not to change anything material, but I might have scuffed it
Digging into this now. It looks like the bug is because it inserted the NF purchases too high in the list:
Augmentations should be purchased from most expensive to cheapest (except when a "dependency" needs to be purchased before its more expensive successor augmentation).
Here we can see that the final purchase order places NF before nextSENS Gene Modification, but it should definitely be after. This might account for the higher final price than expected.
Figured it out. The cause was "The Red Pill" (free) being cheaper than neuroflux.
When adding NF to the purchase list, I have this logic to insert NF above any augs cheaper than NF (The red pill):
This would work fine, except for some reason, I also implemented this feature a different way, by temporarily removing augs from the purchase list, and then re-adding them at the end: ...
Either one of these implementations on their own would have been fine, but with both, the effect is it's moved up one position more than it should have been 🤦♂️
Actually, I fixed the above and it still didn't work. Certainly, the logic to remove "free" augmentations shouldn't be necessary, since it's taken care of by the insert logic, but there's another problem here:
I'm counting how many augmentations are cheaper than NF, and using that count to decide how far up the list to insert them. What I don't take into account are prerequisites that are cheaper, yes, but they've been inserted higher up the list because they are a prerequisite to a more expensive augmentation.
So the real fix is to not count all cheaper augs, just cheaper augs from the end of the list (until a more expensive aug is encountered)
I got this error while ascending, it stops all the scripts and i have to rerun autopilot and it does the same. Context : BN 11.3
bitburnerSave_1729942446_BN11x3.json.gz
to reproduce:
auto-on