mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 02:03:58 +01:00
Make throw party UI reflect if we're throwing a party
This commit is contained in:
parent
04efd899a0
commit
fe83ca0f3f
@ -464,8 +464,8 @@ export function IndustryOffice(props: IProps): React.ReactElement {
|
||||
title={<Typography>Throw an office party to increase your employee's morale and happiness</Typography>}
|
||||
>
|
||||
<span>
|
||||
<Button disabled={corp.funds < 0} onClick={() => setThrowPartyOpen(true)}>
|
||||
Throw Party
|
||||
<Button disabled={corp.funds < 0 || props.office.partyMult > 0} onClick={() => setThrowPartyOpen(true)}>
|
||||
{props.office.partyMult > 0 ? "Throwing Party..." : "Throw Party"}
|
||||
</Button>
|
||||
</span>
|
||||
</Tooltip>
|
||||
|
@ -38,11 +38,15 @@ export function ThrowPartyModal(props: IProps): React.ReactElement {
|
||||
dialogBoxCreate("You don't have enough company funds to throw a party!");
|
||||
} else {
|
||||
const mult = ThrowParty(corp, props.office, cost);
|
||||
|
||||
if (mult > 0) {
|
||||
dialogBoxCreate(
|
||||
"You threw a party for the office! The morale and happiness " +
|
||||
"of each employee increased by " +
|
||||
numeralWrapper.formatPercentage(mult - 1),
|
||||
);
|
||||
}
|
||||
|
||||
props.rerender();
|
||||
props.onClose();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user