mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23: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;
|
||||
}
|
||||
|
||||
let corpRouting: any;
|
||||
let companyManagementDiv: any;
|
||||
let corpRouting: CorporationRouting;
|
||||
let companyManagementDiv: HTMLDivElement | null = null;
|
||||
|
||||
export class Corporation {
|
||||
name = "The Corporation";
|
||||
@ -379,7 +379,7 @@ export class Corporation {
|
||||
id:"cmpy-mgmt-container",
|
||||
position:"fixed",
|
||||
class:"generic-menupage-container",
|
||||
});
|
||||
}) as HTMLDivElement;
|
||||
const game = document.getElementById("entire-game-container");
|
||||
if(game)
|
||||
game.appendChild(companyManagementDiv);
|
||||
|
@ -57,7 +57,7 @@ export interface IIndustry {
|
||||
processProduct(marketCycles: number, product: Product, corporation: ICorporation): number;
|
||||
discontinueProduct(product: Product): 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;
|
||||
getAdvertisingFactors(): [number, number, 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)
|
||||
getOfficeProductivity(office: OfficeSpace, params: any = {}): number {
|
||||
getOfficeProductivity(office: OfficeSpace, params: {forProduct?: boolean} = {}): number {
|
||||
const opProd = office.employeeProd[EmployeePositions.Operations];
|
||||
const engrProd = office.employeeProd[EmployeePositions.Engineer];
|
||||
const mgmtProd = office.employeeProd[EmployeePositions.Management]
|
||||
|
@ -38,7 +38,7 @@ export class OfficeSpace {
|
||||
minHap = 0;
|
||||
maxHap = 100;
|
||||
maxMor = 100;
|
||||
employees: any[] = [];
|
||||
employees: Employee[] = [];
|
||||
employeeProd: {[key: string]: number} = {
|
||||
[EmployeePositions.Operations]: 0,
|
||||
[EmployeePositions.Engineer]: 0,
|
||||
@ -186,7 +186,7 @@ export class OfficeSpace {
|
||||
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", {
|
||||
class:"cmpy-mgmt-find-employee-option",
|
||||
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!");
|
||||
} else {
|
||||
props.corp.funds = props.corp.funds.minus(totalCost);
|
||||
let mult;
|
||||
for (let fooit = 0; fooit < props.office.employees.length; ++fooit) {
|
||||
mult = props.office.employees[fooit].throwParty(cost);
|
||||
let mult = 0;
|
||||
for (let i = 0; i < props.office.employees.length; ++i) {
|
||||
mult = props.office.employees[i].throwParty(cost);
|
||||
}
|
||||
dialogBoxCreate("You threw a party for the office! The morale and happiness " +
|
||||
"of each employee increased by " + numeralWrapper.formatPercentage((mult-1)));
|
||||
|
Loading…
Reference in New Issue
Block a user