mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Moved unit databases outside of source and started adding country flags
This commit is contained in:
1
client/src/@types/server.d.ts
vendored
1
client/src/@types/server.d.ts
vendored
@@ -15,6 +15,7 @@ interface MissionData {
|
||||
theatre: string,
|
||||
dateAndTime: DateAndTime;
|
||||
commandModeOptions: CommandModeOptions;
|
||||
coalitions: {red: string[], blue: string[]} = {};
|
||||
}
|
||||
time: number;
|
||||
sessionHash: string;
|
||||
|
||||
@@ -21,6 +21,7 @@ export class MissionHandler {
|
||||
#spentSpawnPoint: number = 0;
|
||||
#commandModeDialog: HTMLElement;
|
||||
#commandModeErasDropdown: Dropdown;
|
||||
#coalitions: {red: string[], blue: string[]} = {red: [], blue: []};
|
||||
|
||||
constructor() {
|
||||
document.addEventListener("showCommandModeDialog", () => this.showCommandModeDialog());
|
||||
@@ -75,6 +76,9 @@ export class MissionHandler {
|
||||
/* Set the date and time data */
|
||||
this.#dateAndTime = data.mission.dateAndTime;
|
||||
|
||||
/* Set the coalition countries */
|
||||
this.#coalitions = data.mission.coalitions;
|
||||
|
||||
/* Set the command mode options */
|
||||
this.#setcommandModeOptions(data.mission.commandModeOptions);
|
||||
this.#remainingSetupTime = this.getCommandModeOptions().setupTime - this.getDateAndTime().elapsedTime;
|
||||
@@ -112,6 +116,10 @@ export class MissionHandler {
|
||||
return this.#remainingSetupTime;
|
||||
}
|
||||
|
||||
getCoalitions() {
|
||||
return this.#coalitions;
|
||||
}
|
||||
|
||||
getAvailableSpawnPoints() {
|
||||
if (this.getCommandModeOptions().commandMode === GAME_MASTER)
|
||||
return Infinity;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,594 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class HelicopterDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.blueprints = {
|
||||
"AH-64D_BLK_II": {
|
||||
"name": "AH-64D_BLK_II",
|
||||
"coalition": "blue",
|
||||
"era": "Modern",
|
||||
"label": "AH-64D Apache",
|
||||
"shortLabel": "AH64",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "AGM-114k Hellfire",
|
||||
"quantity": 8
|
||||
},
|
||||
{
|
||||
"name": "M151 Rocket Pod",
|
||||
"quantity": 2
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "2 * M261: M151 (6PD), 2 * Hellfire station: 4*AGM-114K",
|
||||
"name": "Gun / ATGM / Rocket"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "AGM-114K Hellfire",
|
||||
"quantity": 16
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "4 * Hellfire station: 4*AGM-114K",
|
||||
"name": "Gun / ATGM"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
""
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "ah-64.png"
|
||||
},
|
||||
"Ka-50_3": {
|
||||
"name": "Ka-50_3",
|
||||
"coalition": "red",
|
||||
"era": "Late Cold War",
|
||||
"label": "Ka-50 Hokum A",
|
||||
"shortLabel": "K50",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "Igla",
|
||||
"quantity": 4
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAP"
|
||||
],
|
||||
"code": "4xIgla",
|
||||
"name": "Gun / Fox 2"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "Igla",
|
||||
"quantity": 4
|
||||
},
|
||||
{
|
||||
"name": "S-13",
|
||||
"quantity": 10
|
||||
},
|
||||
{
|
||||
"name": "Kh-25ML",
|
||||
"quantity": 2
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"Anti-Ship"
|
||||
],
|
||||
"code": "2xKh-25ML, 10xS-13, 4xIgla",
|
||||
"name": "Gun / ASM / Rockets / Fox 2"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "Igla",
|
||||
"quantity": 4
|
||||
},
|
||||
{
|
||||
"name": "S-80FP",
|
||||
"quantity": 40
|
||||
},
|
||||
{
|
||||
"name": "Vikhr-M",
|
||||
"quantity": 12
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "12x9A4172, 40xS-8OFP, 4xIgla",
|
||||
"name": "Gun / ATGM / Rockets / Fox 2"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "Igla",
|
||||
"quantity": 4
|
||||
},
|
||||
{
|
||||
"name": "S-80FP",
|
||||
"quantity": 40
|
||||
},
|
||||
{
|
||||
"name": "Vikhr-M",
|
||||
"quantity": 12
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "12x9A4172, 40xS-8OFP, 4xIgla",
|
||||
"name": "Gun / ATGM"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "Igla",
|
||||
"quantity": 4
|
||||
},
|
||||
{
|
||||
"name": "FAB-500",
|
||||
"quantity": 2
|
||||
},
|
||||
{
|
||||
"name": "S-13",
|
||||
"quantity": 10
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"Strike"
|
||||
],
|
||||
"code": "10xS-13, 2xFAB-500, 4xIgla",
|
||||
"name": "Gun / Bombs / Rockets / Fox 2"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
""
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "ka-50.png"
|
||||
},
|
||||
"Mi-24P": {
|
||||
"name": "Mi-24P",
|
||||
"coalition": "red",
|
||||
"era": "Mid Cold War",
|
||||
"label": "Mi-24P Hind",
|
||||
"shortLabel": "Mi24",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "S-8KOM",
|
||||
"quantity": 40
|
||||
},
|
||||
{
|
||||
"name": "9M114 ATGM",
|
||||
"quantity": 8
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "2xB8V20 (S-8KOM)+8xATGM 9M114",
|
||||
"name": "Gun / ATGM / Rockets"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "S-24B",
|
||||
"quantity": 4
|
||||
},
|
||||
{
|
||||
"name": "9M114 ATGM",
|
||||
"quantity": 4
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"Strike"
|
||||
],
|
||||
"code": "4xS-24B+4xATGM 9M114",
|
||||
"name": "Gun / ATGM / Rockets"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "GUV-1 Grenade Launcher",
|
||||
"quantity": 4
|
||||
},
|
||||
{
|
||||
"name": "9M114 ATGM",
|
||||
"quantity": 4
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "4xGUV-1 AP30+4xATGM 9M114",
|
||||
"name": "Gun / ATGM / Grenade Launcher"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
""
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "mi-24.png"
|
||||
},
|
||||
"SA342L": {
|
||||
"name": "SA342L",
|
||||
"coalition": "blue",
|
||||
"era": "Mid Cold War",
|
||||
"label": "SA342L Gazelle",
|
||||
"shortLabel": "342",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "20mm Cannon",
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"name": "SNEB68",
|
||||
"quantity": 8
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"Recon"
|
||||
],
|
||||
"code": "M621, 8xSNEB68 EAP",
|
||||
"name": "Gun / ATGM / Rockets"
|
||||
}
|
||||
],
|
||||
"filename": "sa-342.png"
|
||||
},
|
||||
"SA342M": {
|
||||
"name": "SA342M",
|
||||
"coalition": "blue",
|
||||
"era": "Mid Cold War",
|
||||
"label": "SA342M Gazelle",
|
||||
"shortLabel": "342",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "HOT3",
|
||||
"quantity": 4
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "HOT3x4",
|
||||
"name": "ATGM"
|
||||
}
|
||||
],
|
||||
"filename": "sa-342.png"
|
||||
},
|
||||
"SA342Mistral": {
|
||||
"name": "SA342Mistral",
|
||||
"coalition": "blue",
|
||||
"era": "Mid Cold War",
|
||||
"label": "SA342Mistral Gazelle",
|
||||
"shortLabel": "342",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "Mistral",
|
||||
"quantity": 4
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAP"
|
||||
],
|
||||
"code": "Mistral x 4",
|
||||
"name": "Fox 2"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
""
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "sa-342.png"
|
||||
},
|
||||
"AH-1W": {
|
||||
"name": "AH-1W",
|
||||
"coalition": "blue",
|
||||
"era": "Mid Cold War",
|
||||
"label": "AH-1W Cobra",
|
||||
"shortLabel": "AH1",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "BGM-71 TOW",
|
||||
"quantity": 8
|
||||
},
|
||||
{
|
||||
"name": "Hydra-70 WP",
|
||||
"quantity": 38
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "8xBGM-71, 38xHYDRA-70 WP",
|
||||
"name": "TOW / Hydra"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "Hydra-70",
|
||||
"quantity": 76
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "76xHYDRA-70",
|
||||
"name": "Hydra"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
""
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "ah-1.png"
|
||||
},
|
||||
"Mi-26": {
|
||||
"name": "Mi-26",
|
||||
"coalition": "red",
|
||||
"era": "Late Cold War",
|
||||
"label": "Mi-26 Halo",
|
||||
"shortLabel": "M26",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
"Transport"
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "mi-26.png"
|
||||
},
|
||||
"Mi-28N": {
|
||||
"name": "Mi-28N",
|
||||
"coalition": "red",
|
||||
"era": "Modern",
|
||||
"label": "Mi-28N Havoc",
|
||||
"shortLabel": "M28",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "9M114 Shturm",
|
||||
"quantity": 16
|
||||
},
|
||||
{
|
||||
"name": "S-8",
|
||||
"quantity": 40
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "16x9M114, 40xS-8",
|
||||
"name": "ATGM / S-8"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
""
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "mi-28.png"
|
||||
},
|
||||
"Mi-8MT": {
|
||||
"name": "Mi-8MT",
|
||||
"coalition": "red",
|
||||
"era": "Mid Cold War",
|
||||
"label": "Mi-8MT Hip",
|
||||
"shortLabel": "Mi8",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "UPK",
|
||||
"quantity": 2
|
||||
},
|
||||
{
|
||||
"name": "B8",
|
||||
"quantity": 2
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "2 x UPK +2 x B8",
|
||||
"name": "Rockets / Gunpods"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
"Transport"
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "mi-8.png"
|
||||
},
|
||||
"SH-60B": {
|
||||
"name": "SH-60B",
|
||||
"coalition": "blue",
|
||||
"era": "Mid Cold War",
|
||||
"label": "SH-60B Seahawk",
|
||||
"shortLabel": "S60",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "AGM-119 ASM",
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "AGM-119",
|
||||
"name": "ASM"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
"Transport"
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "uh-60.png"
|
||||
},
|
||||
"UH-60A": {
|
||||
"name": "UH-60A",
|
||||
"coalition": "blue",
|
||||
"era": "Mid Cold War",
|
||||
"label": "UH-60A Blackhawk",
|
||||
"shortLabel": "U60",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
|
||||
],
|
||||
"roles": [
|
||||
"Transport"
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "uh-60.png"
|
||||
},
|
||||
"UH-1H": {
|
||||
"name": "UH-1H",
|
||||
"coalition": "blue",
|
||||
"era": "Early Cold War",
|
||||
"label": "UH-1H Huey",
|
||||
"shortLabel": "UH1",
|
||||
"loadouts": [
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
{
|
||||
"name": "M134 Minigun",
|
||||
"quantity": 2
|
||||
},
|
||||
{
|
||||
"name": "XM-158",
|
||||
"quantity": 2
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
"CAS"
|
||||
],
|
||||
"code": "M134 Minigun*2, XM158*2",
|
||||
"name": "Miniguns / XM158"
|
||||
},
|
||||
{
|
||||
"fuel": 1,
|
||||
"items": [
|
||||
],
|
||||
"roles": [
|
||||
"Transport"
|
||||
],
|
||||
"code": "",
|
||||
"name": "Empty Loadout"
|
||||
}
|
||||
],
|
||||
"filename": "uh-1.png"
|
||||
}
|
||||
}
|
||||
super('databases/helicopterdatabase.json');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
@@ -4,460 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class NavyUnitDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.blueprints = {
|
||||
"Type_052B": {
|
||||
"name": "Type_052B",
|
||||
"coalition": "red",
|
||||
"type": "Destroyer",
|
||||
"era": "Modern",
|
||||
"label": "052B DDG-168 Guangzhou",
|
||||
"shortLabel": "Type 52B",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"Type_052C": {
|
||||
"name": "Type_052C",
|
||||
"coalition": "red",
|
||||
"type": "Destroyer",
|
||||
"era": "Modern",
|
||||
"label": "052C DDG-171 Haikou",
|
||||
"shortLabel": "Type 52C",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"Type_054A": {
|
||||
"name": "",
|
||||
"coalition": "red",
|
||||
"type": "Frigate",
|
||||
"era": "Modern",
|
||||
"label": "054A FFG-538 Yantai",
|
||||
"shortLabel": "Type 54A",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"Type_071": {
|
||||
"name": "Type_071",
|
||||
"coalition": "red",
|
||||
"type": "Transport",
|
||||
"era": "Modern",
|
||||
"label": "Type 071",
|
||||
"shortLabel": "Type 071",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"Type_093": {
|
||||
"name": "Type_093",
|
||||
"coalition": "red",
|
||||
"type": "Submarine",
|
||||
"era": "Modern",
|
||||
"label": "Type 093",
|
||||
"shortLabel": "Type 093",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"santafe": {
|
||||
"name": "santafe",
|
||||
"coalition": "",
|
||||
"type": "Submarine",
|
||||
"era": "Early Cold War",
|
||||
"label": "ARA Santa Fe S-21",
|
||||
"shortLabel": "ARA Santa",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"ara_vdm": {
|
||||
"name": "ara_vdm",
|
||||
"coalition": "",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Mid Cold War",
|
||||
"label": "ARA Vienticinco de Mayo",
|
||||
"shortLabel": "ARA Vienticinco de Mayo",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"kuznecow": {
|
||||
"name": "kuznecow",
|
||||
"coalition": "red",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Late Cold War",
|
||||
"label": "Admiral Kuznetsov",
|
||||
"shortLabel": "Admiral Kuznetsov",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"albatros": {
|
||||
"name": "albatros",
|
||||
"coalition": "red",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Early Cold War",
|
||||
"label": "Albatros (Grisha-5)",
|
||||
"shortLabel": "Albatros",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"leander-gun-condell": {
|
||||
"name": "leander-gun-condell",
|
||||
"coalition": "",
|
||||
"type": "Frigate",
|
||||
"era": "Mid Cold War",
|
||||
"label": "Almirante Condell PFG-06",
|
||||
"shortLabel": "Almirante Condell",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"Boat Armed Hi-Speed": {
|
||||
"name": "Boat Armed Hi-Speed",
|
||||
"coalition": "",
|
||||
"type": "Fast Attack Craft",
|
||||
"era": "Mid Cold War",
|
||||
"label": "Boat Armed Hi-Speed",
|
||||
"shortLabel": "Boat Armed Hi-Speed",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"HandyWind": {
|
||||
"name": "HandyWind",
|
||||
"coalition": "blue",
|
||||
"type": "Cargoship",
|
||||
"era": "Late Cold War",
|
||||
"label": "Bulker Handy Wind",
|
||||
"shortLabel": "Bulker Handy Wind",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"CV_1143_5": {
|
||||
"name": "CV_1143_5",
|
||||
"coalition": "red",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Modern",
|
||||
"label": "CV Admiral Kuznetsov(2017)",
|
||||
"shortLabel": "Admiral Kuznetsov(2017)",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"CV_59": {
|
||||
"name": "CV_59",
|
||||
"coalition": "blue",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Early Cold War",
|
||||
"label": "CV-59 Forrestal",
|
||||
"shortLabel": "CV-59",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"CVN_71": {
|
||||
"name": "CVN_71",
|
||||
"coalition": "blue",
|
||||
"type": "Super Aircraft Carrier",
|
||||
"era": "Late Cold War",
|
||||
"label": "CVN-71 Theodore Roosevelt",
|
||||
"shortLabel": "CVN-71",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"CVN_72": {
|
||||
"name": "CVN_72",
|
||||
"coalition": "blue",
|
||||
"type": "Super Aircraft Carrier",
|
||||
"era": "Late Cold War",
|
||||
"label": "CVN-72 Abraham Lincoln",
|
||||
"shortLabel": "CVN-72",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"CVN_73": {
|
||||
"name": "CVN_73",
|
||||
"coalition": "blue",
|
||||
"type": "Super Aircraft Carrier",
|
||||
"era": "Late Cold War",
|
||||
"label": "CVN-73 George Washington",
|
||||
"shortLabel": "CVN-73",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"Stennis": {
|
||||
"name": "Stennis",
|
||||
"coalition": "blue",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Late Cold War",
|
||||
"label": "CVN-74 John C. Stennis",
|
||||
"shortLabel": "CVN-74",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"CVN_75": {
|
||||
"name": "CVN_75",
|
||||
"coalition": "blue",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Late Cold War",
|
||||
"label": "CVN-75 Harry S. Truman",
|
||||
"shortLabel": "CVN-75",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"CastleClass_01": {
|
||||
"name": "CastleClass_01",
|
||||
"coalition": "blue",
|
||||
"type": "Patrol",
|
||||
"era": "Mid Cold War",
|
||||
"label": "HMS Leeds Castle (P-258)",
|
||||
"shortLabel": "HMS Leeds Castle (P-258)",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"USS_Arleigh_Burke_IIa": {
|
||||
"name": "USS_Arleigh_Burke_IIa",
|
||||
"coalition": "blue",
|
||||
"type": "Destroyer",
|
||||
"era": "Late Cold War",
|
||||
"label": "DDG Arleigh Burke lla",
|
||||
"shortLabel": "DDG Arleigh Burke",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"barge-1": {
|
||||
"name": "barge-1",
|
||||
"coalition": "red",
|
||||
"type": "Cargoship",
|
||||
"era": "Late Cold War",
|
||||
"label": "Dry cargo ship Ivanov",
|
||||
"shortLabel": "Dry cargo ship Ivanov",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"barge-2": {
|
||||
"name": "barge-2",
|
||||
"coalition": "red",
|
||||
"type": "Cargoship",
|
||||
"era": "Late Cold War",
|
||||
"label": "Dry cargo ship Yakushev",
|
||||
"shortLabel": "Dry cargo ship Yakushev",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"elnya": {
|
||||
"name": "elnya",
|
||||
"coalition": "red",
|
||||
"type": "Tanker",
|
||||
"era": "Late Cold War",
|
||||
"label": "Elnya tanker",
|
||||
"shortLabel": "Elnya tanker",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"La_Combattante_II": {
|
||||
"name": "La_Combattante_II",
|
||||
"coalition": "blue",
|
||||
"type": "Fast Attack Craft",
|
||||
"era": "Mid Cold War",
|
||||
"label": "FAC La Combattante lla",
|
||||
"shortLabel": "FAC La Combattante",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"leander-gun-achilles": {
|
||||
"name": "leander-gun-achilles",
|
||||
"coalition": "blue",
|
||||
"type": "Frigate",
|
||||
"era": "Mid Cold War",
|
||||
"label": "HMS Achilles (F12)",
|
||||
"shortLabel": "HMS Achilles",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"leander-gun-andromeda": {
|
||||
"name": "leander-gun-andromeda",
|
||||
"coalition": "blue",
|
||||
"type": "Frigate",
|
||||
"era": "Mid Cold War",
|
||||
"label": "HMS Andromeda (F57)",
|
||||
"shortLabel": "HMS Andromeda",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"leander-gun-ariadne": {
|
||||
"name": "leander-gun-ariadne",
|
||||
"coalition": "blue",
|
||||
"type": "Frigate",
|
||||
"era": "Mid Cold War",
|
||||
"label": "HMS Ariadne (F72)",
|
||||
"shortLabel": "HMS Ariadne",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"leander-gun-lynch": {
|
||||
"name": "leander-gun-lynch",
|
||||
"coalition": "",
|
||||
"type": "Frigate",
|
||||
"era": "Mid Cold War",
|
||||
"label": "CNS Almirante Lynch (PFG-07)",
|
||||
"shortLabel": "CNS Almirante Lynch",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"hms_invincible": {
|
||||
"name": "hms_invincible",
|
||||
"coalition": "blue",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Mid Cold War",
|
||||
"label": "HMS Invincible (R05)",
|
||||
"shortLabel": "HMS Invincible",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"HarborTug": {
|
||||
"name": "HarborTug",
|
||||
"coalition": "",
|
||||
"type": "Tug",
|
||||
"era": "Mid Cold War",
|
||||
"label": "Harbor Tug",
|
||||
"shortLabel": "Harbor Tug",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"kilo_636": {
|
||||
"name": "kilo_636",
|
||||
"coalition": "red",
|
||||
"type": "Submarine",
|
||||
"era": "Late Cold War",
|
||||
"label": "Project 636 Varshavyanka Improved",
|
||||
"shortLabel": "Varshavyanka Improved",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"kilo": {
|
||||
"name": "kilo",
|
||||
"coalition": "red",
|
||||
"type": "Submarine",
|
||||
"era": "Late Cold War",
|
||||
"label": "Project 636 Varshavyanka Basic",
|
||||
"shortLabel": "Varshavyanka Basic",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"LHA_Tarawa": {
|
||||
"name": "LHA_Tarawa",
|
||||
"coalition": "blue",
|
||||
"type": "Aircraft Carrier",
|
||||
"era": "Mid Cold War",
|
||||
"label": "LHA-1 Tarawa",
|
||||
"shortLabel": "LHA-1 Tarawa",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"BDK-775": {
|
||||
"name": "BDK-775",
|
||||
"coalition": "blue",
|
||||
"type": "Landing Craft",
|
||||
"era": "Mid Cold War",
|
||||
"label": "LS Ropucha",
|
||||
"shortLabel": "LS Ropucha",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"molniya": {
|
||||
"name": "molniya",
|
||||
"coalition": "",
|
||||
"type": "Fast Attack Craft",
|
||||
"era": "Late Cold War",
|
||||
"label": "Molniya (Tarantul-3)",
|
||||
"shortLabel": "Molniya",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"moscow": {
|
||||
"name": "moscow",
|
||||
"coalition": "red",
|
||||
"type": "Cruiser",
|
||||
"era": "Late Cold War",
|
||||
"label": "Moscow",
|
||||
"shortLabel": "Moscow",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"neustrash": {
|
||||
"name": "neustrash",
|
||||
"coalition": "red",
|
||||
"type": "Frigate",
|
||||
"era": "Late Cold War",
|
||||
"label": "Neustrashimy",
|
||||
"shortLabel": "Neustrashimy",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"perry": {
|
||||
"name": "perry",
|
||||
"coalition": "blue",
|
||||
"type": "Frigate",
|
||||
"era": "Mid Cold War",
|
||||
"label": "Oliver H. Perry",
|
||||
"shortLabel": "Oliver H. Perry",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"piotr_velikiy": {
|
||||
"name": "piotr_velikiy",
|
||||
"coalition": "red",
|
||||
"type": "Cruiser",
|
||||
"era": "Late Cold War",
|
||||
"label": "Pyotr Velikiy",
|
||||
"shortLabel": "Pyotr Velikiy",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"rezky": {
|
||||
"name": "Rezky (Krivak-2)",
|
||||
"coalition": "red",
|
||||
"type": "Frigate",
|
||||
"era": "Early Cold War",
|
||||
"label": "Rezky (Krivak-2)",
|
||||
"shortLabel": "Rezky",
|
||||
"range": "Short",
|
||||
"filename": ""
|
||||
},
|
||||
"Ship_Tilde_Supply": {
|
||||
"name": "Ship_Tilde_Supply",
|
||||
"coalition": "blue",
|
||||
"type": "Transport",
|
||||
"era": "Late Cold War",
|
||||
"label": "Supply Ship MV Tilde",
|
||||
"shortLabel": "Supply Ship Tilde",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"Seawise_Giant": {
|
||||
"name": "Seawise_Giant",
|
||||
"coalition": "blue",
|
||||
"type": "Tanker",
|
||||
"era": "Late Cold War",
|
||||
"label": "Tanker Seawise Giant",
|
||||
"shortLabel": "Seawise Giant",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
},
|
||||
"TICONDEROG": {
|
||||
"name": "TICONDEROG",
|
||||
"coalition": "blue",
|
||||
"type": "Cruiser",
|
||||
"era": "Late Cold War",
|
||||
"label": "Ticonderoga",
|
||||
"shortLabel": "Ticonderoga",
|
||||
"range": "Medium",
|
||||
"filename": ""
|
||||
},
|
||||
"zwezdny": {
|
||||
"name": "zwezdny",
|
||||
"coalition": "",
|
||||
"type": "Civilian Boat",
|
||||
"era": "Modern",
|
||||
"label": "Zwezdny",
|
||||
"shortLabel": "Zwezdny",
|
||||
"range": "",
|
||||
"filename": ""
|
||||
}
|
||||
}
|
||||
super('databases/navyunitdatabase.json');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
@@ -5,8 +5,21 @@ import { GAME_MASTER } from "../constants/constants";
|
||||
export class UnitDatabase {
|
||||
blueprints: { [key: string]: UnitBlueprint } = {};
|
||||
|
||||
constructor() {
|
||||
|
||||
constructor(url: string = "") {
|
||||
if (url !== "") {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = () => {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
this.blueprints = xhr.response;
|
||||
} else {
|
||||
console.error(`Error retrieving database from ${url}`)
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
}
|
||||
|
||||
getCategory() {
|
||||
|
||||
Reference in New Issue
Block a user