diff --git a/frontend/react/src/ui/panels/audiomenu.tsx b/frontend/react/src/ui/panels/audiomenu.tsx
index 41cdffca..ad9c0cee 100644
--- a/frontend/react/src/ui/panels/audiomenu.tsx
+++ b/frontend/react/src/ui/panels/audiomenu.tsx
@@ -27,7 +27,6 @@ import { OlDropdown, OlDropdownItem } from "../components/oldropdown";
import { OlCoalitionToggle } from "../components/olcoalitiontoggle";
import { Coalition, SRSClientData } from "../../types/types";
import { AudioManagerState, GAME_MASTER, NONE } from "../../constants/constants";
-import { AudioManager } from "../../audio/audiomanager";
export function AudioMenu(props: { open: boolean; onClose: () => void; children?: JSX.Element | JSX.Element[] }) {
const [devices, setDevices] = useState([] as MediaDeviceInfo[]);
diff --git a/frontend/react/src/ui/panels/unitcontrolmenu.tsx b/frontend/react/src/ui/panels/unitcontrolmenu.tsx
index be496653..ab311884 100644
--- a/frontend/react/src/ui/panels/unitcontrolmenu.tsx
+++ b/frontend/react/src/ui/panels/unitcontrolmenu.tsx
@@ -420,12 +420,9 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
return (
|
- {" "}
-
- {entry[1][1] as string}
-
+ {entry[1][1] as string}
|
{["blue", "neutral", "red"].map((coalition) => {
return (
@@ -578,6 +575,29 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
{/* ============== Unit control menu START ============== */}
{selectedUnits.length > 0 && (
<>
+ {Object.keys(unitOccurences["blue"]).length + Object.keys(unitOccurences["neutral"]).length + Object.keys(unitOccurences["red"]).length > 1 && (
+
+ {" "}
+
{" "}
+
+
Click: keep as only selection
+
ctrl + click: deselect
+
shift + click: keep only units of coalition
+
{" "}
+
+ )}
{/* ============== Units list START ============== */}
void }) {
key={`coalition-${idx}`}
data-coalition={coalition}
className={`
- flex content-center justify-between border-l-4
- py-3 pl-4 pr-5
+ flex cursor-pointer content-center justify-between
+ border-l-4 py-3 pl-4 pr-5
data-[coalition='blue']:border-blue-500
data-[coalition='neutral']:border-gray-500
data-[coalition='red']:border-red-500
+ hover:bg-white/5
`}
+ onClick = {(ev) => {
+ if (ev.ctrlKey) {
+ getApp()
+ .getUnitsManager()
+ .getSelectedUnits().forEach((unit) => {
+ if (unit.getName() === name && unit.getCoalition() === coalition) {
+ unit.setSelected(false);
+ }
+ })
+ } else if (ev.shiftKey) {
+ getApp()
+ .getUnitsManager()
+ .getSelectedUnits().forEach((unit) => {
+ if (unit.getCoalition() !== coalition) {
+ unit.setSelected(false);
+ }
+ })
+ } else {
+ getApp()
+ .getUnitsManager()
+ .getSelectedUnits().forEach((unit) => {
+ if (unit.getName() !== name || unit.getCoalition() !== coalition) {
+ unit.setSelected(false);
+ }
+ })
+ }
+ }}
>
void }) {
{" "}
- {" "}
- Hold fire: The unit will not shoot in any circumstance
+ Hold fire: The unit will not shoot in
+ any circumstance
{" "}
- {" "}
- Return fire: The unit will not fire unless fired upon
+ Return fire: The unit will not fire
+ unless fired upon
{" "}
-
{" "}
+
{" "}
{" "}
- Fire on target: The unit will not fire unless fired upon{" "}
-
- or
-
{" "}
- ordered to do so{" "}
+ Fire on target: The unit will not fire unless fired upon
or
ordered to do so{" "}
{" "}
- {" "}
- Free: The unit will fire at any detected enemy in range
+ Free: The unit will fire at any
+ detected enemy in range
-
+
Currently, DCS blue and red ground units do not respect{" "}
- {" "}
- and{" "}
- {" "}
- rules of engagement, so be careful, they may start shooting when you don't want them to. Use neutral units for finer
- control.
+ and{" "}
+ rules of engagement, so be careful, they
+ may start shooting when you don't want them to. Use neutral units for finer control.
@@ -912,25 +948,29 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
{" "}
- Green: The unit will not engage
- with its sensors in any circumstances. The unit will be able to move.
+ {" "}
+ Green: The unit will not engage with its sensors in any circumstances. The unit will be able to move.
{" "}
-
{" "}
+
{" "}
Auto: The unit will use its sensors to engage based on its ROE.
{" "}
- Red: The unit will be actively
- searching for target with its sensors. For some units, this will deploy the radar and make the unit not able to move.
+ {" "}
+ Red: The unit will be actively searching for target with its sensors. For some units, this will deploy the radar and make
+ the unit not able to move.
@@ -987,35 +1027,31 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
{" "}
- {" "}
- No reaction: The unit will not react in any circumstance
+ No reaction: The unit will not
+ react in any circumstance
{" "}
- {" "}
- Passive: The unit will use counter-measures, but will not alter its course
+ Passive: The unit will use
+ counter-measures, but will not alter its course
{" "}
- {" "}
- Manouevre: The unit will try to evade the threat using manoeuvres, but no counter-measures
+ Manouevre: The unit will try
+ to evade the threat using manoeuvres, but no counter-measures
{" "}
- {" "}
- Full evasion: the unit will try to evade the threat both manoeuvering and using counter-measures
+ Full evasion: the unit will try
+ to evade the threat both manoeuvering and using counter-measures
@@ -1066,35 +1102,31 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
{" "}
- {" "}
- Radio silence: No radar or ECM will be used
+ Radio silence: No radar or
+ ECM will be used
{" "}
- {" "}
- Defensive: The unit will turn radar and ECM on only when threatened
+ Defensive: The unit will turn
+ radar and ECM on only when threatened
{" "}
- {" "}
- Attack: The unit will use radar and ECM when engaging other units
+ Attack: The unit will use
+ radar and ECM when engaging other units
{" "}
- {" "}
- Free: the unit will use the radar and ECM all the time
+ Free: the unit will use the
+ radar and ECM all the time
@@ -1312,9 +1344,9 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
>
-
+
Currently, DCS blue and red ground units do not respect their rules of engagement, so be careful, they may start shooting when
@@ -1414,9 +1446,9 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
{/* ============== Miss on purpose toggle END ============== */}
{/* ============== Shots scatter START ============== */}
-
+
void }) {
{/* ============== Operate as toggle START ============== */}
{selectedUnits.every((unit) => unit.getCoalition() === "neutral") && (
-
+
void }) {
value={activeRadioSettings ? activeRadioSettings.TACAN.channel : 1}
>
-
+
{
@@ -2225,11 +2256,9 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
className={`
flex content-center gap-2 rounded-full
${selectedUnits[0].getFuel() > 40 && `bg-green-700`}
- ${
- selectedUnits[0].getFuel() > 10 &&
- selectedUnits[0].getFuel() <= 40 &&
- `bg-yellow-700`
- }
+ ${selectedUnits[0].getFuel() > 10 && selectedUnits[0].getFuel() <= 40 && `
+ bg-yellow-700
+ `}
${selectedUnits[0].getFuel() <= 10 && `bg-red-700`}
px-2 py-1 text-sm font-bold text-white
`}
@@ -2247,9 +2276,10 @@ export function UnitControlMenu(props: { open: boolean; onClose: () => void }) {
)}
-
+
{Math.round(mToFt(selectedUnits[0].getPosition().alt ?? 0))} ft