This commit is contained in:
Snarling
2022-10-03 12:12:16 -04:00
parent ab56d18e1e
commit 50f14b4f58
67 changed files with 307 additions and 599 deletions
+1 -2
View File
@@ -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> = {};
+1 -3
View File
@@ -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
+2 -3
View File
@@ -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;
+2 -2
View File
@@ -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) {