use text friendly divison name

This commit is contained in:
phyzical 2022-02-19 16:06:52 +08:00
parent 6e21f16160
commit 887f3f1e49

@ -438,7 +438,7 @@ export function NetscriptCorporation(
bulkPurchase: function (adivisionName: any, acityName: any, amaterialName: any, aamt: any): void { bulkPurchase: function (adivisionName: any, acityName: any, amaterialName: any, aamt: any): void {
checkAccess("bulkPurchase", 7); checkAccess("bulkPurchase", 7);
const divisionName = helper.string("bulkPurchase", "divisionName", adivisionName); const divisionName = helper.string("bulkPurchase", "divisionName", adivisionName);
if (!hasResearched(getDivision(adivisionName), "Bulk Purchasing")) throw new Error(`You have not researched Bulk Purchasing in ${adivisionName}`) if (!hasResearched(getDivision(adivisionName), "Bulk Purchasing")) throw new Error(`You have not researched Bulk Purchasing in ${divisionName}`)
const corporation = getCorporation(); const corporation = getCorporation();
const cityName = helper.string("bulkPurchase", "cityName", acityName); const cityName = helper.string("bulkPurchase", "cityName", acityName);
const materialName = helper.string("bulkPurchase", "materialName", amaterialName); const materialName = helper.string("bulkPurchase", "materialName", amaterialName);