2019-03-27 09:31:47 +01:00
|
|
|
/**
|
|
|
|
* Map of all Locations in the game
|
|
|
|
* Key = Location name, value = Location object
|
|
|
|
*/
|
2021-09-05 01:09:30 +02:00
|
|
|
import { Cities } from "./Cities";
|
|
|
|
import { Location, IConstructorParams } from "./Location";
|
2022-12-30 02:28:53 +01:00
|
|
|
import { CityName } from "../Enums";
|
2021-09-05 01:09:30 +02:00
|
|
|
import { LocationsMetadata } from "./data/LocationsMetadata";
|
2019-03-27 09:31:47 +01:00
|
|
|
|
2022-10-03 18:12:16 +02:00
|
|
|
export const Locations: Record<string, Location> = {};
|
2019-03-27 09:31:47 +01:00
|
|
|
|
2019-03-29 08:12:41 +01:00
|
|
|
/**
|
|
|
|
* Here, we'll initialize both Locations and Cities data. These can both
|
|
|
|
* be initialized from the `LocationsMetadata`
|
|
|
|
*/
|
|
|
|
function constructLocation(p: IConstructorParams): Location {
|
2021-09-05 01:09:30 +02:00
|
|
|
if (!p.name) {
|
2021-09-09 05:47:34 +02:00
|
|
|
throw new Error(`Invalid constructor parameters for Location. No 'name' property`);
|
2021-09-05 01:09:30 +02:00
|
|
|
}
|
2019-03-27 09:31:47 +01:00
|
|
|
|
2022-09-27 21:14:34 +02:00
|
|
|
if (Locations[p.name]) {
|
2021-09-09 05:47:34 +02:00
|
|
|
console.warn(`Property with name ${p.name} already exists and is being overwritten`);
|
2021-09-05 01:09:30 +02:00
|
|
|
}
|
2019-03-27 09:31:47 +01:00
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
Locations[p.name] = new Location(p);
|
2019-03-29 08:12:41 +01:00
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
return Locations[p.name];
|
2019-03-27 09:31:47 +01:00
|
|
|
}
|
|
|
|
|
2019-03-29 08:12:41 +01:00
|
|
|
// First construct all cities
|
2021-03-07 22:14:08 +01:00
|
|
|
Cities[CityName.Aevum].asciiArt = `
|
|
|
|
[aevum police headquarters] 26
|
|
|
|
o
|
|
|
|
I \\ [bachman & associates]
|
|
|
|
\\ 56 B
|
|
|
|
x \\ [summit university]
|
|
|
|
\\ \\ 28
|
2021-04-10 00:12:31 +02:00
|
|
|
\\ [snap fitness gym] x o--L-----------N
|
2021-03-07 22:14:08 +01:00
|
|
|
K \\ /
|
2021-04-10 00:12:31 +02:00
|
|
|
\\ \\ Q [casino]
|
2021-03-07 22:14:08 +01:00
|
|
|
x 58 \\ / [travel agency]
|
|
|
|
\\ 94 95 o
|
|
|
|
90 x 59 o------o |
|
|
|
|
\\ / \\ | 98 102 103
|
2021-04-10 00:12:31 +02:00
|
|
|
o--------O------x----o 93 96 o-----+------------o o----o
|
2021-03-07 22:14:08 +01:00
|
|
|
\\ | \\ /
|
|
|
|
[hospital] \\ 61 [ecorp] x 31 99 o-F-o 101
|
|
|
|
o |
|
|
|
|
| o---E-- | [fulcrum tech.]
|
|
|
|
x 62 / A [aerocorp]
|
|
|
|
[crush fitness gym] | / |
|
|
|
|
| / |
|
|
|
|
o--------D------+--o o
|
|
|
|
| |\\ [rho construction]
|
|
|
|
H [netlink tech.] | J
|
|
|
|
| | \\
|
|
|
|
| 34 x \\
|
|
|
|
[clarke inc.] C | \\ [world stock exchange]
|
|
|
|
| | \\
|
2021-04-10 00:12:31 +02:00
|
|
|
| | o-M-------R--------o
|
2021-03-07 22:14:08 +01:00
|
|
|
[galactic cybersystems] G 35 x
|
|
|
|
| [watchdog security]
|
|
|
|
|
|
|
|
|
67 o
|
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
[the slums] P `;
|
2021-03-07 22:14:08 +01:00
|
|
|
Cities[CityName.Chongqing].asciiArt = `
|
|
|
|
|
|
|
|
|
75 o
|
|
|
|
\\
|
|
|
|
o 76
|
|
|
|
7 | |
|
|
|
|
| + 77
|
|
|
|
[world stock exchange] F |
|
|
|
|
\\ o 78 [kuaigong international]
|
|
|
|
\\ /
|
2021-09-25 23:21:50 +02:00
|
|
|
38 o----x--x------x------A------G--
|
|
|
|
/ 39 | 41 [church]
|
2021-03-07 22:14:08 +01:00
|
|
|
37 o + 79 o--x--x-C-0
|
|
|
|
/ | /
|
|
|
|
/ x-----+-----x-----0 [hospital]
|
|
|
|
[solaris space system] B |
|
|
|
|
| + 80
|
|
|
|
| |
|
|
|
|
34 o E [travel agency]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x 82
|
2021-09-05 01:09:30 +02:00
|
|
|
[the slums] D `;
|
2021-03-07 22:14:08 +01:00
|
|
|
Cities[CityName.Ishima].asciiArt = `
|
|
|
|
o 59
|
|
|
|
o o |
|
|
|
|
[storm tech.] | | G [world stock exchange]
|
|
|
|
| | 28 |
|
|
|
|
23 o--C------o--------+----x----o |
|
|
|
|
/ / 25 | 27 \\ x 57
|
|
|
|
/ / | \\ |
|
|
|
|
/ / | \\ |
|
|
|
|
o 22 o | \\| 29/56
|
|
|
|
| | o
|
|
|
|
| [hospital] D / \\ 3 2 1
|
|
|
|
o | / \\ o-------x------o
|
|
|
|
/ o / \\ /
|
|
|
|
48 o / 55 x \\ /
|
2021-12-05 05:47:53 +01:00
|
|
|
\\ / / x [glitch]
|
2021-03-07 22:14:08 +01:00
|
|
|
\\ / [nova medical] / 4/30 \\
|
2021-12-05 05:47:53 +01:00
|
|
|
49 x A \\ H
|
2021-03-07 22:14:08 +01:00
|
|
|
/ \\ / \\
|
|
|
|
/ \\ [travel agency] F o 31
|
|
|
|
/ \\ 51 /
|
|
|
|
/ o----B------x-----o
|
|
|
|
o 50 52
|
|
|
|
[omega soft.]
|
2021-09-05 01:09:30 +02:00
|
|
|
[the slums] E `;
|
2021-03-07 22:14:08 +01:00
|
|
|
Cities[CityName.NewTokyo].asciiArt = `
|
|
|
|
|
|
|
|
|
|
|
|
o
|
|
|
|
\\
|
2022-03-11 21:19:10 +01:00
|
|
|
[arcade] E [defcomm]
|
2021-03-07 22:14:08 +01:00
|
|
|
\\
|
|
|
|
o--x---A--x--o [travel agency]
|
2022-03-11 21:19:10 +01:00
|
|
|
7 8 10 H
|
2021-03-07 22:14:08 +01:00
|
|
|
[vitalife] o 12 [global pharmaceuticals]
|
|
|
|
|
|
|
|
|
o--D-x----x-------x-C-+--------x--x-B-x---x-o
|
|
|
|
21 22 23 \\ 24 25 26 27
|
|
|
|
\\
|
|
|
|
[noodle bar] x 14
|
|
|
|
\\
|
|
|
|
\\
|
|
|
|
[hospital] o 15 [world stock exchange]
|
|
|
|
|
|
2022-03-11 21:19:10 +01:00
|
|
|
o--x--F--x-----x-----x---+---x----x--I--x-o
|
2021-03-07 22:14:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
o 17
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-11 21:19:10 +01:00
|
|
|
G [the slums]
|
2021-09-05 01:09:30 +02:00
|
|
|
`;
|
2021-03-07 22:14:08 +01:00
|
|
|
Cities[CityName.Sector12].asciiArt = `
|
|
|
|
78 o 97
|
|
|
|
o [icarus microsystems] /
|
|
|
|
N [powerhouse gym] o I
|
|
|
|
1 | | /
|
|
|
|
o-----+---x----o 4 A [alpha ent.] o-------o /
|
|
|
|
| 3 \\ | \\ /
|
|
|
|
| \\ | [iron gym] x 95
|
|
|
|
(79) x \\ | / \\
|
|
|
|
| o-E----+----x----J--o 10 / o----T--o
|
|
|
|
| | 8 \\ 94 x
|
|
|
|
80 x [city hall] | x 11 / [world stock exchange]
|
|
|
|
| | \\ /
|
|
|
|
| C [cia] \\ /
|
|
|
|
Q [hospital] | F P [universal energy]
|
|
|
|
| o [deltaone] \\ /
|
|
|
|
| 35 o---------x 13/92/36
|
|
|
|
L [megacorp] 33 / / \\
|
|
|
|
| o------------o 34 / \\
|
|
|
|
(29) | / [carmichael sec.] D \\
|
|
|
|
o-----+-----x------o / O [rothman university]
|
|
|
|
| 31 32 [nsa] M
|
|
|
|
| /
|
|
|
|
B [blade industries] H
|
|
|
|
| / [four sigma]
|
|
|
|
| [joe's guns] /
|
|
|
|
| /
|
|
|
|
85 o--G--------K--------S-------o 88 [the slums] R
|
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
[foodnstuff] [travel agency] `;
|
2021-03-07 22:14:08 +01:00
|
|
|
Cities[CityName.Volhaven].asciiArt = `
|
|
|
|
[omnia cybersystems]
|
|
|
|
17 66 68
|
|
|
|
o o------G-------o
|
|
|
|
\\ / \\
|
|
|
|
\\ o 65 o 69
|
|
|
|
[syscore sec.] H | |
|
|
|
|
\\ | | [millenium fitness gym]
|
|
|
|
\\ | 21 22 23 24 | 26
|
|
|
|
o----+--x--x----x---x---+-----x-------D-----o
|
|
|
|
19 | | 28
|
|
|
|
| F [omnitek inc.]
|
|
|
|
[hospital] J 63 o
|
|
|
|
| / 72
|
|
|
|
3 | 5 6 / 9
|
|
|
|
o--------+----x-----x----+----------M-------o
|
|
|
|
/ | |
|
|
|
|
/ 61 x [helios labs] B [world stock exchange]
|
|
|
|
[travel agency] L | |
|
|
|
|
/ | o
|
|
|
|
/ E [nwo] / 75
|
|
|
|
/ [computek] | /
|
|
|
|
/ A-------o------I-----o
|
|
|
|
1 o | |
|
|
|
|
| [zb] o 77
|
|
|
|
[lexocorp] C
|
|
|
|
|
|
|
|
|
o
|
|
|
|
57
|
|
|
|
|
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
[the slums] K `;
|
2021-03-07 22:14:08 +01:00
|
|
|
|
2019-03-29 08:12:41 +01:00
|
|
|
// Then construct all locations, and add them to the cities as we go.
|
|
|
|
for (const metadata of LocationsMetadata) {
|
2021-09-05 01:09:30 +02:00
|
|
|
const loc = constructLocation(metadata);
|
2019-03-29 08:12:41 +01:00
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
const cityName = loc.city;
|
|
|
|
if (cityName === null) {
|
|
|
|
// Generic location, add to all cities
|
2022-12-30 02:28:53 +01:00
|
|
|
for (const city of Object.values(CityName)) {
|
2021-09-05 01:09:30 +02:00
|
|
|
Cities[city].addLocation(loc.name);
|
2019-03-29 08:12:41 +01:00
|
|
|
}
|
2021-09-05 01:09:30 +02:00
|
|
|
} else {
|
|
|
|
Cities[cityName].addLocation(loc.name);
|
|
|
|
}
|
2019-03-27 09:31:47 +01:00
|
|
|
}
|