mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-02-16 18:12:24 +01:00
sleeve ui says bonus time and sleeves cant consume all bonus time at once.
This commit is contained in:
@ -479,6 +479,7 @@ export class Sleeve extends Person {
|
||||
|
||||
let time = this.storedCycles * CONSTANTS.MilliPerCycle;
|
||||
let cyclesUsed = this.storedCycles;
|
||||
cyclesUsed = Math.min(cyclesUsed, 15);
|
||||
if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {
|
||||
time = this.currentTaskMaxTime - this.currentTaskTime;
|
||||
cyclesUsed = Math.floor(time / CONSTANTS.MilliPerCycle);
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { Sleeve } from "../Sleeve";
|
||||
import { numeralWrapper } from "../../../ui/numeralFormat";
|
||||
import * as React from "react";
|
||||
import { convertTimeMsToTimeElapsedString } from "../../../../utils/StringHelperFunctions";
|
||||
import { CONSTANTS } from "../../../Constants";
|
||||
|
||||
interface IProps {
|
||||
sleeve: Sleeve;
|
||||
@ -77,6 +79,14 @@ export function StatsElement(props: IProps): React.ReactElement {
|
||||
{numeralWrapper.formatSleeveMemory(props.sleeve.memory)}
|
||||
</td>
|
||||
</tr>
|
||||
{props.sleeve.storedCycles > 15 && (
|
||||
<tr>
|
||||
<td>Bonus time: </td>
|
||||
<td style={style}>
|
||||
{convertTimeMsToTimeElapsedString((props.sleeve.storedCycles / (1000 / CONSTANTS._idleSpeed)) * 1000)}
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</>
|
||||
|
Reference in New Issue
Block a user