mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
CORP: rework (#428)
* corp overhaul: Corp production quality now depends on materials * corp overhaul: Product price can be set separately for each city * corp overhaul: export uses relatives * corp overhaul: ignore energy in quality * corp overhaul: getProduct() is city dependant * corp overhaul: bulkbuy available from start * corp overhaul: add multibuy for leveled upgrads * corp overhaul: changes to UI * corp overhaul: base quality 1, reqmat changes * corp overhaul: puchased material quality is 1 * corp overhaul: get rid of the text box from ta2 * corp overhaul: sold shares limitations * corp overhaul: coffee -> tea, training -> intern * corp overhaul: smartsupply has multiple options * corp overhaul: restart, literature, investore, ui * corp overhaul: nerf advertising * corp overhaul: bunch of stuff
This commit is contained in:
@@ -4,15 +4,19 @@ import {
|
||||
CorporationUnlockUpgrades,
|
||||
} from "../../Corporation/data/CorporationUnlockUpgrades";
|
||||
import { PlayerObject } from "./PlayerObject";
|
||||
import { resetIndustryResearchTrees } from "../../Corporation/IndustryData";
|
||||
|
||||
export function canAccessCorporation(this: PlayerObject): boolean {
|
||||
return this.bitNodeN === 3 || this.sourceFileLvl(3) > 0;
|
||||
}
|
||||
|
||||
export function startCorporation(this: PlayerObject, corpName: string, additionalShares = 0): void {
|
||||
export function startCorporation(this: PlayerObject, corpName: string, seedFunded: boolean): void {
|
||||
this.corporation = new Corporation({
|
||||
name: corpName,
|
||||
seedFunded: seedFunded,
|
||||
});
|
||||
//reset the research tree in case the corporation was restarted
|
||||
resetIndustryResearchTrees();
|
||||
|
||||
if (this.bitNodeN === 3 || this.sourceFileLvl(3) === 3) {
|
||||
const warehouseApi = CorporationUnlockUpgrades[CorporationUnlockUpgradeIndex.WarehouseAPI].index;
|
||||
@@ -22,5 +26,5 @@ export function startCorporation(this: PlayerObject, corpName: string, additiona
|
||||
this.corporation.unlockUpgrades[OfficeApi] = 1;
|
||||
}
|
||||
|
||||
this.corporation.totalShares += additionalShares;
|
||||
this.corporation.totalShares += seedFunded ? 500_000_000 : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user