mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge branch 'v0.1.0' of https://github.com/Pax1601/DCSOlympus into unit-list
This commit is contained in:
commit
d9234f9c5f
@ -1,8 +1,8 @@
|
||||
import { ToggleableFeature } from "../ToggleableFeature";
|
||||
import { AICFormation_Azimuth } from "./AICFormation/Azimuth";
|
||||
import { AICFormation_Range } from "./AICFormation/Range";
|
||||
import { AICFormation_Single } from "./AICFormation/Single";
|
||||
import { AICFormationDescriptorSection } from "./AICFormationDescriptorSection";
|
||||
import { ToggleableFeature } from "../toggleablefeature";
|
||||
import { AICFormation_Azimuth } from "./aicformation/azimuth";
|
||||
import { AICFormation_Range } from "./aicformation/range";
|
||||
import { AICFormation_Single } from "./aicformation/single";
|
||||
import { AICFormationDescriptorSection } from "./aicformationdescriptorsection";
|
||||
|
||||
|
||||
export class AIC extends ToggleableFeature {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { AICFormationContextDataInterface, AICFormationDescriptor } from "./AICFormationDescriptor";
|
||||
import { AICFormationDescriptorPhrase } from "./AICFormationDescriptorPhrase";
|
||||
import { AICFormationDescriptorSection } from "./AICFormationDescriptorSection";
|
||||
import { AICFormationContextDataInterface, AICFormationDescriptor } from "./aicformationdescriptor";
|
||||
import { AICFormationDescriptorPhrase } from "./aicformationdescriptorphrase";
|
||||
import { AICFormationDescriptorSection } from "./aicformationdescriptorsection";
|
||||
|
||||
export interface AICFormationInterface {
|
||||
"icon" : string,
|
||||
@ -1,8 +1,8 @@
|
||||
import { AICFormation, AICFormationInterface } from "../AICFormation";
|
||||
import { AICFormationContextDataInterface } from "../AICFormationDescriptor";
|
||||
import { AICFormationDescriptorSection } from "../AICFormationDescriptorSection";
|
||||
import { AICFormationDescriptorComponent } from "../AICFormationDescriptorComponent";
|
||||
import { AICFormationDescriptorPhrase } from "../AICFormationDescriptorPhrase";
|
||||
import { AICFormation, AICFormationInterface } from "../aicformation";
|
||||
import { AICFormationContextDataInterface } from "../aicformationdescriptor";
|
||||
import { AICFormationDescriptorSection } from "../aicformationdescriptorsection";
|
||||
import { AICFormationDescriptorComponent } from "../aicformationdescriptorcomponent";
|
||||
import { AICFormationDescriptorPhrase } from "../aicformationdescriptorphrase";
|
||||
|
||||
export class AICFormation_Azimuth extends AICFormation implements AICFormationInterface {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { AICFormation, AICFormationInterface } from "../AICFormation";
|
||||
import { AICFormationContextDataInterface } from "../AICFormationDescriptor";
|
||||
import { AICFormationDescriptorSection } from "../AICFormationDescriptorSection";
|
||||
import { AICFormationDescriptorComponent } from "../AICFormationDescriptorComponent";
|
||||
import { AICFormationDescriptorPhrase } from "../AICFormationDescriptorPhrase";
|
||||
import { AICFormation, AICFormationInterface } from "../aicformation";
|
||||
import { AICFormationContextDataInterface } from "../aicformationdescriptor";
|
||||
import { AICFormationDescriptorSection } from "../aicformationdescriptorsection";
|
||||
import { AICFormationDescriptorComponent } from "../aicformationdescriptorcomponent";
|
||||
import { AICFormationDescriptorPhrase } from "../aicformationdescriptorphrase";
|
||||
|
||||
export class AICFormation_Range extends AICFormation implements AICFormationInterface {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { AICFormation, AICFormationInterface } from "../AICFormation";
|
||||
import { AICFormationContextDataInterface, AICFormationDescriptor } from "../AICFormationDescriptor";
|
||||
import { AICFormation, AICFormationInterface } from "../aicformation";
|
||||
import { AICFormationContextDataInterface, AICFormationDescriptor } from "../aicformationdescriptor";
|
||||
|
||||
export class AICFormation_Single extends AICFormation implements AICFormationInterface {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { AICFormation } from "./AICFormation";
|
||||
import { AICFormationDescriptorSection } from "./AICFormationDescriptorSection";
|
||||
import { AICFormationDescriptorSection_Formation } from "./AICFormationDescriptorSection/Formation";
|
||||
import { AICFormationDescriptorSection_Unit } from "./AICFormationDescriptorSection/Unit";
|
||||
import { AICFormationDescriptorSection_NumGroups } from "./AICFormationDescriptorSection/NumGroups";
|
||||
import { AICFormationDescriptorSection_Who } from "./AICFormationDescriptorSection/Who";
|
||||
import { AICFormation } from "./aicformation";
|
||||
import { AICFormationDescriptorSection } from "./aicformationdescriptorsection";
|
||||
import { AICFormationDescriptorSection_Formation } from "./aicformationdescriptorsection/formation";
|
||||
import { AICFormationDescriptorSection_Unit } from "./aicformationdescriptorsection/unit";
|
||||
import { AICFormationDescriptorSection_NumGroups } from "./aicformationdescriptorsection/numgroups";
|
||||
import { AICFormationDescriptorSection_Who } from "./aicformationdescriptorsection/who";
|
||||
|
||||
|
||||
export interface AICFormationContextDataInterface {
|
||||
@ -1,4 +1,4 @@
|
||||
import { AICFormationDescriptorComponent } from "../AICFormationDescriptorComponent";
|
||||
import { AICFormationDescriptorComponent } from "../aicformationdescriptorcomponent";
|
||||
|
||||
export abstract class AICFormactionDescriptorComponent_Distance extends AICFormationDescriptorComponent {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AICFormactionDescriptorComponent_Distance } from "../Distance";
|
||||
import { AICFormactionDescriptorComponent_Distance } from "../distance";
|
||||
|
||||
export class AICFormationDescriptorComponent_Distance_Range extends AICFormactionDescriptorComponent_Distance {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { AICFormation } from "./AICFormation";
|
||||
import { AICFormationContextDataInterface } from "./AICFormationDescriptor";
|
||||
import { AICFormationDescriptorComponent } from "./AICFormationDescriptorComponent";
|
||||
import { AICFormation } from "./aicformation";
|
||||
import { AICFormationContextDataInterface } from "./aicformationdescriptor";
|
||||
import { AICFormationDescriptorComponent } from "./aicformationdescriptorcomponent";
|
||||
|
||||
export interface AICFormationDescriptorPhraseInterface {
|
||||
"generate" : CallableFunction,
|
||||
@ -1,6 +1,6 @@
|
||||
import { AICFormation } from "./AICFormation";
|
||||
import { AICFormationContextDataInterface } from "./AICFormationDescriptor";
|
||||
import { AICFormationDescriptorPhrase } from "./AICFormationDescriptorPhrase";
|
||||
import { AICFormation } from "./aicformation";
|
||||
import { AICFormationContextDataInterface } from "./aicformationdescriptor";
|
||||
import { AICFormationDescriptorPhrase } from "./aicformationdescriptorphrase";
|
||||
|
||||
export interface AICFormationDescriptorSectionInterface {
|
||||
"generate" : CallableFunction,
|
||||
@ -1,8 +1,8 @@
|
||||
import { AICFormation } from "../AICFormation";
|
||||
import { AICFormationContextDataInterface } from "../AICFormationDescriptor";
|
||||
import { AICFormationDescriptorSection } from "../AICFormationDescriptorSection";
|
||||
import { AICFormationDescriptorComponent } from "../AICFormationDescriptorComponent";
|
||||
import { AICFormationDescriptorPhrase } from "../AICFormationDescriptorPhrase";
|
||||
import { AICFormation } from "../aicformation";
|
||||
import { AICFormationContextDataInterface } from "../aicformationdescriptor";
|
||||
import { AICFormationDescriptorSection } from "../aicformationdescriptorsection";
|
||||
import { AICFormationDescriptorComponent } from "../aicformationdescriptorcomponent";
|
||||
import { AICFormationDescriptorPhrase } from "../aicformationdescriptorphrase";
|
||||
|
||||
export class AICFormationDescriptorSection_Formation extends AICFormationDescriptorSection {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { AICFormation } from "../AICFormation";
|
||||
import { AICFormationContextDataInterface } from "../AICFormationDescriptor";
|
||||
import { AICFormationDescriptorSection } from "../AICFormationDescriptorSection";
|
||||
import { AICFormationDescriptorComponent } from "../AICFormationDescriptorComponent";
|
||||
import { AICFormationDescriptorPhrase } from "../AICFormationDescriptorPhrase";
|
||||
import { AICFormation } from "../aicformation";
|
||||
import { AICFormationContextDataInterface } from "../aicformationdescriptor";
|
||||
import { AICFormationDescriptorSection } from "../aicformationdescriptorsection";
|
||||
import { AICFormationDescriptorComponent } from "../aicformationdescriptorcomponent";
|
||||
import { AICFormationDescriptorPhrase } from "../aicformationdescriptorphrase";
|
||||
|
||||
export class AICFormationDescriptorSection_NumGroups extends AICFormationDescriptorSection {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { AICFormation } from "../AICFormation";
|
||||
import { AICFormationContextDataInterface } from "../AICFormationDescriptor";
|
||||
import { AICFormationDescriptorSection } from "../AICFormationDescriptorSection";
|
||||
import { AICFormationDescriptorComponent } from "../AICFormationDescriptorComponent";
|
||||
import { AICFormationDescriptorPhrase } from "../AICFormationDescriptorPhrase";
|
||||
import { AICFormation } from "../aicformation";
|
||||
import { AICFormationContextDataInterface } from "../aicformationdescriptor";
|
||||
import { AICFormationDescriptorSection } from "../aicformationdescriptorsection";
|
||||
import { AICFormationDescriptorComponent } from "../aicformationdescriptorcomponent";
|
||||
import { AICFormationDescriptorPhrase } from "../aicformationdescriptorphrase";
|
||||
|
||||
interface addUnitInformationInterface {
|
||||
omitTrack?: boolean
|
||||
@ -1,8 +1,8 @@
|
||||
import { AICFormation } from "../AICFormation";
|
||||
import { AICFormationContextDataInterface } from "../AICFormationDescriptor";
|
||||
import { AICFormationDescriptorSection } from "../AICFormationDescriptorSection";
|
||||
import { AICFormationDescriptorComponent } from "../AICFormationDescriptorComponent";
|
||||
import { AICFormationDescriptorPhrase } from "../AICFormationDescriptorPhrase";
|
||||
import { AICFormation } from "../aicformation";
|
||||
import { AICFormationContextDataInterface } from "../aicformationdescriptor";
|
||||
import { AICFormationDescriptorSection } from "../aicformationdescriptorsection";
|
||||
import { AICFormationDescriptorComponent } from "../aicformationdescriptorcomponent";
|
||||
import { AICFormationDescriptorPhrase } from "../aicformationdescriptorphrase";
|
||||
|
||||
export class AICFormationDescriptorSection_Who extends AICFormationDescriptorSection {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ToggleableFeature } from "../ToggleableFeature";
|
||||
import { ToggleableFeature } from "../toggleablefeature";
|
||||
import Sortable from 'sortablejs';
|
||||
import { ATCFLightList } from "./FlightList";
|
||||
import { ATCFLightList } from "./flightlist";
|
||||
|
||||
export class ATC extends ToggleableFeature {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ATCMockAPI } from "../ATCMockAPI";
|
||||
import { ATCMockAPI } from "../atcmockapi";
|
||||
|
||||
export class ATCMockAPI_Flights extends ATCMockAPI {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ATCMockAPI_Flights } from "./ATCMockAPI/Flights";
|
||||
import { ATCMockAPI_Flights } from "./atcmockapi/flights";
|
||||
|
||||
export class ATCFLightList {
|
||||
|
||||
|
||||
87
client/src/atc/atc.ts
Normal file
87
client/src/atc/atc.ts
Normal file
@ -0,0 +1,87 @@
|
||||
import { ToggleableFeature } from "../toggleablefeature";
|
||||
import Sortable from 'sortablejs';
|
||||
import { ATCFLightList } from "./flightlist";
|
||||
|
||||
export class ATC extends ToggleableFeature {
|
||||
|
||||
constructor() {
|
||||
|
||||
super( true );
|
||||
|
||||
//this.#generateFlightList();
|
||||
|
||||
let $list = document.getElementById( "atc-strip-board-arrivals" );
|
||||
|
||||
if ( $list instanceof HTMLElement ) {
|
||||
Sortable.create( $list, {
|
||||
"handle": ".handle"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#generateFlightList() {
|
||||
|
||||
const flightList = new ATCFLightList();
|
||||
const flights:any = flightList.getFlights( true );
|
||||
|
||||
const $tbody = document.getElementById( "atc-flight-list-table-body" );
|
||||
|
||||
if ( $tbody instanceof HTMLElement ) {
|
||||
|
||||
if ( flights.length > 0 ) {
|
||||
|
||||
let flight:any = {};
|
||||
|
||||
let $button, i;
|
||||
|
||||
for ( [ i, flight ] of flights.entries() ) {
|
||||
|
||||
const $row = document.createElement( "tr" );
|
||||
$row.dataset.status = flight.status
|
||||
|
||||
let $td = document.createElement( "td" );
|
||||
$td.innerText = flight.name;
|
||||
$row.appendChild( $td );
|
||||
|
||||
$td = document.createElement( "td" );
|
||||
$td.innerText = flight.takeOffTime;
|
||||
$row.appendChild( $td );
|
||||
|
||||
$td = document.createElement( "td" );
|
||||
$td.innerText = "00:0" + ( 5 + i );
|
||||
$row.appendChild( $td );
|
||||
|
||||
$td = document.createElement( "td" );
|
||||
$td.innerText = flight.status;
|
||||
$row.appendChild( $td );
|
||||
|
||||
|
||||
$td = document.createElement( "td" );
|
||||
$button = document.createElement( "button" );
|
||||
$button.innerText = "...";
|
||||
|
||||
$td.appendChild( $button );
|
||||
|
||||
$row.appendChild( $td );
|
||||
|
||||
|
||||
$tbody.appendChild( $row );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected onStatusUpdate(): void {
|
||||
|
||||
document.body.classList.toggle( "atc-enabled", this.getStatus() );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
7
client/src/atc/atcmockapi.ts
Normal file
7
client/src/atc/atcmockapi.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export abstract class ATCMockAPI {
|
||||
|
||||
constructor() {}
|
||||
|
||||
generateMockData() {}
|
||||
|
||||
}
|
||||
40
client/src/atc/atcmockapi/flights.ts
Normal file
40
client/src/atc/atcmockapi/flights.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import { ATCMockAPI } from "../atcmockapi";
|
||||
|
||||
export class ATCMockAPI_Flights extends ATCMockAPI {
|
||||
|
||||
|
||||
generateMockData() {
|
||||
|
||||
let data = [];
|
||||
const statuses = [ "unknown", "checkedIn", "readyToTaxi" ]
|
||||
|
||||
for ( const [ i, flightName ] of [ "Shark", "Whale", "Dolphin" ].entries() ) {
|
||||
|
||||
data.push({
|
||||
"name": flightName,
|
||||
"status": statuses[ i ],
|
||||
"takeOffTime": "18:0" + i
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
localStorage.setItem( "flightList", JSON.stringify( data ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
get( generateMockDataIfEmpty?:boolean ) : object {
|
||||
|
||||
generateMockDataIfEmpty = generateMockDataIfEmpty || false;
|
||||
|
||||
let data = localStorage.getItem( "flightList" ) || "[]";
|
||||
|
||||
if ( data === "[]" && generateMockDataIfEmpty ) {
|
||||
this.generateMockData();
|
||||
}
|
||||
|
||||
return JSON.parse( data );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
18
client/src/atc/flightlist.ts
Normal file
18
client/src/atc/flightlist.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { ATCMockAPI_Flights } from "./atcmockapi/flights";
|
||||
|
||||
export class ATCFLightList {
|
||||
|
||||
|
||||
constructor() {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
getFlights( generateMockDataIfEmpty?:boolean ) {
|
||||
let api = new ATCMockAPI_Flights();
|
||||
return api.get( generateMockDataIfEmpty );
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,8 +6,8 @@ import { MissionHandler } from "./missionhandler/missionhandler";
|
||||
import { UnitControlPanel } from "./panels/unitcontrolpanel";
|
||||
import { MouseInfoPanel } from "./panels/mouseinfopanel";
|
||||
import { AIC } from "./aic/aic";
|
||||
import { ATC } from "./atc/ATC";
|
||||
import { FeatureSwitches } from "./FeatureSwitches";
|
||||
import { ATC } from "./atc/atc";
|
||||
import { FeatureSwitches } from "./featureswitches";
|
||||
import { LogPanel } from "./panels/logpanel";
|
||||
import { getAirbases, getBulllseye as getBulllseyes, getMission, getUnits, toggleDemoEnabled } from "./server/server";
|
||||
import { UnitDataTable } from "./units/unitdatatable";
|
||||
|
||||
BIN
missions/olympus.miz
Normal file
BIN
missions/olympus.miz
Normal file
Binary file not shown.
42
src/olympus.sln
Normal file
42
src/olympus.sln
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32929.385
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "core\core.vcxproj", "{8A48D855-0E01-42BA-BD8C-07B0877C68DF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "logger", "logger\logger.vcxproj", "{873ECABE-FCFE-4217-AC15-91959C3CF1C6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dcstools", "dcstools\dcstools.vcxproj", "{2B255368-39A0-431A-A6DE-CC739AC70DC1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luatools", "luatools\luatools.vcxproj", "{DE139EC1-4F88-47D5-BE73-F41915FE14A3}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utils", "utils\utils.vcxproj", "{B85009CE-4A5C-4A5A-B85D-001B3A2651B2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "olympus", "olympus\olympus.vcxproj", "{5F3FC91E-1FBC-4223-8011-9708DE913474}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8A48D855-0E01-42BA-BD8C-07B0877C68DF}.Release|x64.ActiveCfg = Release|x64
|
||||
{8A48D855-0E01-42BA-BD8C-07B0877C68DF}.Release|x64.Build.0 = Release|x64
|
||||
{873ECABE-FCFE-4217-AC15-91959C3CF1C6}.Release|x64.ActiveCfg = Release|x64
|
||||
{873ECABE-FCFE-4217-AC15-91959C3CF1C6}.Release|x64.Build.0 = Release|x64
|
||||
{2B255368-39A0-431A-A6DE-CC739AC70DC1}.Release|x64.ActiveCfg = Release|x64
|
||||
{2B255368-39A0-431A-A6DE-CC739AC70DC1}.Release|x64.Build.0 = Release|x64
|
||||
{DE139EC1-4F88-47D5-BE73-F41915FE14A3}.Release|x64.ActiveCfg = Release|x64
|
||||
{DE139EC1-4F88-47D5-BE73-F41915FE14A3}.Release|x64.Build.0 = Release|x64
|
||||
{B85009CE-4A5C-4A5A-B85D-001B3A2651B2}.Release|x64.ActiveCfg = Release|x64
|
||||
{B85009CE-4A5C-4A5A-B85D-001B3A2651B2}.Release|x64.Build.0 = Release|x64
|
||||
{5F3FC91E-1FBC-4223-8011-9708DE913474}.Release|x64.ActiveCfg = Release|x64
|
||||
{5F3FC91E-1FBC-4223-8011-9708DE913474}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FAB9F592-7511-4EB9-B365-078842ED9BDD}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Loading…
x
Reference in New Issue
Block a user