Commit Graph

8168 Commits

Author SHA1 Message Date
Daniel Xie
e89bb00155 Created functions to display Faction content (for a single faction) and added the corresponding html elements. Created framework for loading content for all pages (world, augmentations, etc.) in Engine.js 2017-01-09 16:14:18 -06:00
Daniel Xie
f38a3d1c75 Added a few HTMl elements for Factions display 2017-01-03 10:24:41 -06:00
Daniel Xie
25bf876f4a Preparing code to create the Factions page 2016-12-22 11:13:00 -06:00
Daniel Xie
8239e94a3a Created servers for some of the Factions. THese factions are joinable when you hack into the servers 2016-12-22 10:19:02 -06:00
Daniel Xie
65ba93190b Added augmentations 2016-12-22 09:56:15 -06:00
Daniel Xie
8dbca029de Factions should save and load properly (not fully tested). Terminal now scrolls to the bottom when something is posted 2016-12-21 12:36:42 -06:00
Daniel Xie
d656ee3114 Implemented control + c functionality to stop running cmds such as hack() and analyze() 2016-12-21 10:33:00 -06:00
Daniel Xie
fc3d52b832 Refactored Factions class so that it works with saving/loading. Defined initFactions() function for currently brainstormed factions 2016-12-20 14:31:41 -06:00
Daniel Xie
f1ec376f33 Implemented server growth (might need rebalancing). No wwhen a script is killed it is properly removed from the Active Scripts tab 2016-12-20 14:18:34 -06:00
Daniel Xie
e2316e4a1d Can now do things such as ctrl+c in Terminal without it auto focusing on the input. Implemented offline exp gain 2016-12-19 14:59:13 -06:00
Daniel Xie
962b057ff8 Implemented basic functionality for the Active Tabs menu. Works for online production 2016-12-19 12:20:19 -06:00
Daniel Xie
d88237fa91 Companies save/loading properly. Added a utility file for Objects. Started work on Active Scripts info page. Adjusted leveling formula. Tested/fixed scripts running that have errors, seems to work fine might need proper testing later 2016-12-16 16:14:41 -06:00
Daniel Xie
5f1b58fd86 Evaluator + Netscript should now properly handle errors in syntax/runtime errors (almost..still have to implement the properly closing down script when an error is thrown. Check file for TODO). Player skill level should now properly be updated 2016-12-15 16:22:42 -06:00
Daniel Xie
96fb37c6d1 Fixed loadAllRunningScripts(), now seems to be working properly 2016-12-15 11:51:23 -06:00
Daniel Xie
7ec22480a2 Trying to get the functionality to load all running scripts upon load to work 2016-12-14 15:44:18 -06:00
Daniel Xie
334c144bae Upon opening window, all of the running scripts are loaded into WorkerScripts 2016-12-14 15:22:12 -06:00
Daniel Xie
23c036827f Fixed script hack(), should be working now. Changed some numbers to rebalance. Implemented script RAM usage. If a script uses too much ram it will not run (untested) 2016-12-14 14:29:40 -06:00
Daniel Xie
c485f28e20 updated README with TODOS. FIxed kill command and sleep() command in script 2016-12-13 17:52:32 -06:00
Daniel Xie
2e6206ac16 Updated README with Todos 2016-12-07 15:23:39 -06:00
Daniel Xie
7a5a9ccb65 Implemented kill command. UNTESTED, TEST THIS WHEN YOU CAN 2016-12-06 12:09:23 -06:00
Daniel Xie
8c58710495 Resolving and rejecting at the top level now returns a reference to workerScripts. This makes killing/deleting a running script possible. The feature appears to be working now 2016-12-06 10:59:20 -06:00
Daniel Xie
437ebc2703 Implemented Hack and sleep in script. IMplemented functionality that allows scripts to stop (rejecting the Promises). Scripts will now automatically stop if they are not infinite. THIS IS UNTESTED TEST THIS WHEN I CAN. Still need to implement kill command 2016-12-05 16:31:46 -06:00
Daniel Xie
6d9f0669ba Added an autosave feature that auto saves every minute. Made the updateHackProgress() take in the number of cycles that have passed when calculating its progress 2016-12-02 15:57:20 -06:00
Daniel Xie
eb31a0bd74 Changed the main menu links so that they're highlighted when active 2016-12-01 16:59:51 -06:00
Daniel Xie
106c59efb0 Changed main menu buttons to be hidden visibility so they have fixed positioning 2016-12-01 16:41:32 -06:00
Daniel Xie
2fe4e8a19a Changed the game speed so that it wasn't running faster (Rounding the number of game cycles usually caused it to speed up). Save Load function SHOULD be working now 2016-12-01 16:39:13 -06:00
Daniel Xie
d5d198cbb4 Refactored Code to make Save/Load work. This included re-structuring classes so that they contained only native objects/arrays of native objects and using a Reviver function in the JSON.parse. Cleaned up some code that was no longer needed 2016-12-01 16:18:18 -06:00
Daniel Xie
ca9caada67 Fixed a typo when sourcing scripts in index.html 2016-11-30 16:10:27 -06:00
Daniel Xie
b821fc2ea9 Added utilities for generic reviver, toJSON, and fromJSON. Eventually will be used for loading and saving objects 2016-11-30 16:08:21 -06:00
Daniel Xie
2d41a63707 Added some TODOs 2016-11-29 17:38:50 -06:00
Daniel Xie
867ae191b5 Refactored Netscript code into their respective files since it will no longer be done in Web Worker 2016-11-29 17:07:24 -06:00
Daniel Xie
77f0c31777 Got NetScript working asyhcronously with Promises! Only for loops have been tested though. Still need to test while loops and ifs. While loops should work if the for loops do, idk about if statements though. If statements aren't a high priority right now though 2016-11-29 16:56:05 -06:00
Daniel Xie
1efee3b7d6 Testing making the script runner NOT be a different web worker thread. 2016-11-28 16:13:13 -06:00
Daniel Xie
4687b80256 Tried to integrate Promises + web workers into Netscript code. Doesn't work at all right now 2016-11-28 16:02:06 -06:00
Daniel Xie
320526ebb3 Added stuff to Script queue functionality..it's gonna get deleted anyways so w.e 2016-11-25 16:08:04 -06:00
Daniel Xie
00f8a31246 When game is opened it will automatically try to load from local save, otherwise it begins a new game. Also fixed up save functions 2016-11-24 16:44:48 -06:00
Daniel Xie
f38fd340f4 Implement Script Editor (mostly) 2016-11-24 16:30:33 -06:00
Daniel Xie
1a600ad560 Added offline properties for Script object 2016-11-21 05:22:18 -06:00
Daniel Xie
d372ce5980 Fixed some bugs, began adding a Script class 2016-11-21 00:11:14 -06:00
Daniel Xie
8d87b74eaf Finished implementing Netscript. Not completely tested yet. Find out how to make it multithreaded (Web Workers is the best way according to internet 2016-11-17 16:25:40 -06:00
Daniel Xie
a4f92f7520 Fixed mege conflicts 2016-11-17 09:34:38 -06:00
Daniel Xie
62fbb5452d Added some factions 2016-11-17 09:31:52 -06:00
Daniel Xie
40b0b585e1 Added InputStream, Tokenizer, and Parser(unfinished) class. Changed Newerth to Aevum 2016-11-14 00:42:31 -06:00
Daniel Xie
f311b0b84f Began deining the Faction class 2016-11-03 16:36:01 -05:00
Daniel Xie
ed7418ac61 Finished defining company and company positions and initialized them in the Engine 2016-11-03 15:43:46 -05:00
Daniel Xie
0e9740dcf9 Continued defining the Company class and began writing initialization for it. Defined a namespace for Constants. 2016-11-02 16:45:10 -05:00
Daniel Xie
8530e51628 Finished initializing new servers (johnson ortho and newerth police). Finished init functions for Company class, and began declaring all possible companies. 2016-11-01 16:19:57 -05:00
Daniel Xie
6e0644555c Began defining the Company class 2016-11-01 00:44:04 -05:00
Daniel Xie
6cf9339919 Refactored the hacking progress code into an action progress code so that it can be reused for analyze and anything else that requires an animated progress bar. Implemented analyze 2016-11-01 00:30:59 -05:00
Daniel Xie
cc6b178a96 Added New Servers.need to properly init them 2016-10-28 16:57:58 -05:00