Reformatted project using prettier plugin

This commit is contained in:
Davide Passoni
2024-07-01 17:43:46 +02:00
parent 1acb7d6762
commit 00e2da2aab
524 changed files with 36320 additions and 24305 deletions

View File

@@ -1,37 +1,37 @@
import { getApp } from "../../olympusapp";
import { GAME_MASTER } from "../../constants/constants";
import { UnitDatabase } from "./unitdatabase"
import { UnitDatabase } from "./unitdatabase";
export class AircraftDatabase extends UnitDatabase {
constructor() {
super(window.location.href.split('?')[0].replace("vite/", "") + 'api/databases/units/aircraftdatabase');
}
constructor() {
super(
window.location.href.split("?")[0].replace("vite/", "") +
"api/databases/units/aircraftdatabase"
);
}
getCategory() {
return "Aircraft";
}
getCategory() {
return "Aircraft";
}
getSpawnPointsByName(name: string) {
if (getApp().getMissionManager().getCommandModeOptions().commandMode == GAME_MASTER || !getApp().getMissionManager().getCommandModeOptions().restrictSpawns)
return 0;
getSpawnPointsByName(name: string) {
if (
getApp().getMissionManager().getCommandModeOptions().commandMode ==
GAME_MASTER ||
!getApp().getMissionManager().getCommandModeOptions().restrictSpawns
)
return 0;
const blueprint = this.getByName(name);
if (blueprint?.cost != undefined)
return blueprint?.cost;
if (blueprint?.era == "WW2")
return 20;
else if (blueprint?.era == "Early Cold War")
return 50;
else if (blueprint?.era == "Mid Cold War")
return 100;
else if (blueprint?.era == "Late Cold War")
return 200;
else if (blueprint?.era == "Modern")
return 400;
return 0;
}
const blueprint = this.getByName(name);
if (blueprint?.cost != undefined) return blueprint?.cost;
if (blueprint?.era == "WW2") return 20;
else if (blueprint?.era == "Early Cold War") return 50;
else if (blueprint?.era == "Mid Cold War") return 100;
else if (blueprint?.era == "Late Cold War") return 200;
else if (blueprint?.era == "Modern") return 400;
return 0;
}
}
export var aircraftDatabase = new AircraftDatabase();