mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Implement getBonusTime in Corporation
Used documentation from other 'getBonusTime' methods
This commit is contained in:
parent
fc963bb583
commit
5702cb04b6
@ -846,5 +846,9 @@ export function NetscriptCorporation(
|
|||||||
const amountShares = helper.number("bribe", "amountShares", aamountShares);
|
const amountShares = helper.number("bribe", "amountShares", aamountShares);
|
||||||
return bribe(factionName, amountCash, amountShares);
|
return bribe(factionName, amountCash, amountShares);
|
||||||
},
|
},
|
||||||
|
getBonusTime: function (): number {
|
||||||
|
checkAccess("getBonusTime");
|
||||||
|
return Math.round(getCorporation().storedCycles / 5) * 1000;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
11
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
11
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -6651,6 +6651,17 @@ export interface Corporation extends WarehouseAPI, OfficeAPI {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
sellShares(amount: number): void;
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user