mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Merge pull request #1604 from danielyxie/dev
Real Estate takes up a little bit of room
This commit is contained in:
commit
61a27c3a58
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -563,11 +563,8 @@ export class Industry implements IIndustry {
|
|||||||
}
|
}
|
||||||
buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;
|
buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;
|
||||||
|
|
||||||
if (matName == "RealEstate") {
|
|
||||||
maxAmt = corporation.funds.toNumber() / mat.bCost;
|
|
||||||
} else {
|
|
||||||
maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);
|
maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);
|
||||||
}
|
|
||||||
buyAmt = Math.min(buyAmt, maxAmt);
|
buyAmt = Math.min(buyAmt, maxAmt);
|
||||||
if (buyAmt > 0) {
|
if (buyAmt > 0) {
|
||||||
mat.qty += buyAmt;
|
mat.qty += buyAmt;
|
||||||
|
@ -12,7 +12,7 @@ export const MaterialSizes: IMap<number> = {
|
|||||||
Drugs: 0.02,
|
Drugs: 0.02,
|
||||||
Robots: 0.5,
|
Robots: 0.5,
|
||||||
AICores: 0.1,
|
AICores: 0.1,
|
||||||
RealEstate: 0,
|
RealEstate: 0.005,
|
||||||
"Real Estate": 0,
|
"Real Estate": 0.005,
|
||||||
"AI Cores": 0,
|
"AI Cores": 0.1,
|
||||||
};
|
};
|
||||||
|
@ -110,7 +110,6 @@ function WarehouseRoot(props: IProps): React.ReactElement {
|
|||||||
|
|
||||||
let breakdown = <></>;
|
let breakdown = <></>;
|
||||||
for (const matName in props.warehouse.materials) {
|
for (const matName in props.warehouse.materials) {
|
||||||
if (matName === "RealEstate") continue;
|
|
||||||
const mat = props.warehouse.materials[matName];
|
const mat = props.warehouse.materials[matName];
|
||||||
if (!MaterialSizes.hasOwnProperty(matName)) continue;
|
if (!MaterialSizes.hasOwnProperty(matName)) continue;
|
||||||
if (mat.qty === 0) continue;
|
if (mat.qty === 0) continue;
|
||||||
|
@ -75,7 +75,8 @@ import { INetscriptGang, NetscriptGang } from "./NetscriptFunctions/Gang";
|
|||||||
import { INetscriptSleeve, NetscriptSleeve } from "./NetscriptFunctions/Sleeve";
|
import { INetscriptSleeve, NetscriptSleeve } from "./NetscriptFunctions/Sleeve";
|
||||||
import { INetscriptExtra, NetscriptExtra } from "./NetscriptFunctions/Extra";
|
import { INetscriptExtra, NetscriptExtra } from "./NetscriptFunctions/Extra";
|
||||||
import { INetscriptHacknet, NetscriptHacknet } from "./NetscriptFunctions/Hacknet";
|
import { INetscriptHacknet, NetscriptHacknet } from "./NetscriptFunctions/Hacknet";
|
||||||
import { INetscriptBladeburner, NetscriptBladeburner } from "./NetscriptFunctions/Bladeburner";
|
import { Bladeburner as INetscriptBladeburner } from "./ScriptEditor/NetscriptDefinitions";
|
||||||
|
import { NetscriptBladeburner } from "./NetscriptFunctions/Bladeburner";
|
||||||
import { INetscriptCodingContract, NetscriptCodingContract } from "./NetscriptFunctions/CodingContract";
|
import { INetscriptCodingContract, NetscriptCodingContract } from "./NetscriptFunctions/CodingContract";
|
||||||
import { INetscriptCorporation, NetscriptCorporation } from "./NetscriptFunctions/Corporation";
|
import { INetscriptCorporation, NetscriptCorporation } from "./NetscriptFunctions/Corporation";
|
||||||
import { INetscriptFormulas, NetscriptFormulas } from "./NetscriptFunctions/Formulas";
|
import { INetscriptFormulas, NetscriptFormulas } from "./NetscriptFunctions/Formulas";
|
||||||
|
@ -4,43 +4,7 @@ import { IPlayer } from "../PersonObjects/IPlayer";
|
|||||||
import { Bladeburner } from "../Bladeburner/Bladeburner";
|
import { Bladeburner } from "../Bladeburner/Bladeburner";
|
||||||
import { getRamCost } from "../Netscript/RamCostGenerator";
|
import { getRamCost } from "../Netscript/RamCostGenerator";
|
||||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||||
|
import { Bladeburner as INetscriptBladeburner } from "../ScriptEditor/NetscriptDefinitions";
|
||||||
export interface INetscriptBladeburner {
|
|
||||||
getContractNames(): any;
|
|
||||||
getOperationNames(): any;
|
|
||||||
getBlackOpNames(): any;
|
|
||||||
getBlackOpRank(name?: any): any;
|
|
||||||
getGeneralActionNames(): any;
|
|
||||||
getSkillNames(): any;
|
|
||||||
startAction(type?: any, name?: any): any;
|
|
||||||
stopBladeburnerAction(): any;
|
|
||||||
getCurrentAction(): any;
|
|
||||||
getActionTime(type?: any, name?: any): any;
|
|
||||||
getActionEstimatedSuccessChance(type?: any, name?: any): any;
|
|
||||||
getActionRepGain(type?: any, name?: any, level?: any): any;
|
|
||||||
getActionCountRemaining(type?: any, name?: any): any;
|
|
||||||
getActionMaxLevel(type?: any, name?: any): any;
|
|
||||||
getActionCurrentLevel(type?: any, name?: any): any;
|
|
||||||
getActionAutolevel(type?: any, name?: any): any;
|
|
||||||
setActionAutolevel(type?: any, name?: any, autoLevel?: any): any;
|
|
||||||
setActionLevel(type?: any, name?: any, level?: any): any;
|
|
||||||
getRank(): any;
|
|
||||||
getSkillPoints(): any;
|
|
||||||
getSkillLevel(skillName?: any): any;
|
|
||||||
getSkillUpgradeCost(skillName?: any): any;
|
|
||||||
upgradeSkill(skillName: any): any;
|
|
||||||
getTeamSize(type?: any, name?: any): any;
|
|
||||||
setTeamSize(type?: any, name?: any, size?: any): any;
|
|
||||||
getCityEstimatedPopulation(cityName: any): any;
|
|
||||||
getCityCommunities(cityName: any): any;
|
|
||||||
getCityChaos(cityName: any): any;
|
|
||||||
getCity(): any;
|
|
||||||
switchCity(cityName: any): any;
|
|
||||||
getStamina(): any;
|
|
||||||
joinBladeburnerFaction(): any;
|
|
||||||
joinBladeburnerDivision(): any;
|
|
||||||
getBonusTime(): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function NetscriptBladeburner(
|
export function NetscriptBladeburner(
|
||||||
player: IPlayer,
|
player: IPlayer,
|
||||||
|
@ -2408,7 +2408,7 @@ interface HackNet {
|
|||||||
spendHashes(upgName: HashUpgrades, upgTarget?: Host): boolean;
|
spendHashes(upgName: HashUpgrades, upgTarget?: Host): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BladeBurner {
|
export interface Bladeburner {
|
||||||
/**
|
/**
|
||||||
* You have to be employed in the Bladeburner division and be in BitNode-7
|
* You have to be employed in the Bladeburner division and be in BitNode-7
|
||||||
* or have Source-File 7 in order to use this function.
|
* or have Source-File 7 in order to use this function.
|
||||||
@ -2804,9 +2804,9 @@ interface BladeBurner {
|
|||||||
*
|
*
|
||||||
* @ramCost 4 GB
|
* @ramCost 4 GB
|
||||||
* @param {string} cityName Name of city. Case-sensitive
|
* @param {string} cityName Name of city. Case-sensitive
|
||||||
* @returns {number} Estimated number of Synthoids communities in the specified city.
|
* @returns {number} Number of Synthoids communities in the specified city.
|
||||||
*/
|
*/
|
||||||
getCityEstimatedCommunities(name: City): number;
|
getCityCommunities(name: City): number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You have to be employed in the Bladeburner division and be in BitNode-7
|
* You have to be employed in the Bladeburner division and be in BitNode-7
|
||||||
@ -3377,7 +3377,7 @@ export interface NS extends Singularity {
|
|||||||
/**
|
/**
|
||||||
* @ramCost 0 GB
|
* @ramCost 0 GB
|
||||||
*/
|
*/
|
||||||
readonly bladeburner: BladeBurner;
|
readonly bladeburner: Bladeburner;
|
||||||
/**
|
/**
|
||||||
* @ramCost 0 GB
|
* @ramCost 0 GB
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user