Research func, gopublic function, and validation

This commit is contained in:
pigalot
2022-01-13 17:47:11 +00:00
parent 2269f79b15
commit 98e8910c3a
4 changed files with 118 additions and 25 deletions

View File

@@ -6145,13 +6145,27 @@ export interface OfficeAPI {
* @param divisionName - Name of the division
* @returns Cost
*/
getHireAdVertCost(adivisionName: string): number;
getHireAdVertCost(divisionName: string): number;
/**
* Get the number of times you have Hired AdVert
* @param divisionName - Name of the division
* @returns Number of times you have Hired AdVert
*/
getHireAdVertCount(adivisionName: string): number;
/**
* Get the cost to unlock research
* @param divisionName - Name of the division
* @param cityName - Name of the city
* @returns cost
*/
getResearchCost(divisionName: string, researchName: string): number;
/**
* Gets if you have unlocked a research
* @param divisionName - Name of the division
* @param cityName - Name of the city
* @returns true is unlocked, false if not
*/
hasResearched(divisionName: string, researchName: string): boolean;
}
/**
@@ -6395,6 +6409,12 @@ export interface Corporation extends WarehouseAPI, OfficeAPI {
* @returns An offer of investment
*/
acceptInvestmentOffer(): boolean;
/**
* Go public
* @param numShares number of shares you would like to issue for your IPO
* @returns true if you successfully go public, false if not
*/
goPublic(numShares: number): boolean;
/**
* Get corporation data
* @returns Corporation data
@@ -6507,6 +6527,12 @@ interface Product {
pCost: number;
/** Sell cost, can be "MP+5" */
sCost: string | number;
/** Data refers to the production, sale, and quantity of the products
* These values are specific to a city
* For each city, the data is [qty, prod, sell] */
cityData: {[key: string]:number[]};
/** Creation progress - A number betwee 0-100 representing percentage */
developmentProgress: number;
}
/**
@@ -6520,6 +6546,10 @@ interface Material {
qty: number;
/** Quality of the material */
qlt: number;
/** Amount of material produced */
prod: number;
/** Amount of material sold */
sell: number;
}
/**
@@ -6607,6 +6637,8 @@ interface Division {
upgrades: number[];
/** Cities in which this division has expanded */
cities: string[];
/** Products developed by this division */
products: string[];
}
/**