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>}
|
title={<Typography>Throw an office party to increase your employee's morale and happiness</Typography>}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<Button disabled={corp.funds < 0} onClick={() => setThrowPartyOpen(true)}>
|
<Button disabled={corp.funds < 0 || props.office.partyMult > 0} onClick={() => setThrowPartyOpen(true)}>
|
||||||
Throw Party
|
{props.office.partyMult > 0 ? "Throwing Party..." : "Throw Party"}
|
||||||
</Button>
|
</Button>
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
@ -38,11 +38,15 @@ export function ThrowPartyModal(props: IProps): React.ReactElement {
|
|||||||
dialogBoxCreate("You don't have enough company funds to throw a party!");
|
dialogBoxCreate("You don't have enough company funds to throw a party!");
|
||||||
} else {
|
} else {
|
||||||
const mult = ThrowParty(corp, props.office, cost);
|
const mult = ThrowParty(corp, props.office, cost);
|
||||||
dialogBoxCreate(
|
|
||||||
"You threw a party for the office! The morale and happiness " +
|
if (mult > 0) {
|
||||||
"of each employee increased by " +
|
dialogBoxCreate(
|
||||||
numeralWrapper.formatPercentage(mult - 1),
|
"You threw a party for the office! The morale and happiness " +
|
||||||
);
|
"of each employee increased by " +
|
||||||
|
numeralWrapper.formatPercentage(mult - 1),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
props.rerender();
|
props.rerender();
|
||||||
props.onClose();
|
props.onClose();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user