respect disable ascii art

This commit is contained in:
Olivier Gagnon 2021-09-21 17:46:01 -04:00
parent 2a8b1c2116
commit 8977f299e5
2 changed files with 20 additions and 2 deletions

@ -3,6 +3,7 @@ import { removePopup } from "../../ui/React/createPopup";
import { IBladeburner } from "../IBladeburner";
import { WorldMap } from "../../ui/React/WorldMap";
import { CityName } from "../../Locations/data/CityNames";
import { Settings } from "../../Settings/Settings";
interface IProps {
bladeburner: IBladeburner;
@ -21,7 +22,15 @@ export function TravelPopup(props: IProps): React.ReactElement {
Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in
for your Bladeburner duties does not affect your location in the game otherwise.
</p>
<WorldMap currentCity={props.bladeburner.city as CityName} onTravel={(city: CityName) => travel(city)} />
{Settings.DisableASCIIArt ? (
Object.values(CityName).map((city: CityName) => (
<button key={city} className="std-button" onClick={() => travel(city)}>
{city}
</button>
))
) : (
<WorldMap currentCity={props.bladeburner.city as CityName} onTravel={(city: CityName) => travel(city)} />
)}
</>
);
}

@ -6,6 +6,7 @@ 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 { Settings } from "../../../Settings/Settings";
import { dialogBoxCreate } from "../../../../utils/DialogBox";
interface IProps {
@ -34,7 +35,15 @@ 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>
<WorldMap currentCity={props.sleeve.city} onTravel={(city: CityName) => travel(city)} />
{Settings.DisableASCIIArt ? (
Object.values(CityName).map((city: CityName) => (
<button key={city} className="std-button" onClick={() => travel(city)}>
{city}
</button>
))
) : (
<WorldMap currentCity={props.sleeve.city} onTravel={(city: CityName) => travel(city)} />
)}
</>
);
}