Bugfix for creating products in invalid industries

This commit is contained in:
phyzical 2022-01-17 17:58:09 +08:00
parent 8b52607113
commit b742fae1c6

@ -334,6 +334,9 @@ export function MakeProduct(
if (productName == null || productName === "") {
throw new Error("You must specify a name for your product!");
}
if (!division.makesProducts) {
throw new Error("You cannot create products for this industry!");
}
if (isNaN(designInvest)) {
throw new Error("Invalid value for design investment");
}