mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-06 15:47:52 +02:00
Commit1
This commit is contained in:
@@ -3,6 +3,5 @@
|
||||
* Key = City Name, Value = City object
|
||||
*/
|
||||
import { City } from "./City";
|
||||
import { IMap } from "../types";
|
||||
|
||||
export const Cities: IMap<City> = {};
|
||||
export const Cities: Record<string, City> = {};
|
||||
|
||||
@@ -8,9 +8,7 @@ import { Location, IConstructorParams } from "./Location";
|
||||
import { CityName } from "./data/CityNames";
|
||||
import { LocationsMetadata } from "./data/LocationsMetadata";
|
||||
|
||||
import { IMap } from "../types";
|
||||
|
||||
export const Locations: IMap<Location> = {};
|
||||
export const Locations: Record<string, Location> = {};
|
||||
|
||||
/**
|
||||
* Here, we'll initialize both Locations and Cities data. These can both
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
* This map uses the official name of the city, NOT its key in the 'Cities' object
|
||||
*/
|
||||
import { Cities } from "./Cities";
|
||||
import { IMap } from "../types";
|
||||
|
||||
export function createCityMap<T>(initValue: T): IMap<T> {
|
||||
const map: IMap<T> = {};
|
||||
export function createCityMap<T>(initValue: T): Record<string, T> {
|
||||
const map: Record<string, T> = {};
|
||||
const cities = Object.keys(Cities);
|
||||
for (let i = 0; i < cities.length; ++i) {
|
||||
map[cities[i]] = initValue;
|
||||
|
||||
@@ -25,7 +25,7 @@ import { Router } from "../../ui/GameRoot";
|
||||
import { Player } from "../../Player";
|
||||
|
||||
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
||||
import { SnackbarEvents, ToastVariant } from "../../ui/React/Snackbar";
|
||||
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||
import { N00dles } from "../../utils/helpers/N00dles";
|
||||
import { Exploit } from "../../Exploits/Exploit";
|
||||
import { applyAugmentation } from "../../Augmentation/AugmentationHelpers";
|
||||
@@ -95,7 +95,7 @@ export function SpecialLocation(props: IProps): React.ReactElement {
|
||||
|
||||
function renderNoodleBar(): React.ReactElement {
|
||||
function EatNoodles(): void {
|
||||
SnackbarEvents.emit("You ate some delicious noodles and feel refreshed", ToastVariant.SUCCESS, 2000);
|
||||
SnackbarEvents.emit("You ate some delicious noodles and feel refreshed", "success", 2000);
|
||||
N00dles(); // This is the true power of the noodles.
|
||||
if (Player.sourceFiles.length > 0) Player.giveExploit(Exploit.N00dles);
|
||||
if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {
|
||||
|
||||
Reference in New Issue
Block a user