Commit Graph

456 Commits

Author SHA1 Message Date
catloversg 8729dc3d1b MISC: Update messages related to text files (#2266) 2025-07-24 22:39:55 -07:00
catloversg fee75b44d4 BUGFIX: ns.mv writes to destination file even if it cannot delete source file (#2267) 2025-07-24 22:38:55 -07:00
Chris Farfan de los Godos 8f69a6c0ee COMMAND: Improving error message for mv when a script is Running
* Adjusted error message to include information about making sure scripts are not running when trying to use mv on them.

* nom run format

* Added behaviour info to NetscriptDefinitions.d.ts

* `npm run doc`

* un-nested/inversed the check

* `npm run format`
2025-07-23 16:27:01 -07:00
catloversg 6bf501fb78 API: Make some APIs throw error when server is invalid (#2261) 2025-07-23 14:20:20 -07:00
catloversg a794fddaf7 MISC: Add file metadata (timestamps) (#2199) 2025-06-16 16:34:06 -07:00
catloversg 2cabb98095 API: Rename BN multiplier RepToDonateToFaction to FavorToDonateToFaction (#2178) 2025-06-03 01:21:59 -07:00
catloversg 98f6cc9554 MISC: Make nuke and port cracking APIs return false instead of throwing error (#2153) 2025-05-31 21:28:50 -07:00
catloversg 296295b490 API: Add more enums to ns.enums (#2165) 2025-05-30 03:37:59 -07:00
catloversg 90555a64e6 MISC: Add achievements for BN14 (#2140) 2025-05-20 14:32:13 -07:00
catloversg 37d9284d33 MISC: Remove deprecated tail-related APIs (#2143) 2025-05-19 20:10:15 -07:00
G4mingJon4s 2b8c008be1 NETSCRIPT: Moved formatting functions to their own interface (#1635) 2025-05-14 09:13:35 -07:00
catloversg b53180ff1e MISC: Remove APIs that were deprecated a long time ago (#2088) 2025-05-10 22:10:48 -07:00
catloversg 31e6e4d74b MISC: Enforce stricter param check on ns.getBitNodeMultipliers and ns.hacknet.spendHashes (#2085) 2025-04-14 16:20:36 -07:00
Naga 0aaa28054a NETSCRIPT: Add functionality and support to fully allow Players to use IP addresses in place of hostnames (#1990) 2025-04-10 18:41:37 -07:00
Shy d28a06e764 API: dynamic imports with ns.dynamicImport() (#2036) 2025-04-09 18:49:01 -07:00
catloversg 41c497161f UI: Make BN-hint popups harder to be dismissed accidentally (#2021) 2025-03-22 23:59:38 -07:00
Naga b0165d5c2c NETSCRIPT: Store the value of Player.money in the returned object's moneyAvailable property when ns.getServer is called with "home" (#2024) 2025-03-12 18:17:57 -07:00
catloversg 4ef597bd37 BUGFIX: Some calculations return NaN due to Player.playtimeSinceLastAug being 0 in edge cases (#1985) 2025-03-01 09:06:58 -08:00
catloversg d6ee16cdb3 API: Move tail-related APIs to another namespace (#1935)
* API: Move tail-related APIs to another namespace

* Add missing RAM cost config

* Remove setTailFontSize from NS namespace
2025-02-01 21:43:56 -08:00
catloversg 2965f51879 API: Add a way to get the list of all factions (#1457) 2025-01-28 10:40:11 -08:00
G4mingJon4s ffae0045a4 CODINGCONTRACT: Add support for other answer formats (#1892) 2025-01-26 09:35:04 -08:00
catloversg b161142796 API: Add ns.renderTail (#1815) 2025-01-25 09:14:45 -08:00
catloversg 9bf408221c CODEBASE: Merge TypeAssertion files (#1922) 2025-01-24 11:06:39 -08:00
Yichi Zhang e6a1c344d3 NETSCRIPT: Log script kill immediately and identify the killing script. (#1907) 2025-01-12 21:07:01 -08:00
catloversg 8c19165323 BUGFIX: Grow log shows invalid values in edge cases (#1872) 2025-01-08 18:48:45 -08:00
catloversg 1cb2a83b4f UI: Share RAM to boost reputation gain (#1862) 2025-01-07 22:35:29 -08:00
G4mingJon4s c622291eff NETSCRIPT: Added changing tail font size through scripts (#1852) 2025-01-04 16:51:13 -08:00
nanogyth 85fa15c5a5 BUGFIX: update weaken results to correctly reflect change when close to minSecurity (#1887) 2024-12-29 18:08:55 -08:00
Jon Hartnett 99aeecbd0e BUGFIX: Fix ramOverride check (#1787)
ramOverride currently prevents you from actually using exactly all of a server's memory due to a bug in the ram check. Simply replace ">=" with ">" to allow the new ram to equal the max ram.

Test script:
```js
/** @param {NS} ns */
export async function main(ns) {
  ns.tprint(ns.ramOverride(8));
}
```
Expected output (on fresh save):
```js
8
```
Output before this commit:
```js
1.6
```
2024-11-20 12:47:55 -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 72a63b15cb API: Return active SF levels in getOwnedSourceFiles and ResetInfo.ownedSF (#1761)
* DOCUMENTATION: Clarify getOwnedSourceFiles when player overrides active levels of SFs
* Return Player.activeSourceFiles instead of Player.sourceFiles
* Get rid of zeroes in the map
2024-11-10 22:56:57 -08:00
catloversg 650cf51acb DOCUMENTATION: Add more information for deprecated nFormat API (#1762) 2024-11-10 16:27:35 -08:00
catloversg f6502dd490 CODEBASE: Fix lint errors 1 (#1732) 2024-11-03 22:35:14 -08:00
David Walker 424ae160ba NETSCRIPT: Fix dynamicRamUsage returned by getRunningScript() (#1704)
Fixes #1700
2024-10-20 00:52:57 -07:00
G4mingJon4s 651b17739c NETSCRIPT: Add ns.self() as a free info function (#1636)
* added utility info

* moved info to running script

* fix for RAM cost

* description changes

Co-authored-by: David Walker <d0sboots@gmail.com>

* fixed wrong formatting

* Added parent to ignored fields

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2024-09-07 17:34:24 -07:00
catloversg 94eef8ecde BUGFIX: Fix inconsistencies of error handling in promise-based API (#1377) 2024-08-17 14:23:08 -07:00
David Walker 34db6e8b26 NETSCRIPT: Rework disableLog for efficiency (#1589)
The current implementation was naive; disableLog("ALL") was storing a
key for every function, and iterating over a different object to do it
(when iterating over objects is quite slow).

The common cases of Bitburner (and especially batching, where efficiency
matters most) are either never disabling anything, or disabling "ALL".
This optimizes for these two cases, at the expense of slightly more
complicated code to deal with the less-common edge cases.
2024-08-16 19:10:20 -07:00
catloversg e5a63b4116 MISC: Fix typos in NetscriptDefinitions.d.ts (#1546) 2024-08-04 13:09:50 -07:00
catloversg 1b9676c68e MISC: Clarify deprecation warning of ns.getTimeSinceLastAug() (#1535) 2024-08-04 00:01:34 -07:00
catloversg 783120c886 FEATURE: BitNode options (#1411) 2024-07-14 14:30:30 -07:00
David Walker 9c9a69f2e2 NETSCRIPT: Add ramOverride() function (#1346)
This adds a way to dynamically change the static RAM limit of a script,
which is also its current RAM usage. This makes it possible for scripts
to dynamically change their memory footprint, opening up new strategies
beyond current ram-dodging.

Calling functions still permanently increases the *dynamic* memory
limit; RAM-dodging is still the optimal strategy for avoiding RAM costs,
in that sense.

This also adds dynamicRamUsage to the info returned by
`getRunningScript`, to allow introspection on the currently needed ram.
2024-06-28 18:42:20 -07:00
David Walker 1c20a24079 MISC: Make spawn able to have 0 delay (#1333)
This eliminates a hole where spawn was unrelaible, because other scripts
could jump in and steal the RAM. It's not an API break, because 0 used
to be an invalid value.
2024-06-28 18:41:41 -07:00
catloversg fd8eae5cf5 MISC: Cancel spawned scripts in Bitverse (#1429) 2024-06-24 22:20:08 -07:00
catloversg 70383d9085 MISC: Change error message when spawning on an invalid server (#1370) 2024-06-07 13:23:04 -07:00
Michael Ficocelli ed59f325ef IPVGO: Ensure full name of method is recorded in the possibleLogs list, to be matched later (#1207) 2024-04-09 18:24:57 -07:00
catloversg fc8958af83 MISC: Remove jquery (#1167)
Changes wget, which was the only thing using it.
2024-03-20 14:20:29 -07:00
FoGsesipod 25ac8432fc BUGFIX: spawn() log reads "seconds" instead of "milliseconds" (#1158) 2024-03-11 15:25:02 -07:00
Snarling d61e12fdd1 API: Minor followup changes for #1059 (#1135) 2024-03-05 19:42:55 -05:00
Shy 4aaf845fca API: make ns.atExit add the callback to an array instead of setting it (#1059) 2024-03-05 19:22:45 -05:00
Snarling 4f4c6fe7e5 Move heart.break out of Extra.ts (#1133) 2024-03-04 18:36:14 -05:00