mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 19:14:32 +02:00
the world map is used every place a travel is done
This commit is contained in:
@@ -5,6 +5,7 @@ import { SleeveTaskType } from "../SleeveTaskTypesEnum";
|
||||
import { SleeveFaq } from "../data/SleeveFaq";
|
||||
|
||||
import { IPlayer } from "../../IPlayer";
|
||||
import { CONSTANTS } from "../../../Constants";
|
||||
|
||||
import { Faction } from "../../../Faction/Faction";
|
||||
import { Factions } from "../../../Faction/Factions";
|
||||
@@ -201,8 +202,13 @@ export function SleeveElem(props: IProps): React.ReactElement {
|
||||
<button className="std-button" onClick={openMoreStats}>
|
||||
More Stats
|
||||
</button>
|
||||
<button className="std-button" onClick={openTravel}>
|
||||
<button
|
||||
className={`std-button${props.player.money.lt(CONSTANTS.TravelCost) ? " tooltip" : ""}`}
|
||||
onClick={openTravel}
|
||||
disabled={props.player.money.lt(CONSTANTS.TravelCost)}
|
||||
>
|
||||
Travel
|
||||
{props.player.money.lt(CONSTANTS.TravelCost) && <span className="tooltiptext">Not enough money</span>}
|
||||
</button>
|
||||
<button
|
||||
className={`std-button${props.sleeve.shock < 100 ? " tooltip" : ""}`}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { CONSTANTS } from "../../../Constants";
|
||||
import { Cities } from "../../../Locations/Cities";
|
||||
import { removePopup } from "../../../ui/React/createPopup";
|
||||
import { Money } from "../../../ui/React/Money";
|
||||
import { WorldMap } from "../../../ui/React/WorldMap";
|
||||
import { CityName } from "../../../Locations/data/CityNames";
|
||||
import { dialogBoxCreate } from "../../../../utils/DialogBox";
|
||||
|
||||
@@ -34,13 +35,7 @@ export function TravelPopup(props: IProps): React.ReactElement {
|
||||
study. Traveling to a different city costs <Money money={CONSTANTS.TravelCost} player={props.player} />. It will
|
||||
also set your current sleeve task to idle.
|
||||
</p>
|
||||
{Object.keys(Cities)
|
||||
.filter((city: string) => props.sleeve.city !== city)
|
||||
.map((city: string) => (
|
||||
<div key={city} className="cmpy-mgmt-find-employee-option" onClick={() => travel(city)}>
|
||||
{city}
|
||||
</div>
|
||||
))}
|
||||
<WorldMap currentCity={props.sleeve.city} onTravel={(city: CityName) => travel(city)} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user