Commit Graph

66 Commits

Author SHA1 Message Date
catloversg 329fdc50fb CODEBASE: Follow-up of infil refactor #2316 (#2393) 2025-11-22 23:08:15 -08:00
David Walker 4d230c3121 REFACTOR: Rewrite infiltration to pull state out of React (#2316)
* REFACTOR: Rewrite infiltration to pull state out of React

Upcoming projects (auto-infil, the possibility of making infil a work
task, etc.) require infiltration state to transition with predictable
timing and be under our control, instead of inside React. This refactor
accomplishes this by pulling the state out into accompanying model
classes.

After this, infiltration can theoretically run headless (without UI),
although it doesn't actually, and you would quickly be
hospitalized due to failing all the minigames.

There should be no user-visible changes, aside from the progress-bars
scrolling much more smoothly.

* Fix console warning in InfiltrationRoot

It turns out true isn't actually a safe value to use in JSX, only false works.

* Fix up some comments
2025-11-16 22:55:06 -08:00
catloversg 90555a64e6 MISC: Add achievements for BN14 (#2140) 2025-05-20 14:32:13 -07:00
G4mingJon4s b61e93b246 CODINGCONTRACT: Move internals to a separate folder (#1932) 2025-02-11 22:04:23 -08:00
catloversg de6b202341 CODEBASE: Refactor Player.applyForJob (#1947) 2025-02-02 09:29:18 -08:00
catloversg 75cf9c88b5 CODEBASE: Fix lint errors 3 (#1758)
This is a really big refactor because it actually *fixes* a lot of the lint errors instead of disabling them.
2024-11-14 08:18:57 -08:00
catloversg f6502dd490 CODEBASE: Fix lint errors 1 (#1732) 2024-11-03 22:35:14 -08:00
catloversg 9db1084b16 MISC: Cancel infiltration when player is hospitalized (#1579) 2024-08-14 22:20:17 -07:00
catloversg 1a8dcad02b BUGFIX: Duplicated program in edge case (#1549) 2024-08-05 13:43:56 -07:00
catloversg eeac3f7dd1 BUGFIX: Duplicated augmentation when buying after grafting (#1536) 2024-08-04 13:11:00 -07:00
catloversg 783120c886 FEATURE: BitNode options (#1411) 2024-07-14 14:30:30 -07:00
Snarling b597746343 TRAVEL: Unify implementation for Player and Sleeves (and some followup for #1365) (#1439) 2024-06-26 20:46:50 -04:00
catloversg c0036b03d4 SINGULARITY: Allow being hospitalized while being busy (#1426) 2024-06-24 20:36:03 -07:00
catloversg a354867fc4 MISC: Refactor code of traveling and going to location (#1365) 2024-06-08 13:52:10 -07:00
Kelenius 653d531d0a Remove sleeve message when quitting job from a script (#1357) 2024-06-05 18:25:54 -04:00
catloversg 7bb36ec111 MISC: Refactor InvitationModal and AlertManager (#1287) 2024-05-22 21:43:31 -04:00
TheAimMan 8deb907b89 BUGFIX: Correct BN10 Sleeve starting Shock (#1285) 2024-05-17 13:31:40 -07:00
Snarling 373ced2efe GO: Various changes before 2.6.0 (#1120) 2024-02-26 08:05:10 -05:00
Michael Ficocelli 7ef12a0323 BITNODE: IPvGO territory control strategy game (#934) 2023-12-26 11:45:27 -05:00
Jesse Clark 28ef5df880 COMPANY: Much better job location interface (#927) 2023-12-18 07:23:47 -05:00
Jesse Clark 473217ef31 API: Programming-friendly interface to getFactionInviteRequirements (#953) 2023-12-16 04:27:22 -05:00
Sphyxis 79b0f83b5f DEVMENU: Easier to add/remove sleeves (#908) 2023-12-04 14:36:00 -05:00
Jesse Clark 7fc46649f9 FACTIONS: fix unstable display order (#920) 2023-12-03 04:06:30 -05:00
omuretsu e56e3dddf1 Fix stuff I broke in #910 2023-11-02 18:57:22 -04:00
Snarling 2997384403 FACTIONS: Followup changes for Rumors PR (#910) 2023-11-02 11:02:12 -04:00
Jesse Clark fdcb8306d9 FACTIONS: Add "Rumors" system for learning about faction join requirements (#888) 2023-11-02 10:20:24 -04:00
alutman 36a8b35cfb Prevent faction invitations appearing after prestige (#872) 2023-10-23 04:55:08 -04:00
Michael Ficocelli 62058a7f78 UI: Suppress confusing reputation-earned dialog on augment install (#739) 2023-08-28 15:12:13 -04:00
Snarling e2655793f4 TYPESAFETY: CompanyName (#650) 2023-07-11 09:23:17 -04:00
Snarling 48e7bd6471 CODEBASE: Follow-up for lint rules PR + address some eslint disables (#651) 2023-06-29 13:22:10 -04:00
Snarling 9a0a843ffc TYPESAFETY: FactionName (#644) 2023-06-25 22:53:35 -04:00
Snarling a4b826683e TYPESAFETY: Strict internal typing for AugmentationName (#608) 2023-06-16 17:52:42 -04:00
Snarling 6732549196 ENUMS: Initial Enum Helper rework + Reorganization (#596) 2023-06-12 00:34:20 -04:00
Snarling ebae35b1fb CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -04:00
Snarling e0272ad4af FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 10:26:57 -04:00
Snarling 0df984eea0 CODEBASE: Add Jsonable Map and Set types, move player.sourceFiles to a map (#473) 2023-04-18 03:19:45 -04:00
G4mingJon4s d01ba91654 SINGULARITY: Added aug and node identifiers (timestamps of last resets) (#472) 2023-04-12 13:13:42 -04:00
David Walker 8445af5f2b Moved Player initialization point (#452)
Now initialized as side effect in PlayerObject, instead of in Player file that is imported everywhere.
2023-03-29 00:30:27 -04:00
Snarling b4074328ec UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -05:00
Snarling fb1f95c26e VARIOUS: Various changes prior to release 2.2 (#271)
See PR #271 description
2022-12-29 20:28:53 -05:00
Snarling 5ff2cd5357 VERSION: Update game version to 2.2 (#240)
Includes some bug fixes:
* Fix sleeve shock internal/display discrepancy (0-100 vs 0-100)
* Special error message if ns function called without a this
* Change whitespace to pre-wrap for dialog box.
* Fix bug where idle sleeves do not consume cycles but still recover shock from those cycles. Now they do not recover during idle.
* attempted to tag commit as v2.2.0
2022-12-01 16:07:46 -05:00
Snarling 65cd14e33b DOC: Add ns documentation for possible sleeve tasks (#217)
* Add specific types for sleeve tasks
* Moved LocationName enum to overall enums file
* Add LocationName enum to those provided to player
* remove trailing s on CompanyPosNames enum (now CompanyPosName, in line with LocationName)
* Also regenerated all ns documentation. This leads to an expected error when checking for generated files, because PRs should not normally touch markdown files. Also leads to a lint failure in generated file bitburner.d.ts
* also removed some exporting from NetscriptDefinitions.d.ts for anything that wasn't imported somewhere else.
2022-11-20 12:07:22 -05:00
Snarling 8e0e0eaa88 NETSCRIPT: ns.sleeve.getSleeve added. getPlayer and getSleeve can both be used for formulas. (#200)
* BREAKING CHANGE: Removed getSleeveStats and getSleeveInformation because this info is provided by getSleeve in a more usable form.
* BREAKING CHANGE: Removed tor, inBladeburner, and hasCorporation fields from ns.getPlayer. Functionality still exists via added functions ns.hasTorRouter, ns.corporation.hasCorporation, and ns.bladeburner.inBladeburner.
* Separated ns definitions for Person, Sleeve, and Player interfaces with both Player and Sleeve just extending Person.
Added getSleeve, which provides a Sleeve object similar to getPlayer.
* Renamed the sleeve ns layer's interface as sleeve lowercase because of name conflict. todo: May move all the ns layers interface names to lowercase for consistency
* Added ns.formulas.work.crimeSuccessChance and reworked to allow both sleeve and player calculations.
* Removed internal Person.getIntelligenceBonus function which was just a wrapper for calculateIntelligenceBonus. Any use of the former in formulas creates a conflict where ns-provided Person objects throw an error.
* Renamed helpers.player to helpers.person for netscript person validation. Reduced number of fields validated due to Person being a smaller interface.
* Fixed bug in bladeburner where Player multipliers and int were being used no matter which person was performing the task
* Fixed leak of Player.jobs at ns.getPlayer
* Person / Player / Sleeve classes now implement the netscript equivalent interfaces. Netscript helper for person no longer asserts that it's a real Person class member, only that it's a Person interface. Functions that use netscript persons have been changed to expect just a person interface to prevent needing this incorrect type assertion.
2022-11-09 07:26:26 -05:00
Jakob002 c2ed9067e0 MISC: message formatting
Replaced someArray.toString() with someArray.join(", "). This will return "foo, bar, baz" (with spaces) instead of "foo,bar,baz" (no spaces).
2022-10-12 15:16:10 +02:00
Olivier Gagnon f4668b21ca functions to generate dummy contracts 2022-10-09 02:56:11 -04:00
Olivier Gagnon f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
Snarling aa80cf6451 See description
Reverted ToastVariant back to an enum internally. Still exposed to player as just possible strings.
Changed all 1-line documentation comments to actually be 1-line. Moved some because they were not providing documentation for the thing they were trying to.
2022-10-04 06:40:10 -04:00
Snarling 50f14b4f58 Commit1 2022-10-03 12:12:16 -04:00
Snarling 38063f62a7 build fix, lint, remove some instanceof checks 2022-09-27 16:09:32 -04:00
Snarling 557bc12562 More classes as types 2022-09-27 15:35:42 -04:00