mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 04:35:46 +01:00
GANG: Fix Gang UI to correctly report the bonus time multiplier as 25x
Add Tooltop to Corporation UI to explain bonus time (matching the one in Gang UI) Move corporation.process to the correct location
This commit is contained in:
parent
e7fc0fbb03
commit
533d8a4332
@ -296,10 +296,21 @@ function BonusTime(): React.ReactElement {
|
||||
const storedTime = corp.storedCycles * CONSTANTS.MilliPerCycle;
|
||||
if (storedTime <= 15000) return <></>;
|
||||
return (
|
||||
<Typography>
|
||||
Bonus time: {convertTimeMsToTimeElapsedString(storedTime)}
|
||||
<br />
|
||||
<br />
|
||||
</Typography>
|
||||
<Box display="flex">
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the
|
||||
browser). Bonus time makes the Corporation mechanic progress faster, up to 10x the normal speed.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>
|
||||
Bonus time: {convertTimeMsToTimeElapsedString(storedTime)}
|
||||
<br />
|
||||
<br />
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ export class Gang {
|
||||
}
|
||||
|
||||
process(numCycles = 1): void {
|
||||
// Run every cycle
|
||||
const CyclesPerSecond = 1000 / CONSTANTS._idleSpeed;
|
||||
|
||||
if (isNaN(numCycles)) {
|
||||
@ -89,6 +90,7 @@ export class Gang {
|
||||
this.storedCycles += numCycles;
|
||||
|
||||
// Only process if there are at least 2 seconds, and at most 5 seconds
|
||||
// works out as 5 * 5 for 25x per cycle during bonus time
|
||||
if (this.storedCycles < 2 * CyclesPerSecond) return;
|
||||
const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);
|
||||
|
||||
|
@ -21,7 +21,7 @@ export function BonusTime(props: IProps): React.ReactElement {
|
||||
title={
|
||||
<Typography>
|
||||
You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the
|
||||
browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.
|
||||
browser). Bonus time makes the Gang mechanic progress faster, up to 25x the normal speed.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
|
@ -104,7 +104,10 @@ const Engine: {
|
||||
staneksGift.process(numCycles);
|
||||
|
||||
// Corporation
|
||||
if (Player.corporation) Player.corporation.storeCycles(numCycles);
|
||||
if (Player.corporation) {
|
||||
Player.corporation.storeCycles(numCycles);
|
||||
Player.corporation.process();
|
||||
}
|
||||
|
||||
// Bladeburner
|
||||
if (Player.bladeburner) Player.bladeburner.storeCycles(numCycles);
|
||||
@ -192,9 +195,6 @@ const Engine: {
|
||||
Engine.Counters.messages = 150;
|
||||
}
|
||||
}
|
||||
if (Player.corporation) {
|
||||
Player.corporation.process();
|
||||
}
|
||||
if (Engine.Counters.mechanicProcess <= 0) {
|
||||
if (Player.bladeburner) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user