mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-04-04 17:31:29 +02:00
fix 2993 sleeve.travel with invalid city names
This commit is contained in:
@ -99,7 +99,17 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
|
|||||||
const cityName = helper.string("travel", "cityName", _cityName);
|
const cityName = helper.string("travel", "cityName", _cityName);
|
||||||
checkSleeveAPIAccess("travel");
|
checkSleeveAPIAccess("travel");
|
||||||
checkSleeveNumber("travel", sleeveNumber);
|
checkSleeveNumber("travel", sleeveNumber);
|
||||||
return player.sleeves[sleeveNumber].travel(player, cityName as CityName);
|
switch (cityName) {
|
||||||
|
case CityName.Aevum:
|
||||||
|
case CityName.Chongqing:
|
||||||
|
case CityName.Sector12:
|
||||||
|
case CityName.NewTokyo:
|
||||||
|
case CityName.Ishima:
|
||||||
|
case CityName.Volhaven:
|
||||||
|
return player.sleeves[sleeveNumber].travel(player, cityName as CityName);
|
||||||
|
default:
|
||||||
|
throw helper.makeRuntimeErrorMsg("sleeve.setToCompanyWork", `Invalid city name: '${cityName}'.`);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setToCompanyWork: function (_sleeveNumber: unknown, acompanyName: unknown): boolean {
|
setToCompanyWork: function (_sleeveNumber: unknown, acompanyName: unknown): boolean {
|
||||||
updateRam("setToCompanyWork");
|
updateRam("setToCompanyWork");
|
||||||
|
Reference in New Issue
Block a user