Commit Graph

181 Commits

Author SHA1 Message Date
Steven Evans
0bea4e0430 [refactor] Breaking out key codes
Trying to start breaking apart the large circular dependencies between
modules. Most of the dependencies are similar to this pattern where
there is one stand-alone member that is needed, so the entire module
gets brought along with.
2018-08-02 14:23:50 -04:00
danielyxie
b5e8d61ad6
Merge pull request #407 from kopelli/refactor-programs-from-terminal
Refactor - Determine program execution from terminal via hashmap instead switch statement
2018-08-02 10:57:26 -04:00
Steven Evans
3130b410e2 [refactor] pulling getTimestamp off Terminal 2018-08-01 13:38:54 -04:00
Steven Evans
0345daf359 [bug] Fixing the timestamp
getMonth() is 0-based, so changing the offset.

getDay() is the day of week, not day of the month.

Ensuring hours & minutes are always two digits.
2018-08-01 12:55:01 -04:00
Steven Evans
a09fcd21ca [refactor] Determine program execution from terminal via hashmap instead
of switch statement.

Introducing variables within the case block of a switch statement can be
problematic and confusing as case statements do not have their own
scope, and thus are hoisted to the function level. Thus, with a large
enough switch statement, variable declarations could easily be
overlooked as they are peppered throughout the cases. This is especially
problematic for 'const' and 'let' declarations, which are very concerned
about scoping. There is an ESLint rule specifically enabled to catch
this behavior.

This refactoring is a way to mitigate the behavior, while still allowing
for the use of 'const'.
2018-07-31 00:18:38 -04:00
Olivier Gagnon
9f43a7208c gave distinct fl1ght message when conditions are fulfilled 2018-07-25 00:11:35 -04:00
danielyxie
88755f1d0f Added import functionality to Netscript 1.0 2018-07-20 09:28:03 -05:00
danielyxie
e4742289c7 BN-12 now properly affects Bladeburner multipliers. Added polyfill in new JS interpreter for Array.includes. Fixed terminal not focusing with tab" 2018-07-16 01:00:57 -05:00
Steven Evans
1a5208f78f [refactor] Moved 'printArray' to 'arrayToString' TS file 2018-07-08 20:17:51 -04:00
Steven Evans
d20516b03c [refactor] Moved 'addOffset' to its own TS file 2018-07-08 20:17:51 -04:00
Steven Evans
a6293474a9 [refactor] Moved "isString()" to its own TS file 2018-07-08 20:15:06 -04:00
danielyxie
3213032427 Fixed incompatibility issues with Edge (due to spread syntax). Fixed issue with Terminal autocomplete and capitalized commands. Script ram is now rounded to 2 decimal places 2018-07-02 22:35:12 -05:00
danielyxie
c8421168b6 Copying a NetscriptJS script with scp now properly clears its 'module'. 2018-06-29 00:39:05 -05:00
Olivier Gagnon
40b29ea3c0 woops, sed overkill 2018-06-26 13:27:57 -04:00
Olivier Gagnon
6bdf946790 remove all .js from all appplicable imports 2018-06-26 12:34:11 -04:00
danielyxie
89ecb15b6f
Merge pull request #324 from hydroflame/hydroflame-convert-ts
first conversion
2018-06-25 20:02:40 -05:00
danielyxie
b2a24002ee
Merge pull request #266 from hydroflame/streamline-create-programs
Streamline create programs
2018-06-25 19:34:08 -05:00
Olivier Gagnon
c830f08081 format fl1ght money like the rest of the money 2018-06-24 21:08:40 -04:00
Olivier Gagnon
3af76f50ab
Merge branch 'dev' into streamline-create-programs 2018-06-22 20:48:26 -04:00
Olivier Gagnon
53ddfbc9ec first conversion 2018-06-22 17:30:24 -04:00
danielyxie
343d474702
Merge pull request #318 from hydroflame/darkweb-autolink
added autolink to darkweb
2018-06-22 15:13:48 -05:00
Olivier Gagnon
3ab23df8d7 terminal autocompletes darkweb better 2018-06-20 18:34:39 -04:00
Steven Evans
67cee8642b [refactor] Converted TextFile to TypeScript 2018-06-14 09:11:28 -04:00
Steven Evans
3e1ec388e0 [chore] Introduce TypeScript; Tested out with HelpText. 2018-06-13 23:38:35 -04:00
Olivier Gagnon
aa56227851 streamline programs 2018-06-01 19:31:34 -04:00
danielyxie
b18e316821 Fixed bug with scp Terminal command and hopefully fixed Active Scripts UI bug by making create/delete server panel fns non async 2018-05-12 20:21:03 -05:00
danielyxie
96b12f7f68 Added ENABLE_TIMESTAMPS Fconf Setting. Put a soft-cap on stock price. Cleaned up a number rounding display issue for Gang UI (100.03% territory, etc.). Refactored ActiveSCriptsUI code to use a queue to sequentially run 'tasks' that handle the adding/deleting of items and server panels 2018-05-07 12:25:44 -05:00
danielyxie
4ea365da02 Refactored Active Scripts UI. Can no longer gain Bladeburner faction rep from infiltration. Added Disable Hotkeys setting 2018-05-06 15:27:47 -05:00
danielyxie
8dba456b65 Merge jaguilar's changes to incorporate Netscript JS (PR #212) 2018-05-05 17:13:35 -05:00
danielyxie
9acc422f05 v0.36.0 - Bladeburner BitNode (BN-6) 2018-05-02 12:38:11 -05:00
danielyxie
6255971e96 Fixed a bug with Introductory Tutorial in v0.35.1 2018-03-12 14:53:07 -05:00
danielyxie
f33d81b1a5 v0.35.1 2018-03-12 14:39:04 -05:00
danielyxie
e3c435270b V0.35.0. Adding netscript_tests in game testbench. 2018-03-03 15:05:33 -06:00
danielyxie
779ce25ae5 v0.34.5. Also adding webpack config and package-lock.json 2018-02-24 16:55:06 -06:00
danielyxie
f82d216e10 v0.34.4 2018-02-14 22:26:43 -06:00
danielyxie
5f817c8016 V 0.34.2 Changes 2018-01-27 00:52:39 -06:00
danielyxie
e88a3936f3 v0.34.1 2018-01-19 22:47:57 -06:00
danielyxie
f211e8856f Minor bug fixes, adding spotify music player, and adding sphinx documentation 2018-01-09 14:48:06 -06:00
danielyxie
3f61ec1cab v0.34.0 changes 2017-12-06 21:45:47 -06:00
danielyxie
bc6f0da677 Fixed Netscript interpreter memory issues by breaking promise chains in while and for loops. Improved Stock Market UI. Added a button to kill script from log display box. Added confirm() Netscript function 2017-11-02 16:47:09 -05:00
danielyxie
246acf5966 Game now uses indexedDb. Added new Bond Forgery crime. Added commitCrime() and getStats() Singularity functions. Removed getIntelligence(). Balance changes to crime/infiltration 2017-10-11 21:00:22 -05:00
danielyxie
04bfcc0f20 All v0.30.0 Changes 2017-10-09 23:56:48 -05:00
danielyxie
d1f4f8fd36 All v0.29.0 changes 2017-09-19 13:38:03 -05:00
danielyxie
e3991b8795 v0.28.6 changes 2017-09-15 09:06:59 -05:00
danielyxie
c0369bc937 v0.28.5 changes 2017-09-13 09:22:22 -05:00
danielyxie
024546b4f1 v0.28.4 - Bug fixes, getScriptIncome(), syntax highlighting for regular Netscript functions, 2017-09-11 18:14:51 -05:00
danielyxie
1e459c9ec7 v0.28.3 changes 2017-09-07 00:45:14 -05:00
danielyxie
97eeef7d0d scp and donate for rep bug fixes 2017-08-31 12:19:28 -05:00
danielyxie
7a05d3585a All 0.28.0 Changes - Bitnodes 4 and 11 and webpack migration 2017-08-30 12:44:29 -05:00
danielyxie
cf99c4f10b Added literature (.lit files). Fixed bug with Gang Territory. Updated documentation 2017-08-18 12:20:51 -05:00