Commit Graph

170 Commits

Author SHA1 Message Date
Snarling
3a2e676c9b Move error functionality to new wrapper 2022-08-09 18:09:24 -04:00
Olivier Gagnon
326d9fd7ef Move player skills and exp to their struct 2022-07-26 23:54:17 -04:00
Olivier Gagnon
3e4f26ac0a allbuild commit e6d14eff 2022-07-26 15:30:12 -04:00
Aerophia
7c8c94d808
Add files via upload 2022-07-22 12:32:10 -05:00
Aerophia
c2ffb09514
Update Singularity.ts 2022-07-22 12:28:51 -05:00
Aerophia
1f918011dc
Update Singularity.ts 2022-07-22 12:16:48 -05:00
Aerophia
2ad978d8f4
Create Singularity.ts 2022-07-22 12:09:36 -05:00
Aerophia
dad4fcc25e
Update Singularity.ts 2022-07-22 12:09:01 -05:00
Aerophia
2907128291
Update Singularity.ts 2022-07-22 12:07:23 -05:00
Aerophia
757711ce5b
Update Singularity.ts 2022-07-22 10:29:40 -05:00
Olivier Gagnon
2d522ea1e6 allbuild commit e9254edf 2022-07-21 15:09:55 -04:00
hydroflame
a513a842e3
Merge pull request #3797 from Ansopedian/dev
BUGFIX: Singularity.goToLocation support for non-city-specific locations
2022-07-21 02:14:42 -04:00
Olivier Gagnon
43b8cfec5c fix test suite 2022-07-21 02:13:47 -04:00
Olivier Gagnon
4518eabc29 Remove some any and add getAugmentationBasePrice 2022-07-20 01:20:11 -04:00
Olivier Gagnon
83c26903c0 add argument for commitCrime focus 2022-07-19 22:30:07 -04:00
Olivier Gagnon
bb8af88b77 prep v2 2022-07-19 14:21:12 -04:00
Olivier Gagnon
5629c16def extract multipliers in its own type 2022-07-14 18:43:33 -04:00
Olivier Gagnon
0550bc188c refactor some stuff 2022-07-14 17:43:08 -04:00
Olivier Gagnon
fac6633347 remove so many fields and values used by the old system 2022-07-12 23:13:40 -04:00
Olivier Gagnon
f7805c4a51 convert faction work to new work system 2022-07-12 01:54:19 -04:00
Olivier Gagnon
606f1bf6c4 create program and grafting done 2022-07-10 01:37:36 -04:00
Olivier Gagnon
647392626e convert taking class ot new work system 2022-07-07 17:28:23 -04:00
Olivier Gagnon
24b6eb4d56 make workinprogress crime 2 digit precision 2022-07-07 02:03:02 -04:00
Staszek Welsh
395b583905 Add faction membership check to singularity.purchaseAugmentation 2022-07-04 23:44:58 +01:00
Ansopedian
d319b3f982 added singularity.goToLocation support for non-city-specific locations 2022-05-30 14:23:06 +02:00
Olivier Gagnon
6a2e5b06ad fix manualHack 2022-05-25 20:19:42 -04:00
Olivier Gagnon
76ccb0ba36 lint 2022-05-25 11:43:43 -04:00
Olivier Gagnon
0d437e5b73 lint 2022-05-20 18:20:04 -04:00
Olivier Gagnon
42dcbf889e fix typo 2022-05-20 17:28:21 -04:00
hydroflame
e3a0ae0407
Merge pull request #3617 from phyzical/hotfix/fix-augmentation-costs-rsponse
BUGFIX: getAugmentationCost response backwards
2022-05-13 11:07:48 -04:00
Snarling
99a0337a14 Dirty fix for available ram float errors
1MB added to available ram when checking if available is sufficient. All actual ram values in game are a multiple of 50MB so an extra 1MB can't ever allow additional script load to be ran.
2022-05-06 08:56:19 -04:00
phyzical
10c67ab363 refactor resulted in it being backwards 2022-05-06 16:35:07 +08:00
nickofolas
f45200b25e Implement ClassType and FactionWorkType enums 2022-05-04 14:18:12 -05:00
nickofolas
4a8e99b170 Refactor WorkType to an enum 2022-05-04 13:42:48 -05:00
hydroflame
44641fee07
Merge pull request #3544 from phyzical/feature/refactor-augmentation
REFACTOR:  augmentation cost, rep cost and level to be calculated in place
2022-05-04 12:08:24 -04:00
phyzical
711955c112 added logic to allow quitJob to be called from singularity 2022-04-28 19:05:56 +08:00
phyzical
00bb387036 few regressions from hydros changes 2022-04-23 10:34:41 +08:00
phyzical
cdfbda1379 merge dev 2022-04-23 10:26:51 +08:00
TheMas3212
7696f582eb
replace a number of references to workerscript.log with _ctx.log that i
missed in Singularity.ts
2022-04-15 21:23:35 +10:00
phyzical
82610c0c44 Merge branch 'feature/add-infiltration-faction' into feature/refactor-augmentation 2022-04-15 14:26:00 +08:00
phyzical
db97125d22 remove level, base cost and rep requirment from base augmentation obj
* added in place calculations for cost and level of augmentations given player context
* removed redundant logic for dynamically calculating cost,rep and level against the augmentation object
* replaced references to startingCost to baseCost as it is now always whatever it started at
2022-04-15 01:39:38 +08:00
phyzical
c3a3994658 rename augmentation to static augmentation 2022-04-15 01:19:51 +08:00
hydroflame
18a6477342
Merge pull request #3456 from TheMas3212/fix/3395
fix #3395 donating to special factions possible via singularity
2022-04-14 11:51:40 -04:00
TheMas3212
89baba2e24
fix #3395 donating to special factions possible via singularity 2022-04-15 01:32:18 +10:00
TheMas3212
a0cab9a163
Fix inconsistancy with trying to work for gang factions while running a gang 2022-04-15 00:35:51 +10:00
hydroflame
89f73d88d1
Merge pull request #3443 from TheMas3212/fix/singularity-sf4-checks
fix b1tflum3 and destroyW0r1dD43m0n singularity functions to check for sf4
2022-04-13 19:06:53 -04:00
TheMas3212
775d93b693
fix b1tflum3 and destroyW0r1dD43m0n singularity functions to check for
sf4, also refactored the file slightly for consistency to make sure the
sf4 check is the first thing every function does
2022-04-14 08:13:28 +10:00
Olivier Gagnon
88ae27e84d nerf investors fraud 2022-04-13 18:08:35 -04:00
Olivier Gagnon
9281cbe559 ns func to flume and destroy wd 2022-04-13 17:34:02 -04:00
Undeemiss
dfc2ca6669 Allowed ns.singularity.connect to connect to backdoored servers directly
Added some small comments for readability and added a new case to
ns.singularity.connect that allows connecting to backdoored servers
directly regardless of if the current server is adjacent to them.
2022-04-13 11:03:17 -05:00
Olivier Gagnon
f1a3fb7d3e fix buying programs and writing them at the same time. 2022-04-13 00:21:51 -04:00
TheMas3212
b2689eaa5a
Wrap Singularity API with wrapper
also refactored the RamCosts IMap as it didnt quite work properly due to
how the wrapper calculates function names
2022-04-12 16:51:10 +10:00
hydroflame
3f4d00a8c2
Merge pull request #3350 from phyzical/bugfix/3348
Fix for install augmentation stale objects bug
2022-04-11 20:05:46 -04:00
Olivier Gagnon
2b2af797a7 fmt and lint 2022-04-08 00:39:45 -04:00
Olivier Gagnon
a2dddb0e5a Fix soft reset not installing augs anymore 2022-04-08 00:28:37 -04:00
phyzical
a4e1b73b19 Merge branch 'dev' into bugfix/3348
# Conflicts:
#	src/Faction/FactionInfo.tsx
#	src/NetscriptFunctions/Singularity.ts
2022-04-07 16:17:28 +08:00
hydroflame
b6d68f7353
Merge branch 'dev' into bugfix/fix-tests 2022-04-06 20:16:51 -04:00
Qiyi Shan
b9caddeeef
Fix workForFaction invalid worktype case
When invalid work type, the function should return false instead of true
2022-04-05 11:22:02 -04:00
phyzical
dfe9e98c77 move route to terminal to the inside of the common fucntion
* tested without bandaid still works correctly
* fix default script with installAugmentations
2022-04-04 18:29:43 +08:00
phyzical
18af3f8413 moved updateRam to first call to avoid lack of mocks for tests
* added wrapper funcs to simplify updateRam
* added static parser tests and skiped what isnt worker still for next person to try and fix
2022-03-31 21:41:19 +08:00
nickofolas
73af73fdb4 Merge branch 'dev' of github.com:danielyxie/bitburner into improvement/filter-helper-func 2022-03-30 14:35:27 -04:00
Olivier Gagnon
98ae97afea Validate city name coming from netscript 2022-03-30 11:34:03 -04:00
nickofolas
5d27ce7aa3 Impl faction augs filter helper function 2022-03-29 21:10:07 -04:00
phyzical
b3a52c6224 one minor compile issue 2022-03-30 08:36:27 +08:00
Olivier Gagnon
bbbaa89f74 unknown-ify singularity API 2022-03-29 20:05:40 -04:00
Olivier Gagnon
725c8234c9 unknown-ify the singularity API. 2022-03-29 19:49:37 -04:00
Olivier Gagnon
48e73a9131 allbuild commit /usr/bin/git 2022-03-29 18:00:57 -04:00
Olivier Gagnon
ac34829649 pre-1.6 2022-03-29 15:30:22 -04:00
hydroflame
fb1bce579f
Merge pull request #3170 from nickofolas/feature/grafting
[Feature] Grafting
2022-03-29 13:25:41 -04:00
DavidGrinberg
c6a2664296
purchaseTor returns true if player already has tor
Change `purchaseTor` to return `true` if the player already has purchased Tor. Previously it would return `false`

Changing this to true puts the behavior inline with the already existing behavior of `purchaseProgram`, which returns true if you have already purchased the program. Additionally this lets us call `purcahseTor` with the same logic that we use to call `purchaseProgram`
2022-03-25 13:06:12 -04:00
nickofolas
1c696b5518 Update purchaseAugmentation rules 2022-03-23 12:04:49 -05:00
Olivier Gagnon
1fae48e1ce lint 2022-03-22 10:36:56 -04:00
Olivier Gagnon
699ae2e967 with SLEEVE_8, fix workForFaction 2022-03-20 23:27:53 -04:00
Olivier Gagnon
fb7c65957d Added dark web functions to ns api 2022-03-20 22:49:46 -04:00
phyzical
44ea479043 update constants
* added OperationNames
* added faction names
* used citynames where appropriate
2022-03-19 16:09:59 +08:00
Risenafis
04cfdc76ae Fix favor threshold for donateToFaction 2022-02-14 23:25:30 +09:00
Cyn
cdeae4ef68 Make travelToCity throw on invalid city name and return false on no money 2022-01-23 22:08:07 -05:00
hydroflame
ae83eeacb7
Merge pull request #2689 from nickofolas/fix/singularity-focus
Fix Singularity focus arg issues
2022-01-18 17:00:12 -05:00
Olivier Gagnon
05cbc25a8f 1.4 2022-01-18 14:03:24 -05:00
nickofolas
2d38ce8f72 Fix focus arg for sing functions 2022-01-18 08:49:06 -06:00
nickofolas
89fd54698b Fix ns.setFocus 2022-01-18 08:20:58 -06:00
hydroflame
27a54217eb
Merge pull request #2653 from nickofolas/fix/refactor-loops
Refactor `for ... in` loops
2022-01-17 16:01:04 -05:00
nickofolas
ab841f7530 Refactor for ... in loops 2022-01-15 18:45:03 -06:00
hydroflame
7a84fa4d29
Merge pull request #2591 from nickofolas/improvement/singularity-focus-args
Add focus arg to Singularity functions
2022-01-15 18:25:56 -05:00
hydroflame
37401f0917
Merge pull request #2580 from deathly809/bug/cancel_should_clear_focus
Ensure that we leave focus when we call stopAction or cancel working
2022-01-15 18:15:50 -05:00
hydroflame
03f71bd5f4
Merge pull request #2485 from Ornedan/netscriptdelay-check-stop
Refactor netscriptDelay and script kill interaction
2022-01-15 17:26:23 -05:00
nickofolas
415f922a37 Add focus arg to Singularity functions 2022-01-12 12:03:49 -06:00
Jeffrey A. Robinson
664e99e3de Ensure that we leave focus when we call stopAction or cancel working 2022-01-11 21:08:15 -08:00
Olivier Gagnon
d8a5f5b03c many fixes 2022-01-09 15:24:32 -05:00
Heikki Aitakangas
c6ff982b1d Remove stopFlag checks made redundant by the netscriptDelay change 2022-01-09 02:42:36 +02:00
Russell Stringer
e8d4265c96 Fix #2446 - ns.purchaseAugment() can no longer buy NF from gang
Added the checks from AugmentationPage.tsx to the singularity
purchaseAugment() function to disallow buying NF from player-run
gang and disallow TRP from player-run gang outside BN2
2022-01-07 17:02:44 -05:00
hydroflame
f798115259
Merge branch 'dev' into nan-donation 2022-01-05 10:15:40 -05:00
TheMas3212
860e77f109
Add check to see if player is in gang before getting Gang Faction 2022-01-05 21:41:04 +11:00
TheMas3212
538a440b7e
Fixes #1860 donate to gang faction possible via singularity
also fixes bug i found while testing this where its possible to donate
to a faction you arent a member of
2022-01-05 21:36:09 +11:00
Olivier Gagnon
925bed4430 fix scp 2022-01-04 22:25:41 -05:00
Woody Lam
3ca36fca95 Fix #2275 accepts NaN donation bug 2022-01-05 02:05:56 +00:00
Olivier Gagnon
c59a267437 change sf4 2022-01-04 19:09:34 -05:00
Martin Fournier
6b59a58ea3 Fix linter errors 2021-12-22 04:44:07 -05:00
theit8514
d873f7279b Add focus parameter to workForCompany/workForFaction
Defaults to true to keep previous behavior.
2021-12-21 08:13:18 -05:00
Olivier Gagnon
d7f9cb8cec make setFocus a little more robust 2021-12-16 12:02:46 -05:00