diff --git a/src/NetscriptFunctions/Corporation.ts b/src/NetscriptFunctions/Corporation.ts index e20fc21bb..b00f66f68 100644 --- a/src/NetscriptFunctions/Corporation.ts +++ b/src/NetscriptFunctions/Corporation.ts @@ -846,5 +846,9 @@ export function NetscriptCorporation( const amountShares = helper.number("bribe", "amountShares", aamountShares); return bribe(factionName, amountCash, amountShares); }, + getBonusTime: function (): number { + checkAccess("getBonusTime"); + return Math.round(getCorporation().storedCycles / 5) * 1000; + } }; } diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index d46b1b0f6..6595ec899 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -6651,6 +6651,17 @@ export interface Corporation extends WarehouseAPI, OfficeAPI { * */ sellShares(amount: number): void; + /** + * Get bonus time. + * + * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. + * + * “Bonus time” makes the game progress faster. + * + * @returns Bonus time for the Corporation mechanic in milliseconds. + */ + getBonusTime(): number; + } /**