mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 02:03:58 +01:00
added singularity.goToLocation support for non-city-specific locations
This commit is contained in:
parent
6f017bf4f6
commit
d319b3f982
@ -244,11 +244,17 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
|
||||
_ctx.log(() => `No location named ${locationName}`);
|
||||
return false;
|
||||
}
|
||||
if (player.city !== location.city) {
|
||||
if (location.city && player.city !== location.city) {
|
||||
_ctx.log(() => `No location named ${locationName} in ${player.city}`);
|
||||
return false;
|
||||
}
|
||||
Router.toLocation(location);
|
||||
if (location.name === LocationName.TravelAgency) {
|
||||
Router.toTravel();
|
||||
} else if (location.name === LocationName.WorldStockExchange) {
|
||||
Router.toStockMarket();
|
||||
} else {
|
||||
Router.toLocation(location);
|
||||
}
|
||||
player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50000);
|
||||
return true;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user