/** * React Component for displaying the total production and production rate * of scripts on the 'Active Scripts' UI page */ import * as React from "react"; import { WorkerScript } from "../../Netscript/WorkerScript"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { Money } from "../React/Money"; type IProps = { p: IPlayer; workerScripts: Map; } export function ScriptProduction(props: IProps): React.ReactElement { const prodRateSinceLastAug = props.p.scriptProdSinceLastAug / (props.p.playtimeSinceLastAug / 1000); let onlineProduction = 0; for (const ws of props.workerScripts.values()) { onlineProduction += (ws.scriptRef.onlineMoneyMade / ws.scriptRef.onlineRunningTime); } return (

Total online production of Active scripts:  / sec
Total online production since last Aug installation:   ( / sec )

) }