mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-22 02:02:30 +01:00
add the industry name to assist with debugging when error occurs
This commit is contained in:
@ -17,7 +17,7 @@ import { ResearchMap } from "./ResearchMap";
|
|||||||
|
|
||||||
export function NewIndustry(corporation: ICorporation, industry: string, name: string): void {
|
export function NewIndustry(corporation: ICorporation, industry: string, name: string): void {
|
||||||
if (corporation.divisions.find(({ type }) => industry == type))
|
if (corporation.divisions.find(({ type }) => industry == type))
|
||||||
throw new Error("You have already expanded into this industry!");
|
throw new Error(`You have already expanded into the ${industry} industry!`);
|
||||||
|
|
||||||
for (let i = 0; i < corporation.divisions.length; ++i) {
|
for (let i = 0; i < corporation.divisions.length; ++i) {
|
||||||
if (corporation.divisions[i].name === name) {
|
if (corporation.divisions[i].name === name) {
|
||||||
|
Reference in New Issue
Block a user