mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Remove hand written API objects.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { RootState } from "../app/store";
|
||||
import { gameLoaded, gameUnloaded } from "./actions";
|
||||
import { ControlPoint } from "./controlpoint";
|
||||
import { ControlPoint } from "./liberationApi";
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
interface ControlPointsState {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
export interface ControlPoint {
|
||||
id: number;
|
||||
name: string;
|
||||
blue: boolean;
|
||||
position: LatLng;
|
||||
mobile: boolean;
|
||||
destination: LatLng | null;
|
||||
sidc: string;
|
||||
}
|
||||
@@ -4,8 +4,6 @@ import backend from "./backend";
|
||||
import Combat from "./combat";
|
||||
import { endCombat, newCombat, updateCombat } from "./combatSlice";
|
||||
import { updateControlPoint } from "./controlPointsSlice";
|
||||
import { ControlPoint } from "./controlpoint";
|
||||
import { Flight } from "./flight";
|
||||
import {
|
||||
deselectFlight,
|
||||
registerFlight,
|
||||
@@ -19,11 +17,15 @@ import {
|
||||
deleteFrontLine,
|
||||
updateFrontLine,
|
||||
} from "./frontLinesSlice";
|
||||
import FrontLine from "./frontline";
|
||||
import reloadGameState from "./gamestate";
|
||||
import { liberationApi } from "./liberationApi";
|
||||
import {
|
||||
liberationApi,
|
||||
ControlPoint,
|
||||
Flight,
|
||||
FrontLine,
|
||||
Tgo,
|
||||
} from "./liberationApi";
|
||||
import { navMeshUpdated } from "./navMeshSlice";
|
||||
import Tgo from "./tgo";
|
||||
import { updateTgo } from "./tgosSlice";
|
||||
import { threatZonesUpdated } from "./threatZonesSlice";
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Waypoint } from "./waypoint";
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
export interface Flight {
|
||||
id: string;
|
||||
blue: boolean;
|
||||
position: LatLng | null;
|
||||
sidc: string;
|
||||
waypoints: Waypoint[] | null;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RootState } from "../app/store";
|
||||
import { gameLoaded, gameUnloaded } from "./actions";
|
||||
import { Flight } from "./flight";
|
||||
import { Flight } from "./liberationApi";
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RootState } from "../app/store";
|
||||
import { gameLoaded, gameUnloaded } from "./actions";
|
||||
import FrontLine from "./frontline";
|
||||
import { FrontLine } from "./liberationApi";
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
interface FrontLinesState {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
export interface FrontLine {
|
||||
id: string;
|
||||
extents: LatLng[];
|
||||
}
|
||||
|
||||
export default FrontLine;
|
||||
@@ -1,9 +1,12 @@
|
||||
import { ControlPoint } from "./controlpoint";
|
||||
import { Flight } from "./flight";
|
||||
import FrontLine from "./frontline";
|
||||
import { NavMeshes, ThreatZoneContainer } from "./liberationApi";
|
||||
import SupplyRoute from "./supplyroute";
|
||||
import Tgo from "./tgo";
|
||||
import {
|
||||
ControlPoint,
|
||||
Flight,
|
||||
FrontLine,
|
||||
NavMeshes,
|
||||
SupplyRoute,
|
||||
Tgo,
|
||||
ThreatZoneContainer,
|
||||
} from "./liberationApi";
|
||||
import { LatLngLiteral } from "leaflet";
|
||||
|
||||
export default interface Game {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RootState } from "../app/store";
|
||||
import { gameLoaded, gameUnloaded } from "./actions";
|
||||
import SupplyRoute from "./supplyroute";
|
||||
import { SupplyRoute } from "./liberationApi";
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
interface SupplyRoutesState {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
export interface SupplyRoute {
|
||||
points: LatLng[];
|
||||
front_active: boolean;
|
||||
is_sea: boolean;
|
||||
blue: boolean;
|
||||
active_transports: string[];
|
||||
}
|
||||
|
||||
export default SupplyRoute;
|
||||
@@ -1,17 +0,0 @@
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
export interface Tgo {
|
||||
id: string;
|
||||
name: string;
|
||||
control_point_name: string;
|
||||
category: string;
|
||||
blue: boolean;
|
||||
position: LatLng;
|
||||
units: string[];
|
||||
threat_ranges: number[];
|
||||
detection_ranges: number[];
|
||||
dead: boolean;
|
||||
sidc: string;
|
||||
}
|
||||
|
||||
export default Tgo;
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RootState } from "../app/store";
|
||||
import { gameLoaded, gameUnloaded } from "./actions";
|
||||
import { Tgo } from "./tgo";
|
||||
import { Tgo } from "./liberationApi";
|
||||
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
interface TgosState {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import { LatLng } from "leaflet";
|
||||
|
||||
export interface Waypoint {
|
||||
name: string;
|
||||
position: LatLng;
|
||||
altitude_ft: number;
|
||||
altitude_reference: string;
|
||||
is_movable: boolean;
|
||||
should_mark: boolean;
|
||||
include_in_path: boolean;
|
||||
timing: string;
|
||||
}
|
||||
Reference in New Issue
Block a user