mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 02:03:58 +01:00
add the industry name to assist with debugging when error occurs
This commit is contained in:
parent
608cc089b2
commit
105ea19eae
@ -17,7 +17,7 @@ import { ResearchMap } from "./ResearchMap";
|
||||
|
||||
export function NewIndustry(corporation: ICorporation, industry: string, name: string): void {
|
||||
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) {
|
||||
if (corporation.divisions[i].name === name) {
|
||||
|
Loading…
Reference in New Issue
Block a user