From 3cca3187ad806dfdb1fb25cf98446906e903a7be Mon Sep 17 00:00:00 2001 From: Pax1601 Date: Wed, 29 Nov 2023 12:57:17 +0100 Subject: [PATCH] Added a warning message for ground and navy units ROE --- client/demo.js | 2 +- client/src/constants/constants.ts | 4 ++-- client/src/unit/unit.ts | 2 +- src/core/src/groundunit.cpp | 2 +- src/core/src/navyunit.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/demo.js b/client/demo.js index 836af77c..e27687aa 100644 --- a/client/demo.js +++ b/client/demo.js @@ -446,7 +446,7 @@ class DemoDataGenerator { }; mission(req, res){ - var ret = {mission: {theatre: "Normandy"}}; + var ret = {mission: {theatre: "Nevada"}}; ret.time = Date.now(); ret.mission.dateAndTime = { diff --git a/client/src/constants/constants.ts b/client/src/constants/constants.ts index 194d57e4..07fba370 100644 --- a/client/src/constants/constants.ts +++ b/client/src/constants/constants.ts @@ -28,9 +28,9 @@ export const emissionsCountermeasures: string[] = ["silent", "attack", "defend", export const ROEDescriptions: string[] = [ "Free (Attack anyone)", - "Designated (Attack the designated target only)", + "Designated (Attack the designated target only) \nWARNING: Ground and Navy units don't respect this ROE, it will be equivalent to weapons FREE.", "", - "Return (Only fire if fired upon)", + "Return (Only fire if fired upon) \nWARNING: Ground and Navy units don't respect this ROE, it will be equivalent to weapons FREE.", "Hold (Never fire)" ]; diff --git a/client/src/unit/unit.ts b/client/src/unit/unit.ts index 1cf901df..1e6df10a 100644 --- a/client/src/unit/unit.ts +++ b/client/src/unit/unit.ts @@ -1605,7 +1605,7 @@ export class GroundUnit extends Unit { } else { if (this.canAAA()) { - contextActionSet.addContextAction(this, "scenic-aaa", "Scenic AAA", "Shoot AAA in the air without aiming at any target, when a enemy unit gets close enough.\nWARNING: works correctly only on neutral units, blue or red units will aim", (units: Unit[]) => { getApp().getUnitsManager().scenicAAA(units) }, undefined, { + contextActionSet.addContextAction(this, "scenic-aaa", "Scenic AAA", "Shoot AAA in the air without aiming at any target, when an enemy unit gets close enough.\nWARNING: works correctly only on neutral units, blue or red units will aim", (units: Unit[]) => { getApp().getUnitsManager().scenicAAA(units) }, undefined, { "isScenic": true }); contextActionSet.addContextAction(this, "miss-aaa", "Miss on purpose", "Shoot AAA towards the closest enemy unit, but don't aim precisely.\nWARNING: works correctly only on neutral units, blue or red units will aim", (units: Unit[]) => { getApp().getUnitsManager().missOnPurpose(units) }, undefined, { diff --git a/src/core/src/groundunit.cpp b/src/core/src/groundunit.cpp index f6449d0e..56ba31d9 100644 --- a/src/core/src/groundunit.cpp +++ b/src/core/src/groundunit.cpp @@ -52,7 +52,7 @@ void GroundUnit::setDefaults(bool force) setState(State::IDLE); /* Set the default options */ - setROE(ROE::OPEN_FIRE_WEAPON_FREE, force); + setROE(ROE::WEAPON_FREE, force); setOnOff(onOff, force); setFollowRoads(followRoads, force); } diff --git a/src/core/src/navyunit.cpp b/src/core/src/navyunit.cpp index 256fbb64..b965d423 100644 --- a/src/core/src/navyunit.cpp +++ b/src/core/src/navyunit.cpp @@ -49,7 +49,7 @@ void NavyUnit::setDefaults(bool force) setState(State::IDLE); /* Set the default options */ - setROE(ROE::OPEN_FIRE_WEAPON_FREE, force); + setROE(ROE::WEAPON_FREE, force); setOnOff(onOff, force); setFollowRoads(followRoads, force); }