diff --git a/backend/core/src/groundunit.cpp b/backend/core/src/groundunit.cpp index 29daee5e..a47edd9e 100644 --- a/backend/core/src/groundunit.cpp +++ b/backend/core/src/groundunit.cpp @@ -71,7 +71,7 @@ void GroundUnit::setDefaults(bool force) setState(State::IDLE); /* Set the default options */ - setROE(ROE::WEAPON_FREE, force); + setROE(ROE::OPEN_FIRE_WEAPON_FREE, force); setOnOff(onOff, force); setFollowRoads(followRoads, force); } diff --git a/backend/core/src/navyunit.cpp b/backend/core/src/navyunit.cpp index f2112b59..e4bdcd52 100644 --- a/backend/core/src/navyunit.cpp +++ b/backend/core/src/navyunit.cpp @@ -68,7 +68,7 @@ void NavyUnit::setDefaults(bool force) setState(State::IDLE); /* Set the default options */ - setROE(ROE::WEAPON_FREE, force); + setROE(ROE::OPEN_FIRE_WEAPON_FREE, force); setOnOff(onOff, force); setFollowRoads(followRoads, force); } diff --git a/frontend/react/public/images/v2-thumbnail.jpg b/frontend/react/public/images/v2-thumbnail.jpg new file mode 100644 index 00000000..43fb1d8d Binary files /dev/null and b/frontend/react/public/images/v2-thumbnail.jpg differ diff --git a/frontend/react/src/constants/constants.ts b/frontend/react/src/constants/constants.ts index ad9ba46b..dc8703d1 100644 --- a/frontend/react/src/constants/constants.ts +++ b/frontend/react/src/constants/constants.ts @@ -96,7 +96,7 @@ export const states: string[] = [ UnitState.LAND_AT_POINT, ]; -export const ROEs: string[] = ["free", "designated", "", "return", "hold"]; +export const ROEs: string[] = ["", "free", "designated", "return", "hold"]; export const reactionsToThreat: string[] = ["none", "manoeuvre", "passive", "evade"]; export const emissionsCountermeasures: string[] = ["silent", "attack", "defend", "free"]; @@ -220,6 +220,14 @@ export const minimapBoundaries = { new LatLng(22.5127778, 149.5427778), new LatLng(22.09, 135.0572222), ], + MarianaIslandsWWII: [ + // Marianas + new LatLng(22.09, 135.0572222), + new LatLng(10.5777778, 135.7477778), + new LatLng(10.7725, 149.3918333), + new LatLng(22.5127778, 149.5427778), + new LatLng(22.09, 135.0572222), + ], Falklands: [ // South Atlantic new LatLng(-49.097217, -79.418267), @@ -252,6 +260,14 @@ export const minimapBoundaries = { new LatLng(36.22, 68.05), new LatLng(36.22, 61.21), ], + GermanyCW: [ + // Germany Cold War + new LatLng(54.724620, 5.570068), + new LatLng(49.282140, 5.570068), + new LatLng(49.282140, 16.413574), + new LatLng(54.724620, 16.413574), + new LatLng(54.724620, 5.570068), + ], }; export const mapBounds = { @@ -263,6 +279,10 @@ export const mapBounds = { bounds: new LatLngBounds([10.5777778, 135.7477778], [22.5127778, 149.5427778]), zoom: 5, }, + MarianaIslandsWWII: { + bounds: new LatLngBounds([10.5777778, 135.7477778], [22.5127778, 149.5427778]), + zoom: 5, + }, Nevada: { bounds: new LatLngBounds([34.4037128, -119.7806729], [39.7372411, -112.1130805]), zoom: 5, @@ -285,6 +305,7 @@ export const mapBounds = { zoom: 4, }, Afghanistan: { bounds: new LatLngBounds([36.22, 61.21], [30.42, 68.05]), zoom: 5 }, + GermanyCW: { bounds: new LatLngBounds([54.724620, 5.570068], [49.282140, 16.413574]), zoom: 4 } }; export const defaultMapMirrors = {}; diff --git a/frontend/react/src/other/utils.ts b/frontend/react/src/other/utils.ts index b42e33c3..29937639 100644 --- a/frontend/react/src/other/utils.ts +++ b/frontend/react/src/other/utils.ts @@ -283,7 +283,7 @@ export function enumToState(state: number) { export function enumToROE(ROE: number) { if (ROE < ROEs.length) return ROEs[ROE]; - else return ROEs[0]; + else return ROEs[2]; } export function enumToAlarmState(alarmState: number) { @@ -303,8 +303,8 @@ export function convertROE(idx: number) { let roe = 0; if (idx === 0) roe = 4; else if (idx === 1) roe = 3; - else if (idx === 2) roe = 1; - else roe = 0; + else if (idx === 2) roe = 2; + else roe = 1; return roe; } diff --git a/frontend/react/src/ui/modals/components/card.tsx b/frontend/react/src/ui/modals/components/card.tsx index e2d2ab57..d6ca6dac 100644 --- a/frontend/react/src/ui/modals/components/card.tsx +++ b/frontend/react/src/ui/modals/components/card.tsx @@ -2,9 +2,10 @@ import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faArrowRight } from "@fortawesome/free-solid-svg-icons"; -export function Card(props: { children?: JSX.Element | JSX.Element[]; className?: string }) { +export function Card(props: { children?: JSX.Element | JSX.Element[]; className?: string; onClick?: () => void }) { return (
Login by role @@ -168,9 +172,13 @@ export function LoginModal(props: { open: boolean }) {
Login by name @@ -180,7 +188,7 @@ export function LoginModal(props: { open: boolean }) {
{loginByRole ? ( <> - - - {setUsername("Game master")}}>Game master - {setUsername("Blue commander")}}>Blue commander - {setUsername("Red commander")}}>Red commander - - + + { + setUsername("Game master"); + }} + > + Game master + + { + setUsername("Blue commander"); + }} + > + Blue commander + + { + setUsername("Red commander"); + }} + > + Red commander + + ) : ( <> @@ -284,10 +309,9 @@ export function LoginModal(props: { open: boolean }) { > Choose your role - + {commandModes?.map((commandMode) => { return setActiveCommandMode(commandMode)}>{commandMode}; })} @@ -389,18 +413,20 @@ export function LoginModal(props: { open: boolean }) { max-md:flex-col `} > - + window.open("https://www.youtube.com/watch?v=Z7cDVbnRVDc", "_blank")}> -
- YouTube Video Guide + `} + > + Olympus v2 trailer
- + window.open("https://github.com/Pax1601/DCSOlympus/wiki", "_blank")}> -
+ `} + > Wiki Guide
diff --git a/version.json b/version.json index 9be6c4fc..a085857d 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v2.0.2" + "version": "v2.0.3" }