mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 19:53:48 +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}`);
|
_ctx.log(() => `No location named ${locationName}`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (player.city !== location.city) {
|
if (location.city && player.city !== location.city) {
|
||||||
_ctx.log(() => `No location named ${locationName} in ${player.city}`);
|
_ctx.log(() => `No location named ${locationName} in ${player.city}`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (location.name === LocationName.TravelAgency) {
|
||||||
|
Router.toTravel();
|
||||||
|
} else if (location.name === LocationName.WorldStockExchange) {
|
||||||
|
Router.toStockMarket();
|
||||||
|
} else {
|
||||||
Router.toLocation(location);
|
Router.toLocation(location);
|
||||||
|
}
|
||||||
player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50000);
|
player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50000);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user