Open catloversg opened 2 weeks ago
High-level comments before I dive into the code:
I don't know if you've been following allong in #development, here's some other comments that came from discussion there:
New UI:
Advanced options are cleared when the player switches between targeted BitNodes. They are also not persisted in Settings. This is intentional. IMO, a minor inconvenience is better than "Oops! I forgot resetting those options!".
UI is starting to look pretty good, or at the minimum, good compared to many of our UIs XD
I agree with your reasoning on not saving the settings. Especially with the new-style of adding individual SFs.
Some other UI thoughts: We should add tooltips for the toggles. What, exactly, "Restrict home PC upgrade" entails isn't clear without extra words. Extra words can also make it clear that "Disable hacknet servers" means "Reenable hacknet nodes".
For the buttons, IMO we should do more graphically and less with text. I'm assuming "level" means "current owned level of this SF" - that should be expressed by number of buttons. (There's no point having a button you can't click on.) If you don't have the SF, you shouldn't be able to add it, and if you only have 1 level you only get one button.
Similarly, the currently active level should use a bright highlight or something - standard "button selected" stuff. That eliminates the need for the extra text and IMO will be easier to visually understand.
One other suggestion that I needed to read the code first to make: IIUC, the "Set all SF" button isn't a setting of its own, but rather it immediately creates/sets the SF setting for all possible values. It's not what I was initially expecting, but I think it's fine. However, in that case it should get an additional "X" or trashcan button to remove all SF settings so that the state is back to default.
Should there be a toggle to enter a BitNode with no Intelligence (without disabling SF5 features)? And how should the results merge with previous Intelligence?
A reasonable scenario for comparing speed-runs would be "How long does it take to complete BitNode N with all features unlocked and no starting Intelligence?" so disabling SF5 is not a great option as it removes Formulas.exe at start and Intelligence gain within the node, which are changes to strategy.
New UI:
UI changes:
Restrict Home PC upgrade
-> Restrict max RAM and core of Home PC
. Change the tooltip text.Disable Hacknet Server
: Change the tooltip text.Remove all
+ tooltip.Set all SF
.Should there be a toggle to enter a BitNode with no Intelligence (without disabling SF5 features)? And how should the results merge with previous Intelligence?
A reasonable scenario for comparing speed-runs would be "How long does it take to complete BitNode N with all features unlocked and no starting Intelligence?" so disabling SF5 is not a great option as it removes Formulas.exe at start and Intelligence gain within the node, which are changes to strategy.
I can add "Disable Intelligence bonus". That option will only disable the bonus of Intelligence (calculateIntelligenceBonus
). I'll add it if d0sboots and Snarling agree.
I can add "Disable Intelligence bonus". That option will only disable the bonus of Intelligence (calculateIntelligenceBonus). I'll add it if d0sboots and Snarling agree.
That seems like a good way to handle it: you still gain int (if applicable), it just has no effect. It might need a UI bit though, otherwise it'll look like you have normal int and won't be obvious that it's disabled. Maybe strikethrough where int is displayed?
I think @Snarling has yet to sign off on the overall design, but I would encourage him to (I'm not going to merge this one without some kind of thumbs up).
Snarling mentioned that they would release v2.6.2 soon. This PR is a bit large, so it's best to merge it after that. I want it to be tested in the dev branch for a bit longer.
This PR adds a new feature: BitNode options. When the player enters a BN, they can set custom BitNode options:
Intentional changes:
knowsAboutBitverse
is renamed toknowAboutBitverse
and moved toBitNodeUtils.ts
. It replaces all checks ofPlayer.sourceFiles.size > 0
.canAccessBitNodeFeature
is moved toBitNodeUtils.ts
. It replaces all checks ofPlayer.bitNodeN === n || Player.sourceFileLvl(n) > 0
.Player.sourceFileLvl
andPlayer.activeSourceFileLvl
are intentional.gainIntelligenceExp
: Removethis.skills.intelligence > 0
. This check comes from the ancient commit e3991b8795fc9bccd38240e17c99e6d20d53fd4f. It's irrelevant now. The player cannot earn intelligence exp if they are not in BN5 and do not have SF5.Sleeve.ts
andPerson.ts
: I moved functions in[X]Methods.ts
to[X].ts
when I started to implement thedisableSleeveExpAndAugmentation
option. That change is unnecessary now, so I will revert it if the maintainers want.Test case
Normal gameplay: Check SF level and active SF level after entering a new BN:
ns.singularity.destroyW0r1dD43m0n
.ns.singularity.b1tflum3
.Change active SF level:
Change boolean options:
ns.singularity.upgradeHomeRam
andns.singularity.upgradeHomeCores
.ns.stock.purchase4SMarketData
andns.stock.purchase4SMarketDataTixApi
.ns.formulas.work
.Screenshot