merge dev

This commit is contained in:
Olivier Gagnon
2021-10-26 23:11:47 -04:00
82 changed files with 1280 additions and 793 deletions
@@ -27,6 +27,10 @@ to attempt infiltrations above mid-normal.
** Slash when his guard is down! **
Press space when the guard is attacking you.
There's 3 phase
The first is guarding, where attacking back will result in failure.
The 2nd is preparing, this informs you that in 250ms there will be an opening window to attack.
The 3rd is attack, during this phase you can press space to slash and kill the enemy.
** Close the brackets **
@@ -0,0 +1,35 @@
Injecting HTML in the game
==========================
Bitburner uses React and Material-UI to render everything. Modifying the UI is possible but
not officially supported.
To automatically enter commands in the terminal (only works if looking at the terminal):
.. code-block:: javascript
// Acquire a reference to the terminal text field
const terminalInput = document.getElementById("terminal-input");
// Set the value to the command you want to run.
terminalInput.value="home;connect n00dles;home;connect n00dles;home;";
// Get a reference to the React event handler.
const handler = Object.keys(terminalInput)[1];
// Perform an onChange event to set some internal values.
terminalInput[handler].onChange({target:terminalInput});
// Simulate an enter press
terminalInput[handler].onKeyDown({keyCode:13,preventDefault:()=>null});
To add lines to the terminal (only works if looking at the terminal):
.. code-block:: javascript
// Acquire a reference to the terminal list of lines.
const list = document.getElementById("generic-react-container").querySelector("ul");
// Inject some HTML.
list.insertAdjacentHTML('beforeend',`<li><p color=lime>whatever custom html</p></li>`)
@@ -7,7 +7,7 @@ toast() Netscript Function
:param string message: message to display
:param success|info|warning|error variant: color of the toast
Spawns a toast (those bottom right notifications).
Spawns a toast (those bottom right notifications, like "Game Saved!" ).
Example:
@@ -0,0 +1,15 @@
getCityCommunities() Netscript Function
================================================
.. js:function:: getCityCommunities(cityName)
:RAM cost: 4 GB
:param string cityName: Name of city. Case-sensitive
:returns: Confirmed number of Synthoid communities in the specified city,
or -1 if an invalid city was specified.
Example:
.. code-block:: javascript
bladeburner.getCityCommunities("Sector-12"); // returns: 76
@@ -1,15 +0,0 @@
getCityEstimatedCommunities() Netscript Function
================================================
.. js:function:: getCityEstimatedCommunities(cityName)
:RAM cost: 4 GB
:param string cityName: Name of city. Case-sensitive
:returns: Estimated number of Synthoid communities in the specified city,
or -1 if an invalid city was specified.
Example:
.. code-block:: javascript
bladeburner.getCityEstimatedCommunities("Sector-12"); // returns: 76
@@ -11,3 +11,5 @@ they contain spoilers for the game.
getBitNodeMultipliers() <advancedfunctions/getBitNodeMultipliers>
getServer() <advancedfunctions/getServer>
autocomplete() <advancedfunctions/autocomplete>
atExit() <advancedfunctions/atExit>
Injecting HTML <advancedfunctions/inject_html.rst>
@@ -17,7 +17,7 @@ getInformation() Netscript Function
maxHp: max hp of the sleeve,
jobs: jobs available to the sleeve,
jobTitle: job titles available to the sleeve,
tor: does this sleeve have access to the tor router,
mult: {
agility: agility multiplier,
agilityExp: agility exp multiplier,