mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Completed airbase element (first panel, spawn panel still to add)
This commit is contained in:
@@ -11,6 +11,8 @@ export class Airbase extends L.Marker
|
||||
{
|
||||
#name: string = "";
|
||||
#coalition: string = "";
|
||||
#properties: string[] = [];
|
||||
#parkings: string[] = [];
|
||||
|
||||
constructor(options: AirbaseOptions)
|
||||
{
|
||||
@@ -24,8 +26,7 @@ export class Airbase extends L.Marker
|
||||
className: 'leaflet-airbase-marker',
|
||||
iconSize: [63, 63]
|
||||
}); // Set the marker, className must be set to avoid white square
|
||||
this.setIcon(icon);
|
||||
|
||||
this.setIcon(icon);
|
||||
}
|
||||
|
||||
setCoalition(coalition: string)
|
||||
@@ -39,8 +40,33 @@ export class Airbase extends L.Marker
|
||||
return this.#coalition;
|
||||
}
|
||||
|
||||
setName(name: string)
|
||||
{
|
||||
this.#name = name;
|
||||
}
|
||||
|
||||
getName()
|
||||
{
|
||||
return this.#name;
|
||||
}
|
||||
|
||||
setProperties(properties: string[])
|
||||
{
|
||||
this.#properties = properties;
|
||||
}
|
||||
|
||||
getProperties()
|
||||
{
|
||||
return this.#properties;
|
||||
}
|
||||
|
||||
setParkings(parkings: string[])
|
||||
{
|
||||
this.#parkings = parkings;
|
||||
}
|
||||
|
||||
getParkings()
|
||||
{
|
||||
return this.#parkings;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,13 +72,14 @@ export class MissionHandler
|
||||
{
|
||||
this.#airbasesMarkers[idx].setLatLng(new LatLng(airbase.lat, airbase.lng));
|
||||
this.#airbasesMarkers[idx].setCoalition(airbase.coalition);
|
||||
this.#airbasesMarkers[idx].setProperties(["test1", "test2"]);
|
||||
this.#airbasesMarkers[idx].setParkings(["2x big", "5x small"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#onAirbaseClick(e: any)
|
||||
{
|
||||
var enableLandHere = getUnitsManager().getSelectedUnitsType() === "Aircraft" && (getUnitsManager().getSelectedUnitsCoalition() === e.sourceTarget.getCoalition() || e.sourceTarget.getActiveCoalition === "neutral");
|
||||
getMap().showAirbaseContextMenu(e, e.sourceTarget.getName(), ["test1", "tes2"], ["2x small", "3x large"], enableLandHere, e.sourceTarget.getActiveCoalition);
|
||||
getMap().showAirbaseContextMenu(e, e.sourceTarget);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user