More work on miss on purpose

This commit is contained in:
Pax1601
2023-11-04 09:57:18 +01:00
parent 528e0db79c
commit 9cc6e9e790
40 changed files with 515 additions and 263 deletions

View File

@@ -107,6 +107,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;
};
@@ -221,31 +223,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 +259,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 +311,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 +506,8 @@ declare module "interfaces" {
hasTask: boolean;
position: LatLng;
speed: number;
horizontalVelocity: number;
verticalVelocity: number;
heading: number;
isActiveTanker: boolean;
isActiveAWACS: boolean;
@@ -523,6 +533,8 @@ declare module "interfaces" {
activePath: LatLng[];
isLeader: boolean;
operateAs: string;
shotsScatter: number;
shotsIntensity: number;
}
export interface LoadoutItemBlueprint {
name: string;
@@ -558,12 +570,17 @@ declare module "interfaces" {
muzzleVelocity?: number;
aimTime?: number;
shotsToFire?: number;
shotsBaseInterval?: number;
shotsBaseScatter?: number;
description?: string;
abilities?: string;
acquisitionRange?: number;
engagementRange?: number;
targetingRange?: number;
canTargetPoint?: boolean;
canRearm?: boolean;
canAAA?: boolean;
indirectFire?: boolean;
}
export interface UnitSpawnOptions {
roleType: string;
@@ -786,9 +803,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 +843,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 +1056,8 @@ declare module "unit/unit" {
getHasTask(): boolean;
getPosition(): LatLng;
getSpeed(): number;
getHorizontalVelocity(): number;
getVerticalVelocity(): number;
getHeading(): number;
getIsActiveTanker(): boolean;
getIsActiveAWACS(): boolean;
@@ -1061,6 +1083,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 +1121,8 @@ declare module "unit/unit" {
isInViewport(): boolean;
canTargetPoint(): boolean;
canRearm(): boolean;
canAAA(): boolean;
indirectFire(): boolean;
isTanker(): boolean;
isAWACS(): boolean;
/********************** Unit commands *************************/
@@ -1132,6 +1158,8 @@ declare module "unit/unit" {
scenicAAA(): void;
missOnPurpose(): void;
landAtPoint(latlng: LatLng): void;
setShotsScatter(shotsScatter: number): void;
setShotsIntensity(shotsIntensity: number): void;
/***********************************************/
getActions(): {
[key: string]: {
@@ -1647,6 +1675,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";
@@ -1876,6 +1912,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 +2112,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;
@@ -2106,6 +2154,7 @@ declare module "olympusapp" {
export class OlympusApp {
#private;
constructor();
getDialogManager(): Manager;
getMap(): Map;
getServerManager(): ServerManager;
getPanelsManager(): Manager;