MISC: Add formulas API for calculating share power and move UI of sharing RAM (#2126)

This commit is contained in:
catloversg
2025-05-11 09:14:15 +07:00
committed by GitHub
parent 22ee7fca2c
commit 849bcb2601
12 changed files with 77 additions and 23 deletions

View File

@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ReputationFormulas](./bitburner.reputationformulas.md) &gt; [sharePower](./bitburner.reputationformulas.sharepower.md)
## ReputationFormulas.sharePower() method
Calculate the share power if you call [ns.share](./bitburner.ns.share.md) with the specified number of threads on a server having the specified number of CPU cores.
**Signature:**
```typescript
sharePower(threads: number, cpuCores?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| threads | number | Number of threads. Must be a positive integer. |
| cpuCores | number | _(Optional)_ Number of CPU cores. Must be a positive integer. The default value is 1. |
**Returns:**
number
The calculated share power.