CORPORATION: Happiness/Energy/Morale trend down even for productive corps (#157)

This commit is contained in:
Snarling
2022-10-25 10:32:20 -04:00
committed by GitHub
parent a79621612f
commit 5b2a96fa0c
8 changed files with 32 additions and 33 deletions
+1 -1
View File
@@ -223,7 +223,7 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
function getOffice(divisionName: string, cityName: string): OfficeSpace {
const division = getDivision(divisionName);
if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);
if (!checkEnum(CityName, cityName)) throw new Error(`Invalid city name '${cityName}'`);
const office = division.offices[cityName];
if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);
return office;