mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
commit
bbb69952e8
@ -20,6 +20,8 @@ import { createRandomIp } from "../utils/IPAddress";
|
||||
|
||||
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
||||
|
||||
|
||||
|
||||
interface IConstructorParams {
|
||||
adminRights?: boolean;
|
||||
hostname: string;
|
||||
|
@ -21,6 +21,7 @@ import { LocationName } from "../data/LocationNames";
|
||||
import { use } from "../../ui/Context";
|
||||
|
||||
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
||||
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||
|
||||
type IProps = {
|
||||
loc: Location;
|
||||
@ -75,7 +76,7 @@ export function SpecialLocation(props: IProps): React.ReactElement {
|
||||
|
||||
function renderNoodleBar(): React.ReactElement {
|
||||
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>;
|
||||
@ -111,35 +112,35 @@ export function SpecialLocation(props: IProps): React.ReactElement {
|
||||
|
||||
function renderCotMG(): React.ReactElement {
|
||||
// prettier-ignore
|
||||
const symbol = <Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}>
|
||||
{" `` "}<br />
|
||||
{" -odmmNmds: "}<br />
|
||||
{" `hNmo:..-omNh. "}<br />
|
||||
{" yMd` `hNh "}<br />
|
||||
{" mMd oNm "}<br />
|
||||
{" oMNo .mM/ "}<br />
|
||||
{" `dMN+ -mM+ "}<br />
|
||||
{" -mMNo -mN+ "}<br />
|
||||
{" .+- :mMNo/mN/ "}<br />
|
||||
{":yNMd. :NMNNN/ "}<br />
|
||||
{"-mMMMh. /NMMh` "}<br />
|
||||
{" .dMMMd. /NMMMy` "}<br />
|
||||
{" `yMMMd. /NNyNMMh` "}<br />
|
||||
{" `sMMMd. +Nm: +NMMh. "}<br />
|
||||
{" oMMMm- oNm: /NMMd. "}<br />
|
||||
{" +NMMmsMm- :mMMd. "}<br />
|
||||
{" /NMMMm- -mMMd. "}<br />
|
||||
{" /MMMm- -mMMd. "}<br />
|
||||
{" `sMNMMm- .mMmo "}<br />
|
||||
{" `sMd:hMMm. ./. "}<br />
|
||||
{" `yMy` `yNMd` "}<br />
|
||||
{" `hMs` oMMy "}<br />
|
||||
{" `hMh sMN- "}<br />
|
||||
{" /MM- .NMo "}<br />
|
||||
{" +MM: :MM+ "}<br />
|
||||
{" sNNo-.`.-omNy` "}<br />
|
||||
{" -smNNNNmdo- "}<br />
|
||||
{" `..` "}</Typography>
|
||||
const symbol = <Typography sx={{ lineHeight: '1em', whiteSpace: 'pre' }}>
|
||||
{" `` "}<br />
|
||||
{" -odmmNmds: "}<br />
|
||||
{" `hNmo:..-omNh. "}<br />
|
||||
{" yMd` `hNh "}<br />
|
||||
{" mMd oNm "}<br />
|
||||
{" oMNo .mM/ "}<br />
|
||||
{" `dMN+ -mM+ "}<br />
|
||||
{" -mMNo -mN+ "}<br />
|
||||
{" .+- :mMNo/mN/ "}<br />
|
||||
{":yNMd. :NMNNN/ "}<br />
|
||||
{"-mMMMh. /NMMh` "}<br />
|
||||
{" .dMMMd. /NMMMy` "}<br />
|
||||
{" `yMMMd. /NNyNMMh` "}<br />
|
||||
{" `sMMMd. +Nm: +NMMh. "}<br />
|
||||
{" oMMMm- oNm: /NMMd. "}<br />
|
||||
{" +NMMmsMm- :mMMd. "}<br />
|
||||
{" /NMMMm- -mMMd. "}<br />
|
||||
{" /MMMm- -mMMd. "}<br />
|
||||
{" `sMNMMm- .mMmo "}<br />
|
||||
{" `sMd:hMMm. ./. "}<br />
|
||||
{" `yMy` `yNMd` "}<br />
|
||||
{" `hMs` oMMy "}<br />
|
||||
{" `hMh sMN- "}<br />
|
||||
{" /MM- .NMo "}<br />
|
||||
{" +MM: :MM+ "}<br />
|
||||
{" sNNo-.`.-omNy` "}<br />
|
||||
{" -smNNNNmdo- "}<br />
|
||||
{" `..` "}</Typography>
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -59,6 +59,7 @@ import { Money } from "../../ui/React/Money";
|
||||
|
||||
import React from "react";
|
||||
import { serverMetadata } from "../../Server/data/servers";
|
||||
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||
|
||||
export function init(this: IPlayer): void {
|
||||
/* Initialize Player's home computer */
|
||||
@ -1530,20 +1531,20 @@ export function finishCrime(this: IPlayer, cancelled: boolean): string {
|
||||
if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {
|
||||
ws.scriptRef.log(
|
||||
"Crime successful! Gained " +
|
||||
numeralWrapper.formatMoney(this.workMoneyGained) +
|
||||
", " +
|
||||
numeralWrapper.formatExp(this.workHackExpGained) +
|
||||
" hack exp, " +
|
||||
numeralWrapper.formatExp(this.workStrExpGained) +
|
||||
" str exp, " +
|
||||
numeralWrapper.formatExp(this.workDefExpGained) +
|
||||
" def exp, " +
|
||||
numeralWrapper.formatExp(this.workDexExpGained) +
|
||||
" dex exp, " +
|
||||
numeralWrapper.formatExp(this.workAgiExpGained) +
|
||||
" agi exp, " +
|
||||
numeralWrapper.formatExp(this.workChaExpGained) +
|
||||
" cha exp.",
|
||||
numeralWrapper.formatMoney(this.workMoneyGained) +
|
||||
", " +
|
||||
numeralWrapper.formatExp(this.workHackExpGained) +
|
||||
" hack exp, " +
|
||||
numeralWrapper.formatExp(this.workStrExpGained) +
|
||||
" str exp, " +
|
||||
numeralWrapper.formatExp(this.workDefExpGained) +
|
||||
" def exp, " +
|
||||
numeralWrapper.formatExp(this.workDexExpGained) +
|
||||
" dex exp, " +
|
||||
numeralWrapper.formatExp(this.workAgiExpGained) +
|
||||
" agi exp, " +
|
||||
numeralWrapper.formatExp(this.workChaExpGained) +
|
||||
" cha exp.",
|
||||
);
|
||||
}
|
||||
} else {
|
||||
@ -1582,18 +1583,18 @@ export function finishCrime(this: IPlayer, cancelled: boolean): string {
|
||||
if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {
|
||||
ws.scriptRef.log(
|
||||
"Crime failed! Gained " +
|
||||
numeralWrapper.formatExp(this.workHackExpGained) +
|
||||
" hack exp, " +
|
||||
numeralWrapper.formatExp(this.workStrExpGained) +
|
||||
" str exp, " +
|
||||
numeralWrapper.formatExp(this.workDefExpGained) +
|
||||
" def exp, " +
|
||||
numeralWrapper.formatExp(this.workDexExpGained) +
|
||||
" dex exp, " +
|
||||
numeralWrapper.formatExp(this.workAgiExpGained) +
|
||||
" agi exp, " +
|
||||
numeralWrapper.formatExp(this.workChaExpGained) +
|
||||
" cha exp.",
|
||||
numeralWrapper.formatExp(this.workHackExpGained) +
|
||||
" hack exp, " +
|
||||
numeralWrapper.formatExp(this.workStrExpGained) +
|
||||
" str exp, " +
|
||||
numeralWrapper.formatExp(this.workDefExpGained) +
|
||||
" def exp, " +
|
||||
numeralWrapper.formatExp(this.workDexExpGained) +
|
||||
" dex exp, " +
|
||||
numeralWrapper.formatExp(this.workAgiExpGained) +
|
||||
" agi exp, " +
|
||||
numeralWrapper.formatExp(this.workChaExpGained) +
|
||||
" cha exp.",
|
||||
);
|
||||
}
|
||||
} else {
|
||||
@ -1697,13 +1698,7 @@ export function regenerateHp(this: IPlayer, amt: number): void {
|
||||
export function hospitalize(this: IPlayer): number {
|
||||
const cost = getHospitalizationCost(this);
|
||||
if (Settings.SuppressHospitalizationPopup === false) {
|
||||
dialogBoxCreate(
|
||||
<>
|
||||
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} />
|
||||
</>,
|
||||
);
|
||||
SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, "warning");
|
||||
}
|
||||
|
||||
this.loseMoney(cost);
|
||||
|
@ -302,7 +302,7 @@ export function refreshTheme(): void {
|
||||
border: "1px solid " + Settings.theme.well,
|
||||
},
|
||||
standardSuccess: {
|
||||
color: Settings.theme.primaryLight,
|
||||
color: Settings.theme.primarylight,
|
||||
},
|
||||
standardError: {
|
||||
color: Settings.theme.errorlight,
|
||||
|
Loading…
Reference in New Issue
Block a user