mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Merge branch 'dev' of github.com:danielyxie/bitburner into dev
This commit is contained in:
commit
eec75b0840
@ -20,6 +20,8 @@ import { createRandomIp } from "../utils/IPAddress";
|
|||||||
|
|
||||||
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
interface IConstructorParams {
|
interface IConstructorParams {
|
||||||
adminRights?: boolean;
|
adminRights?: boolean;
|
||||||
hostname: string;
|
hostname: string;
|
||||||
|
@ -21,6 +21,7 @@ import { LocationName } from "../data/LocationNames";
|
|||||||
import { use } from "../../ui/Context";
|
import { use } from "../../ui/Context";
|
||||||
|
|
||||||
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
||||||
|
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
loc: Location;
|
loc: Location;
|
||||||
@ -75,7 +76,7 @@ export function SpecialLocation(props: IProps): React.ReactElement {
|
|||||||
|
|
||||||
function renderNoodleBar(): React.ReactElement {
|
function renderNoodleBar(): React.ReactElement {
|
||||||
function EatNoodles(): void {
|
function EatNoodles(): void {
|
||||||
dialogBoxCreate(<>You ate some delicious noodles and feel refreshed.</>);
|
SnackbarEvents.emit("You ate some delicious noodles and feel refreshed", "success");
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Button onClick={EatNoodles}>Eat noodles</Button>;
|
return <Button onClick={EatNoodles}>Eat noodles</Button>;
|
||||||
@ -111,7 +112,7 @@ export function SpecialLocation(props: IProps): React.ReactElement {
|
|||||||
|
|
||||||
function renderCotMG(): React.ReactElement {
|
function renderCotMG(): React.ReactElement {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const symbol = <Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}>
|
const symbol = <Typography sx={{ lineHeight: '1em', whiteSpace: 'pre' }}>
|
||||||
{" `` "}<br />
|
{" `` "}<br />
|
||||||
{" -odmmNmds: "}<br />
|
{" -odmmNmds: "}<br />
|
||||||
{" `hNmo:..-omNh. "}<br />
|
{" `hNmo:..-omNh. "}<br />
|
||||||
|
@ -59,6 +59,7 @@ import { Money } from "../../ui/React/Money";
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { serverMetadata } from "../../Server/data/servers";
|
import { serverMetadata } from "../../Server/data/servers";
|
||||||
|
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||||
|
|
||||||
export function init(this: IPlayer): void {
|
export function init(this: IPlayer): void {
|
||||||
/* Initialize Player's home computer */
|
/* Initialize Player's home computer */
|
||||||
@ -1697,13 +1698,7 @@ export function regenerateHp(this: IPlayer, amt: number): void {
|
|||||||
export function hospitalize(this: IPlayer): number {
|
export function hospitalize(this: IPlayer): number {
|
||||||
const cost = getHospitalizationCost(this);
|
const cost = getHospitalizationCost(this);
|
||||||
if (Settings.SuppressHospitalizationPopup === false) {
|
if (Settings.SuppressHospitalizationPopup === false) {
|
||||||
dialogBoxCreate(
|
SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, "warning");
|
||||||
<>
|
|
||||||
You were in critical condition! You were taken to the hospital where luckily they were able to save your life.
|
|
||||||
You were charged
|
|
||||||
<Money money={cost} />
|
|
||||||
</>,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loseMoney(cost);
|
this.loseMoney(cost);
|
||||||
|
@ -302,7 +302,7 @@ export function refreshTheme(): void {
|
|||||||
border: "1px solid " + Settings.theme.well,
|
border: "1px solid " + Settings.theme.well,
|
||||||
},
|
},
|
||||||
standardSuccess: {
|
standardSuccess: {
|
||||||
color: Settings.theme.primaryLight,
|
color: Settings.theme.primarylight,
|
||||||
},
|
},
|
||||||
standardError: {
|
standardError: {
|
||||||
color: Settings.theme.errorlight,
|
color: Settings.theme.errorlight,
|
||||||
|
Loading…
Reference in New Issue
Block a user