mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-04 22:59:42 +02:00
Change money to automatically color grey when something cannot be bought.
This commit is contained in:
@@ -314,7 +314,7 @@ export class Blackjack extends Game<Props, State> {
|
||||
label={
|
||||
<>
|
||||
{"Wager (Max: "}
|
||||
{Money(MAX_BET)}
|
||||
<Money money={MAX_BET} />
|
||||
{")"}
|
||||
</>
|
||||
}
|
||||
@@ -333,7 +333,7 @@ export class Blackjack extends Game<Props, State> {
|
||||
|
||||
<p>
|
||||
{"Total earnings this session: "}
|
||||
{Money(gains)}
|
||||
<Money money={gains} />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -404,13 +404,13 @@ export class Blackjack extends Game<Props, State> {
|
||||
{this.isPlayerWinResult(result) && (
|
||||
<>
|
||||
{" You gained "}
|
||||
{Money(this.state.bet)}
|
||||
<Money money={this.state.bet} />
|
||||
</>
|
||||
)}
|
||||
{result === Result.DealerWon && (
|
||||
<>
|
||||
{" You lost "}
|
||||
{Money(this.state.bet)}
|
||||
<Money money={this.state.bet} />
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
|
||||
@@ -202,10 +202,10 @@ export class Roulette extends Game<IProps, IState> {
|
||||
}
|
||||
if(playerWin) {
|
||||
gain = this.state.investment*this.state.strategy.payout;
|
||||
status = <>won {Money(gain)}</>;
|
||||
status = <>won <Money money={gain} /></>;
|
||||
} else {
|
||||
gain = -this.state.investment;
|
||||
status = <>lost {Money(-gain)}</>;
|
||||
status = <>lost <Money money={-gain} /></>;
|
||||
}
|
||||
this.win(this.props.p, gain);
|
||||
this.setState({
|
||||
|
||||
@@ -170,7 +170,7 @@ export class SlotMachine extends Game<IProps, IState> {
|
||||
}
|
||||
|
||||
this.setState({
|
||||
status: <>{gains>0?"gained":"lost"} {Money(Math.abs(gains))}</>,
|
||||
status: <>{gains>0?"gained":"lost"} <Money money={Math.abs(gains)} /></>,
|
||||
canPlay: true,
|
||||
})
|
||||
if(this.reachedLimit(this.props.p)) return;
|
||||
|
||||
Reference in New Issue
Block a user