mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
no more any in corp
This commit is contained in:
parent
d65cbf07f4
commit
f987ff9e2a
@ -34,8 +34,8 @@ interface IParams {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
let corpRouting: any;
|
let corpRouting: CorporationRouting;
|
||||||
let companyManagementDiv: any;
|
let companyManagementDiv: HTMLDivElement | null = null;
|
||||||
|
|
||||||
export class Corporation {
|
export class Corporation {
|
||||||
name = "The Corporation";
|
name = "The Corporation";
|
||||||
@ -379,7 +379,7 @@ export class Corporation {
|
|||||||
id:"cmpy-mgmt-container",
|
id:"cmpy-mgmt-container",
|
||||||
position:"fixed",
|
position:"fixed",
|
||||||
class:"generic-menupage-container",
|
class:"generic-menupage-container",
|
||||||
});
|
}) as HTMLDivElement;
|
||||||
const game = document.getElementById("entire-game-container");
|
const game = document.getElementById("entire-game-container");
|
||||||
if(game)
|
if(game)
|
||||||
game.appendChild(companyManagementDiv);
|
game.appendChild(companyManagementDiv);
|
||||||
|
@ -57,7 +57,7 @@ export interface IIndustry {
|
|||||||
processProduct(marketCycles: number, product: Product, corporation: ICorporation): number;
|
processProduct(marketCycles: number, product: Product, corporation: ICorporation): number;
|
||||||
discontinueProduct(product: Product): void;
|
discontinueProduct(product: Product): void;
|
||||||
upgrade(upgrade: IndustryUpgrade, refs: {corporation: ICorporation; office: OfficeSpace}): void;
|
upgrade(upgrade: IndustryUpgrade, refs: {corporation: ICorporation; office: OfficeSpace}): void;
|
||||||
getOfficeProductivity(office: OfficeSpace, params?: any): number;
|
getOfficeProductivity(office: OfficeSpace, params?: {forProduct?: boolean}): number;
|
||||||
getBusinessFactor(office: OfficeSpace): number;
|
getBusinessFactor(office: OfficeSpace): number;
|
||||||
getAdvertisingFactors(): [number, number, number, number];
|
getAdvertisingFactors(): [number, number, number, number];
|
||||||
getMarketFactor(mat: {dmd: number; cmp: number}): number;
|
getMarketFactor(mat: {dmd: number; cmp: number}): number;
|
||||||
|
@ -1185,7 +1185,7 @@ export class Industry implements IIndustry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Returns how much of a material can be produced based of office productivity (employee stats)
|
// Returns how much of a material can be produced based of office productivity (employee stats)
|
||||||
getOfficeProductivity(office: OfficeSpace, params: any = {}): number {
|
getOfficeProductivity(office: OfficeSpace, params: {forProduct?: boolean} = {}): number {
|
||||||
const opProd = office.employeeProd[EmployeePositions.Operations];
|
const opProd = office.employeeProd[EmployeePositions.Operations];
|
||||||
const engrProd = office.employeeProd[EmployeePositions.Engineer];
|
const engrProd = office.employeeProd[EmployeePositions.Engineer];
|
||||||
const mgmtProd = office.employeeProd[EmployeePositions.Management]
|
const mgmtProd = office.employeeProd[EmployeePositions.Management]
|
||||||
|
@ -38,7 +38,7 @@ export class OfficeSpace {
|
|||||||
minHap = 0;
|
minHap = 0;
|
||||||
maxHap = 100;
|
maxHap = 100;
|
||||||
maxMor = 100;
|
maxMor = 100;
|
||||||
employees: any[] = [];
|
employees: Employee[] = [];
|
||||||
employeeProd: {[key: string]: number} = {
|
employeeProd: {[key: string]: number} = {
|
||||||
[EmployeePositions.Operations]: 0,
|
[EmployeePositions.Operations]: 0,
|
||||||
[EmployeePositions.Engineer]: 0,
|
[EmployeePositions.Engineer]: 0,
|
||||||
@ -186,7 +186,7 @@ export class OfficeSpace {
|
|||||||
innerHTML: "Select one of the following candidates for hire:",
|
innerHTML: "Select one of the following candidates for hire:",
|
||||||
});
|
});
|
||||||
|
|
||||||
function createEmpDiv(employee: any, office: any): HTMLElement {
|
function createEmpDiv(employee: Employee, office: OfficeSpace): HTMLElement {
|
||||||
const div = createElement("div", {
|
const div = createElement("div", {
|
||||||
class:"cmpy-mgmt-find-employee-option",
|
class:"cmpy-mgmt-find-employee-option",
|
||||||
innerHTML: "Intelligence: " + formatNumber(employee.int, 1) + "<br>" +
|
innerHTML: "Intelligence: " + formatNumber(employee.int, 1) + "<br>" +
|
||||||
|
@ -27,9 +27,9 @@ export function ThrowPartyPopup(props: IProps): React.ReactElement {
|
|||||||
dialogBoxCreate("You don't have enough company funds to throw a party!");
|
dialogBoxCreate("You don't have enough company funds to throw a party!");
|
||||||
} else {
|
} else {
|
||||||
props.corp.funds = props.corp.funds.minus(totalCost);
|
props.corp.funds = props.corp.funds.minus(totalCost);
|
||||||
let mult;
|
let mult = 0;
|
||||||
for (let fooit = 0; fooit < props.office.employees.length; ++fooit) {
|
for (let i = 0; i < props.office.employees.length; ++i) {
|
||||||
mult = props.office.employees[fooit].throwParty(cost);
|
mult = props.office.employees[i].throwParty(cost);
|
||||||
}
|
}
|
||||||
dialogBoxCreate("You threw a party for the office! The morale and happiness " +
|
dialogBoxCreate("You threw a party for the office! The morale and happiness " +
|
||||||
"of each employee increased by " + numeralWrapper.formatPercentage((mult-1)));
|
"of each employee increased by " + numeralWrapper.formatPercentage((mult-1)));
|
||||||
|
Loading…
Reference in New Issue
Block a user