mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 08:03:48 +01:00
commit
ba563db5fe
@ -7,7 +7,7 @@ toast() Netscript Function
|
|||||||
:param string message: message to display
|
:param string message: message to display
|
||||||
:param success|info|warning|error variant: color of the toast
|
: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:
|
Example:
|
||||||
|
|
||||||
|
15
doc/source/netscript/bladeburnerapi/getCityCommunities.rst
Normal file
15
doc/source/netscript/bladeburnerapi/getCityCommunities.rst
Normal file
@ -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
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
package-lock.json
generated
1
package-lock.json
generated
@ -5,6 +5,7 @@
|
|||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
|
"name": "bitburner",
|
||||||
"version": "0.56.0",
|
"version": "0.56.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "SEE LICENSE IN license.txt",
|
"license": "SEE LICENSE IN license.txt",
|
||||||
|
@ -53,8 +53,8 @@ export function IssueDividendsModal(props: IProps): React.ReactElement {
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This
|
In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This
|
||||||
percentage must be an integer between 0 and {CorporationConstants.DividendMaxPercentage}. (A percentage of 0
|
percentage must be an integer between 0 and 50. (A percentage of 0
|
||||||
means no dividends will be issued
|
means no dividends will be issued)
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
Two important things to note:
|
Two important things to note:
|
||||||
|
@ -221,7 +221,7 @@ function PublicButtons({ rerender }: IPublicButtonsProps): React.ReactElement {
|
|||||||
<SellSharesModal open={sellSharesOpen} onClose={() => setSellSharesOpen(false)} rerender={rerender} />
|
<SellSharesModal open={sellSharesOpen} onClose={() => setSellSharesOpen(false)} rerender={rerender} />
|
||||||
<Tooltip title={<Typography>Buy back shares you that previously issued or sold at market price.</Typography>}>
|
<Tooltip title={<Typography>Buy back shares you that previously issued or sold at market price.</Typography>}>
|
||||||
<span>
|
<span>
|
||||||
<Button disabled={corp.issuedShares > 0.5} onClick={() => setBuybackSharesOpen(true)}>
|
<Button disabled={corp.issuedShares <1} onClick={() => setBuybackSharesOpen(true)}>
|
||||||
Buyback shares
|
Buyback shares
|
||||||
</Button>
|
</Button>
|
||||||
</span>
|
</span>
|
||||||
|
@ -31,6 +31,7 @@ export function determineCrimeSuccess(p: IPlayer, type: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function findCrime(roughName: string): Crime | null {
|
export function findCrime(roughName: string): Crime | null {
|
||||||
|
roughName = roughName.toLowerCase();
|
||||||
if (roughName.includes("shoplift")) {
|
if (roughName.includes("shoplift")) {
|
||||||
return Crimes.Shoplift;
|
return Crimes.Shoplift;
|
||||||
} else if (roughName.includes("rob") && roughName.includes("store")) {
|
} else if (roughName.includes("rob") && roughName.includes("store")) {
|
||||||
|
@ -32,7 +32,7 @@ export interface INetscriptBladeburner {
|
|||||||
getTeamSize(type?: any, name?: any): any;
|
getTeamSize(type?: any, name?: any): any;
|
||||||
setTeamSize(type?: any, name?: any, size?: any): any;
|
setTeamSize(type?: any, name?: any, size?: any): any;
|
||||||
getCityEstimatedPopulation(cityName: any): any;
|
getCityEstimatedPopulation(cityName: any): any;
|
||||||
getCityEstimatedCommunities(cityName: any): any;
|
getCityCommunities(cityName: any): any;
|
||||||
getCityChaos(cityName: any): any;
|
getCityChaos(cityName: any): any;
|
||||||
getCity(): any;
|
getCity(): any;
|
||||||
switchCity(cityName: any): any;
|
switchCity(cityName: any): any;
|
||||||
@ -320,13 +320,13 @@ export function NetscriptBladeburner(
|
|||||||
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
|
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
|
||||||
return bladeburner.cities[cityName].popEst;
|
return bladeburner.cities[cityName].popEst;
|
||||||
},
|
},
|
||||||
getCityEstimatedCommunities: function (cityName: any): any {
|
getCityCommunities: function (cityName: any): any {
|
||||||
helper.updateDynamicRam("getCityEstimatedCommunities", getRamCost("bladeburner", "getCityEstimatedCommunities"));
|
helper.updateDynamicRam("getCityCommunities", getRamCost("bladeburner", "getCityCommunities"));
|
||||||
checkBladeburnerAccess("getCityEstimatedCommunities");
|
checkBladeburnerAccess("getCityCommunities");
|
||||||
checkBladeburnerCity("getCityEstimatedCommunities", cityName);
|
checkBladeburnerCity("getCityCommunities", cityName);
|
||||||
const bladeburner = player.bladeburner;
|
const bladeburner = player.bladeburner;
|
||||||
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
|
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
|
||||||
return bladeburner.cities[cityName].commsEst;
|
return bladeburner.cities[cityName].comms;
|
||||||
},
|
},
|
||||||
getCityChaos: function (cityName: any): any {
|
getCityChaos: function (cityName: any): any {
|
||||||
helper.updateDynamicRam("getCityChaos", getRamCost("bladeburner", "getCityChaos"));
|
helper.updateDynamicRam("getCityChaos", getRamCost("bladeburner", "getCityChaos"));
|
||||||
|
Loading…
Reference in New Issue
Block a user