mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge branch 'main' into 499-spawn-menu-reorganisation
This commit is contained in:
159
client/@types/olympus/index.d.ts
vendored
159
client/@types/olympus/index.d.ts
vendored
@@ -83,6 +83,7 @@ declare module "controls/switch" {
|
||||
}
|
||||
declare module "constants/constants" {
|
||||
import { LatLng, LatLngBounds } from "leaflet";
|
||||
import { MapMarkerControl } from "map/map";
|
||||
export const UNITS_URI = "units";
|
||||
export const WEAPONS_URI = "weapons";
|
||||
export const LOGS_URI = "logs";
|
||||
@@ -107,6 +108,8 @@ declare module "constants/constants" {
|
||||
export const ROEDescriptions: string[];
|
||||
export const reactionsToThreatDescriptions: string[];
|
||||
export const emissionsCountermeasuresDescriptions: string[];
|
||||
export const shotsScatterDescriptions: string[];
|
||||
export const shotsIntensityDescriptions: string[];
|
||||
export const minSpeedValues: {
|
||||
[key: string]: number;
|
||||
};
|
||||
@@ -192,6 +195,7 @@ declare module "constants/constants" {
|
||||
export const visibilityControls: string[];
|
||||
export const visibilityControlsTypes: string[][];
|
||||
export const visibilityControlsTooltips: string[];
|
||||
export const MAP_MARKER_CONTROLS: MapMarkerControl[];
|
||||
export const IADSTypes: string[];
|
||||
export const IADSDensities: {
|
||||
[key: string]: number;
|
||||
@@ -221,31 +225,35 @@ declare module "constants/constants" {
|
||||
hasTask = 12,
|
||||
position = 13,
|
||||
speed = 14,
|
||||
heading = 15,
|
||||
isActiveTanker = 16,
|
||||
isActiveAWACS = 17,
|
||||
onOff = 18,
|
||||
followRoads = 19,
|
||||
fuel = 20,
|
||||
desiredSpeed = 21,
|
||||
desiredSpeedType = 22,
|
||||
desiredAltitude = 23,
|
||||
desiredAltitudeType = 24,
|
||||
leaderID = 25,
|
||||
formationOffset = 26,
|
||||
targetID = 27,
|
||||
targetPosition = 28,
|
||||
ROE = 29,
|
||||
reactionToThreat = 30,
|
||||
emissionsCountermeasures = 31,
|
||||
TACAN = 32,
|
||||
radio = 33,
|
||||
generalSettings = 34,
|
||||
ammo = 35,
|
||||
contacts = 36,
|
||||
activePath = 37,
|
||||
isLeader = 38,
|
||||
operateAs = 39,
|
||||
horizontalVelocity = 15,
|
||||
verticalVelocity = 16,
|
||||
heading = 17,
|
||||
isActiveTanker = 18,
|
||||
isActiveAWACS = 19,
|
||||
onOff = 20,
|
||||
followRoads = 21,
|
||||
fuel = 22,
|
||||
desiredSpeed = 23,
|
||||
desiredSpeedType = 24,
|
||||
desiredAltitude = 25,
|
||||
desiredAltitudeType = 26,
|
||||
leaderID = 27,
|
||||
formationOffset = 28,
|
||||
targetID = 29,
|
||||
targetPosition = 30,
|
||||
ROE = 31,
|
||||
reactionToThreat = 32,
|
||||
emissionsCountermeasures = 33,
|
||||
TACAN = 34,
|
||||
radio = 35,
|
||||
generalSettings = 36,
|
||||
ammo = 37,
|
||||
contacts = 38,
|
||||
activePath = 39,
|
||||
isLeader = 40,
|
||||
operateAs = 41,
|
||||
shotsScatter = 42,
|
||||
shotsIntensity = 43,
|
||||
endOfData = 255
|
||||
}
|
||||
export const MGRS_PRECISION_10KM = 2;
|
||||
@@ -253,6 +261,8 @@ declare module "constants/constants" {
|
||||
export const MGRS_PRECISION_100M = 4;
|
||||
export const MGRS_PRECISION_10M = 5;
|
||||
export const MGRS_PRECISION_1M = 6;
|
||||
export const DELETE_CYCLE_TIME = 0.05;
|
||||
export const DELETE_SLOW_THRESHOLD = 50;
|
||||
}
|
||||
declare module "map/markers/custommarker" {
|
||||
import { Map, Marker } from "leaflet";
|
||||
@@ -303,7 +313,7 @@ declare module "controls/dropdown" {
|
||||
#private;
|
||||
constructor(ID: string | null, callback: CallableFunction, options?: string[] | null, defaultText?: string);
|
||||
getContainer(): HTMLElement;
|
||||
setOptions(optionsList: string[], sortAlphabetically?: boolean): void;
|
||||
setOptions(optionsList: string[], sort?: "" | "string" | "number"): void;
|
||||
setOptionsElements(optionsElements: HTMLElement[]): void;
|
||||
getOptionElements(): HTMLCollection;
|
||||
addOptionElement(optionElement: HTMLElement): void;
|
||||
@@ -498,6 +508,8 @@ declare module "interfaces" {
|
||||
hasTask: boolean;
|
||||
position: LatLng;
|
||||
speed: number;
|
||||
horizontalVelocity: number;
|
||||
verticalVelocity: number;
|
||||
heading: number;
|
||||
isActiveTanker: boolean;
|
||||
isActiveAWACS: boolean;
|
||||
@@ -523,6 +535,8 @@ declare module "interfaces" {
|
||||
activePath: LatLng[];
|
||||
isLeader: boolean;
|
||||
operateAs: string;
|
||||
shotsScatter: number;
|
||||
shotsIntensity: number;
|
||||
}
|
||||
export interface LoadoutItemBlueprint {
|
||||
name: string;
|
||||
@@ -558,12 +572,19 @@ declare module "interfaces" {
|
||||
muzzleVelocity?: number;
|
||||
aimTime?: number;
|
||||
shotsToFire?: number;
|
||||
shotsBaseInterval?: number;
|
||||
shotsBaseScatter?: number;
|
||||
description?: string;
|
||||
abilities?: string;
|
||||
acquisitionRange?: number;
|
||||
engagementRange?: number;
|
||||
targetingRange?: number;
|
||||
aimMethodRange?: number;
|
||||
alertnessTimeConstant?: number;
|
||||
canTargetPoint?: boolean;
|
||||
canRearm?: boolean;
|
||||
canAAA?: boolean;
|
||||
indirectFire?: boolean;
|
||||
}
|
||||
export interface UnitSpawnOptions {
|
||||
roleType: string;
|
||||
@@ -604,6 +625,7 @@ declare module "interfaces" {
|
||||
export interface ShortcutOptions {
|
||||
altKey?: boolean;
|
||||
callback: CallableFunction;
|
||||
context?: string;
|
||||
ctrlKey?: boolean;
|
||||
name?: string;
|
||||
shiftKey?: boolean;
|
||||
@@ -786,9 +808,11 @@ declare module "controls/unitspawnmenu" {
|
||||
import { UnitSpawnOptions } from "interfaces";
|
||||
export class UnitSpawnMenu {
|
||||
#private;
|
||||
spawnOptions: UnitSpawnOptions;
|
||||
protected showRangeCircles: boolean;
|
||||
protected spawnOptions: UnitSpawnOptions;
|
||||
constructor(ID: string, unitDatabase: UnitDatabase, orderByRole: boolean);
|
||||
getContainer(): HTMLElement;
|
||||
getVisible(): boolean;
|
||||
reset(): void;
|
||||
setCountries(): void;
|
||||
refreshOptions(): void;
|
||||
@@ -824,6 +848,7 @@ declare module "controls/unitspawnmenu" {
|
||||
deployUnits(spawnOptions: UnitSpawnOptions, unitsCount: number): void;
|
||||
}
|
||||
export class GroundUnitSpawnMenu extends UnitSpawnMenu {
|
||||
protected showRangeCircles: boolean;
|
||||
/**
|
||||
*
|
||||
* @param ID - the ID of the HTML element which will contain the context menu
|
||||
@@ -1036,6 +1061,8 @@ declare module "unit/unit" {
|
||||
getHasTask(): boolean;
|
||||
getPosition(): LatLng;
|
||||
getSpeed(): number;
|
||||
getHorizontalVelocity(): number;
|
||||
getVerticalVelocity(): number;
|
||||
getHeading(): number;
|
||||
getIsActiveTanker(): boolean;
|
||||
getIsActiveAWACS(): boolean;
|
||||
@@ -1061,6 +1088,8 @@ declare module "unit/unit" {
|
||||
getActivePath(): LatLng[];
|
||||
getIsLeader(): boolean;
|
||||
getOperateAs(): string;
|
||||
getShotsScatter(): number;
|
||||
getShotsIntensity(): number;
|
||||
static getConstructor(type: string): typeof GroundUnit | undefined;
|
||||
constructor(ID: number);
|
||||
getCategory(): string;
|
||||
@@ -1097,6 +1126,9 @@ declare module "unit/unit" {
|
||||
isInViewport(): boolean;
|
||||
canTargetPoint(): boolean;
|
||||
canRearm(): boolean;
|
||||
canLandAtPoint(): boolean;
|
||||
canAAA(): boolean;
|
||||
indirectFire(): boolean;
|
||||
isTanker(): boolean;
|
||||
isAWACS(): boolean;
|
||||
/********************** Unit commands *************************/
|
||||
@@ -1132,6 +1164,8 @@ declare module "unit/unit" {
|
||||
scenicAAA(): void;
|
||||
missOnPurpose(): void;
|
||||
landAtPoint(latlng: LatLng): void;
|
||||
setShotsScatter(shotsScatter: number): void;
|
||||
setShotsIntensity(shotsIntensity: number): void;
|
||||
/***********************************************/
|
||||
getActions(): {
|
||||
[key: string]: {
|
||||
@@ -1331,6 +1365,20 @@ declare module "contextmenus/airbasespawnmenu" {
|
||||
setAirbase(airbase: Airbase): void;
|
||||
}
|
||||
}
|
||||
declare module "context/context" {
|
||||
export interface ContextInterface {
|
||||
useSpawnMenu?: boolean;
|
||||
useUnitControlPanel?: boolean;
|
||||
useUnitInfoPanel?: boolean;
|
||||
}
|
||||
export class Context {
|
||||
#private;
|
||||
constructor(config: ContextInterface);
|
||||
getUseSpawnMenu(): boolean;
|
||||
getUseUnitControlPanel(): boolean;
|
||||
getUseUnitInfoPanel(): boolean;
|
||||
}
|
||||
}
|
||||
declare module "other/manager" {
|
||||
export class Manager {
|
||||
#private;
|
||||
@@ -1406,6 +1454,14 @@ declare module "map/map" {
|
||||
import { CoalitionArea } from "map/coalitionarea/coalitionarea";
|
||||
import { CoalitionAreaContextMenu } from "contextmenus/coalitionareacontextmenu";
|
||||
import { AirbaseSpawnContextMenu } from "contextmenus/airbasespawnmenu";
|
||||
export type MapMarkerControl = {
|
||||
"image": string;
|
||||
"isProtected"?: boolean;
|
||||
"name": string;
|
||||
"protectable"?: boolean;
|
||||
"toggles": string[];
|
||||
"tooltip": string;
|
||||
};
|
||||
export class Map extends L.Map {
|
||||
#private;
|
||||
/**
|
||||
@@ -1453,6 +1509,7 @@ declare module "map/map" {
|
||||
getVisibilityOptions(): {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
unitIsProtected(unit: Unit): boolean;
|
||||
}
|
||||
}
|
||||
declare module "mission/bullseye" {
|
||||
@@ -1569,6 +1626,7 @@ declare module "panels/unitinfopanel" {
|
||||
export class UnitInfoPanel extends Panel {
|
||||
#private;
|
||||
constructor(ID: string);
|
||||
show(): void;
|
||||
}
|
||||
}
|
||||
declare module "plugin/pluginmanager" {
|
||||
@@ -1647,6 +1705,14 @@ declare module "unit/citiesDatabase" {
|
||||
pop: number;
|
||||
}[];
|
||||
}
|
||||
declare module "dialog/dialog" {
|
||||
import { Panel } from "panels/panel";
|
||||
export class Dialog extends Panel {
|
||||
constructor(element: string);
|
||||
hide(): void;
|
||||
show(): void;
|
||||
}
|
||||
}
|
||||
declare module "unit/unitsmanager" {
|
||||
import { LatLng, LatLngBounds } from "leaflet";
|
||||
import { Unit } from "unit/unit";
|
||||
@@ -1713,7 +1779,9 @@ declare module "unit/unitsmanager" {
|
||||
*/
|
||||
getSelectedUnits(options?: {
|
||||
excludeHumans?: boolean;
|
||||
excludeProtected?: boolean;
|
||||
onlyOnePerGroup?: boolean;
|
||||
showProtectionReminder?: boolean;
|
||||
}): Unit[];
|
||||
/** Deselects all currently selected units
|
||||
*
|
||||
@@ -1876,6 +1944,16 @@ declare module "unit/unitsmanager" {
|
||||
* @param latlng Point where to land
|
||||
*/
|
||||
selectedUnitsLandAtPoint(latlng: LatLng): void;
|
||||
/** Set a specific shots scatter to all the selected units
|
||||
*
|
||||
* @param shotsScatter Value to set
|
||||
*/
|
||||
selectedUnitsSetShotsScatter(shotsScatter: number): void;
|
||||
/** Set a specific shots intensity to all the selected units
|
||||
*
|
||||
* @param shotsScatter Value to set
|
||||
*/
|
||||
selectedUnitsSetShotsIntensity(shotsIntensity: number): void;
|
||||
/*********************** Control operations on selected units ************************/
|
||||
/** See getUnitsCategories for more info
|
||||
*
|
||||
@@ -2066,6 +2144,8 @@ declare module "server/servermanager" {
|
||||
scenicAAA(ID: number, coalition: string, callback?: CallableFunction): void;
|
||||
missOnPurpose(ID: number, coalition: string, callback?: CallableFunction): void;
|
||||
landAtPoint(ID: number, latlng: LatLng, callback?: CallableFunction): void;
|
||||
setShotsScatter(ID: number, shotsScatter: number, callback?: CallableFunction): void;
|
||||
setShotsIntensity(ID: number, shotsIntensity: number, callback?: CallableFunction): void;
|
||||
setAdvacedOptions(ID: number, isActiveTanker: boolean, isActiveAWACS: boolean, TACAN: TACAN, radio: Radio, generalSettings: GeneralSettings, callback?: CallableFunction): void;
|
||||
setCommandModeOptions(restrictSpawns: boolean, restrictToCoalition: boolean, spawnPoints: {
|
||||
blue: number;
|
||||
@@ -2094,6 +2174,18 @@ declare module "panels/unitlistpanel" {
|
||||
toggle(): void;
|
||||
}
|
||||
}
|
||||
declare module "context/contextmanager" {
|
||||
import { Manager } from "other/manager";
|
||||
import { ContextInterface } from "context/context";
|
||||
export class ContextManager extends Manager {
|
||||
#private;
|
||||
constructor();
|
||||
add(name: string, contextConfig: ContextInterface): this;
|
||||
currentContextIs(contextName: string): boolean;
|
||||
getCurrentContext(): any;
|
||||
setContext(contextName: string): false | undefined;
|
||||
}
|
||||
}
|
||||
declare module "olympusapp" {
|
||||
import { Map } from "map/map";
|
||||
import { MissionManager } from "mission/missionmanager";
|
||||
@@ -2103,10 +2195,15 @@ declare module "olympusapp" {
|
||||
import { WeaponsManager } from "weapon/weaponsmanager";
|
||||
import { Manager } from "other/manager";
|
||||
import { ServerManager } from "server/servermanager";
|
||||
import { ContextManager } from "context/contextmanager";
|
||||
import { Context } from "context/context";
|
||||
export class OlympusApp {
|
||||
#private;
|
||||
constructor();
|
||||
getDialogManager(): Manager;
|
||||
getMap(): Map;
|
||||
getCurrentContext(): Context;
|
||||
getContextManager(): ContextManager;
|
||||
getServerManager(): ServerManager;
|
||||
getPanelsManager(): Manager;
|
||||
getPopupsManager(): Manager;
|
||||
@@ -2158,3 +2255,11 @@ declare module "index" {
|
||||
import { OlympusApp } from "olympusapp";
|
||||
export function getApp(): OlympusApp;
|
||||
}
|
||||
declare module "context/contextmenumanager" {
|
||||
import { ContextMenu } from "contextmenus/contextmenu";
|
||||
import { Manager } from "other/manager";
|
||||
export class ContextMenuManager extends Manager {
|
||||
constructor();
|
||||
add(name: string, contextMenu: ContextMenu): this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user