Toasts for Noodles Eaten, Hospitalized.

This commit is contained in:
tyasuh.taeragan@gmail.com
2021-10-22 15:30:13 -04:00
parent ffc8133fb8
commit 4f7199c0bd
3 changed files with 7 additions and 9 deletions

View File

@@ -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 */
@@ -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&nbsp;
<Money money={cost} />
</>,
);
SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, "warning");
}
this.loseMoney(cost);