diff --git a/client/public/images/units/a-10.png b/client/public/images/units/a-10.png new file mode 100644 index 00000000..748be4cb Binary files /dev/null and b/client/public/images/units/a-10.png differ diff --git a/client/public/images/units/a-20.png b/client/public/images/units/a-20.png new file mode 100644 index 00000000..d0fb8a0c Binary files /dev/null and b/client/public/images/units/a-20.png differ diff --git a/client/public/images/units/a-29.png b/client/public/images/units/a-29.png new file mode 100644 index 00000000..8f2ead6e Binary files /dev/null and b/client/public/images/units/a-29.png differ diff --git a/client/public/images/units/a-4.png b/client/public/images/units/a-4.png new file mode 100644 index 00000000..dadcb05c Binary files /dev/null and b/client/public/images/units/a-4.png differ diff --git a/client/public/images/units/a-400.png b/client/public/images/units/a-400.png new file mode 100644 index 00000000..71863ac1 Binary files /dev/null and b/client/public/images/units/a-400.png differ diff --git a/client/public/images/units/a-50.png b/client/public/images/units/a-50.png new file mode 100644 index 00000000..a14b837a Binary files /dev/null and b/client/public/images/units/a-50.png differ diff --git a/client/public/images/units/a-6.png b/client/public/images/units/a-6.png new file mode 100644 index 00000000..8c198a7e Binary files /dev/null and b/client/public/images/units/a-6.png differ diff --git a/client/public/images/units/ah-1.png b/client/public/images/units/ah-1.png new file mode 100644 index 00000000..4d1b3b40 Binary files /dev/null and b/client/public/images/units/ah-1.png differ diff --git a/client/public/images/units/ah-64.png b/client/public/images/units/ah-64.png new file mode 100644 index 00000000..ba5f43b6 Binary files /dev/null and b/client/public/images/units/ah-64.png differ diff --git a/client/public/images/units/airUnit.png b/client/public/images/units/airUnit.png new file mode 100644 index 00000000..6578221b Binary files /dev/null and b/client/public/images/units/airUnit.png differ diff --git a/client/public/images/units/airliner2engine.png b/client/public/images/units/airliner2engine.png new file mode 100644 index 00000000..ae27a626 Binary files /dev/null and b/client/public/images/units/airliner2engine.png differ diff --git a/client/public/images/units/an-26.png b/client/public/images/units/an-26.png new file mode 100644 index 00000000..2976fdee Binary files /dev/null and b/client/public/images/units/an-26.png differ diff --git a/client/public/images/units/av8bna.png b/client/public/images/units/av8bna.png new file mode 100644 index 00000000..bb3fc845 Binary files /dev/null and b/client/public/images/units/av8bna.png differ diff --git a/client/public/images/units/b-1.png b/client/public/images/units/b-1.png new file mode 100644 index 00000000..dda58612 Binary files /dev/null and b/client/public/images/units/b-1.png differ diff --git a/client/public/images/units/b-17.png b/client/public/images/units/b-17.png new file mode 100644 index 00000000..a1515b20 Binary files /dev/null and b/client/public/images/units/b-17.png differ diff --git a/client/public/images/units/b-2.png b/client/public/images/units/b-2.png new file mode 100644 index 00000000..e68ac71f Binary files /dev/null and b/client/public/images/units/b-2.png differ diff --git a/client/public/images/units/b-52.png b/client/public/images/units/b-52.png new file mode 100644 index 00000000..ebc22079 Binary files /dev/null and b/client/public/images/units/b-52.png differ diff --git a/client/public/images/units/b707.png b/client/public/images/units/b707.png new file mode 100644 index 00000000..f8496dd2 Binary files /dev/null and b/client/public/images/units/b707.png differ diff --git a/client/public/images/units/bf109.png b/client/public/images/units/bf109.png new file mode 100644 index 00000000..e0d3691c Binary files /dev/null and b/client/public/images/units/bf109.png differ diff --git a/client/public/images/units/c-101.png b/client/public/images/units/c-101.png new file mode 100644 index 00000000..e4372e90 Binary files /dev/null and b/client/public/images/units/c-101.png differ diff --git a/client/public/images/units/c-130.png b/client/public/images/units/c-130.png new file mode 100644 index 00000000..74f98897 Binary files /dev/null and b/client/public/images/units/c-130.png differ diff --git a/client/public/images/units/c-17.png b/client/public/images/units/c-17.png new file mode 100644 index 00000000..4339ab18 Binary files /dev/null and b/client/public/images/units/c-17.png differ diff --git a/client/public/images/units/c-5.png b/client/public/images/units/c-5.png new file mode 100644 index 00000000..00fccd57 Binary files /dev/null and b/client/public/images/units/c-5.png differ diff --git a/client/public/images/units/ch-47.png b/client/public/images/units/ch-47.png new file mode 100644 index 00000000..9a1ecd22 Binary files /dev/null and b/client/public/images/units/ch-47.png differ diff --git a/client/public/images/units/ch-53.png b/client/public/images/units/ch-53.png new file mode 100644 index 00000000..64a2b083 Binary files /dev/null and b/client/public/images/units/ch-53.png differ diff --git a/client/public/images/units/e-2.png b/client/public/images/units/e-2.png new file mode 100644 index 00000000..fc797e9e Binary files /dev/null and b/client/public/images/units/e-2.png differ diff --git a/client/public/images/units/e-3.png b/client/public/images/units/e-3.png new file mode 100644 index 00000000..1967a347 Binary files /dev/null and b/client/public/images/units/e-3.png differ diff --git a/client/public/images/units/eurofighter.png b/client/public/images/units/eurofighter.png new file mode 100644 index 00000000..f18076e1 Binary files /dev/null and b/client/public/images/units/eurofighter.png differ diff --git a/client/public/images/units/f-111.png b/client/public/images/units/f-111.png new file mode 100644 index 00000000..c424ad6b Binary files /dev/null and b/client/public/images/units/f-111.png differ diff --git a/client/public/images/units/f-117.png b/client/public/images/units/f-117.png new file mode 100644 index 00000000..306133d4 Binary files /dev/null and b/client/public/images/units/f-117.png differ diff --git a/client/public/images/units/f-14.png b/client/public/images/units/f-14.png new file mode 100644 index 00000000..d7af7621 Binary files /dev/null and b/client/public/images/units/f-14.png differ diff --git a/client/public/images/units/f-15.png b/client/public/images/units/f-15.png new file mode 100644 index 00000000..60e26c1b Binary files /dev/null and b/client/public/images/units/f-15.png differ diff --git a/client/public/images/units/f-16c.png b/client/public/images/units/f-16c.png new file mode 100644 index 00000000..a74de3c0 Binary files /dev/null and b/client/public/images/units/f-16c.png differ diff --git a/client/public/images/units/f-22.png b/client/public/images/units/f-22.png new file mode 100644 index 00000000..5f210d30 Binary files /dev/null and b/client/public/images/units/f-22.png differ diff --git a/client/public/images/units/f-35.png b/client/public/images/units/f-35.png new file mode 100644 index 00000000..196283fc Binary files /dev/null and b/client/public/images/units/f-35.png differ diff --git a/client/public/images/units/f-4.png b/client/public/images/units/f-4.png new file mode 100644 index 00000000..21784012 Binary files /dev/null and b/client/public/images/units/f-4.png differ diff --git a/client/public/images/units/f-5.png b/client/public/images/units/f-5.png new file mode 100644 index 00000000..087bff8c Binary files /dev/null and b/client/public/images/units/f-5.png differ diff --git a/client/public/images/units/f-86.png b/client/public/images/units/f-86.png new file mode 100644 index 00000000..ce576340 Binary files /dev/null and b/client/public/images/units/f-86.png differ diff --git a/client/public/images/units/fa-18c.png b/client/public/images/units/fa-18c.png new file mode 100644 index 00000000..d6856033 Binary files /dev/null and b/client/public/images/units/fa-18c.png differ diff --git a/client/public/images/units/fw190.png b/client/public/images/units/fw190.png new file mode 100644 index 00000000..8bc95546 Binary files /dev/null and b/client/public/images/units/fw190.png differ diff --git a/client/public/images/units/general1.png b/client/public/images/units/general1.png new file mode 100644 index 00000000..bf0bc2bd Binary files /dev/null and b/client/public/images/units/general1.png differ diff --git a/client/public/images/units/gripen.png b/client/public/images/units/gripen.png new file mode 100644 index 00000000..0d5812b2 Binary files /dev/null and b/client/public/images/units/gripen.png differ diff --git a/client/public/images/units/h-6.png b/client/public/images/units/h-6.png new file mode 100644 index 00000000..9fb48950 Binary files /dev/null and b/client/public/images/units/h-6.png differ diff --git a/client/public/images/units/hawk.png b/client/public/images/units/hawk.png new file mode 100644 index 00000000..5cd07de5 Binary files /dev/null and b/client/public/images/units/hawk.png differ diff --git a/client/public/images/units/helicopter1.png b/client/public/images/units/helicopter1.png new file mode 100644 index 00000000..454152ff Binary files /dev/null and b/client/public/images/units/helicopter1.png differ diff --git a/client/public/images/units/i-16.png b/client/public/images/units/i-16.png new file mode 100644 index 00000000..eea45594 Binary files /dev/null and b/client/public/images/units/i-16.png differ diff --git a/client/public/images/units/il-76.png b/client/public/images/units/il-76.png new file mode 100644 index 00000000..d0a3cf55 Binary files /dev/null and b/client/public/images/units/il-76.png differ diff --git a/client/public/images/units/j-10.png b/client/public/images/units/j-10.png new file mode 100644 index 00000000..6fa2dd21 Binary files /dev/null and b/client/public/images/units/j-10.png differ diff --git a/client/public/images/units/j-20.png b/client/public/images/units/j-20.png new file mode 100644 index 00000000..7e5b34f4 Binary files /dev/null and b/client/public/images/units/j-20.png differ diff --git a/client/public/images/units/j-7.png b/client/public/images/units/j-7.png new file mode 100644 index 00000000..f1bcfd95 Binary files /dev/null and b/client/public/images/units/j-7.png differ diff --git a/client/public/images/units/jf-17.png b/client/public/images/units/jf-17.png new file mode 100644 index 00000000..2bfde2f3 Binary files /dev/null and b/client/public/images/units/jf-17.png differ diff --git a/client/public/images/units/ju-88.png b/client/public/images/units/ju-88.png new file mode 100644 index 00000000..59768856 Binary files /dev/null and b/client/public/images/units/ju-88.png differ diff --git a/client/public/images/units/ka-27.png b/client/public/images/units/ka-27.png new file mode 100644 index 00000000..be2b243d Binary files /dev/null and b/client/public/images/units/ka-27.png differ diff --git a/client/public/images/units/ka-50.png b/client/public/images/units/ka-50.png new file mode 100644 index 00000000..71a3b4b4 Binary files /dev/null and b/client/public/images/units/ka-50.png differ diff --git a/client/public/images/units/kc-10.png b/client/public/images/units/kc-10.png new file mode 100644 index 00000000..94868685 Binary files /dev/null and b/client/public/images/units/kc-10.png differ diff --git a/client/public/images/units/kc-135.png b/client/public/images/units/kc-135.png new file mode 100644 index 00000000..64014a04 Binary files /dev/null and b/client/public/images/units/kc-135.png differ diff --git a/client/public/images/units/l-159.png b/client/public/images/units/l-159.png new file mode 100644 index 00000000..e80c6259 Binary files /dev/null and b/client/public/images/units/l-159.png differ diff --git a/client/public/images/units/l-39.png b/client/public/images/units/l-39.png new file mode 100644 index 00000000..0a9558be Binary files /dev/null and b/client/public/images/units/l-39.png differ diff --git a/client/public/images/units/m2000.png b/client/public/images/units/m2000.png new file mode 100644 index 00000000..03e618f9 Binary files /dev/null and b/client/public/images/units/m2000.png differ diff --git a/client/public/images/units/mi-24.png b/client/public/images/units/mi-24.png new file mode 100644 index 00000000..8708f4a7 Binary files /dev/null and b/client/public/images/units/mi-24.png differ diff --git a/client/public/images/units/mi-26.png b/client/public/images/units/mi-26.png new file mode 100644 index 00000000..4ad1cfd8 Binary files /dev/null and b/client/public/images/units/mi-26.png differ diff --git a/client/public/images/units/mi-28.png b/client/public/images/units/mi-28.png new file mode 100644 index 00000000..9e5aefff Binary files /dev/null and b/client/public/images/units/mi-28.png differ diff --git a/client/public/images/units/mi-8.png b/client/public/images/units/mi-8.png new file mode 100644 index 00000000..6cb33921 Binary files /dev/null and b/client/public/images/units/mi-8.png differ diff --git a/client/public/images/units/mig-15.png b/client/public/images/units/mig-15.png new file mode 100644 index 00000000..1f34bc37 Binary files /dev/null and b/client/public/images/units/mig-15.png differ diff --git a/client/public/images/units/mig-19.png b/client/public/images/units/mig-19.png new file mode 100644 index 00000000..e3ad0cb7 Binary files /dev/null and b/client/public/images/units/mig-19.png differ diff --git a/client/public/images/units/mig-21.png b/client/public/images/units/mig-21.png new file mode 100644 index 00000000..09c98941 Binary files /dev/null and b/client/public/images/units/mig-21.png differ diff --git a/client/public/images/units/mig-23.png b/client/public/images/units/mig-23.png new file mode 100644 index 00000000..d1d70ccf Binary files /dev/null and b/client/public/images/units/mig-23.png differ diff --git a/client/public/images/units/mig-25.png b/client/public/images/units/mig-25.png new file mode 100644 index 00000000..48448104 Binary files /dev/null and b/client/public/images/units/mig-25.png differ diff --git a/client/public/images/units/mig-29.png b/client/public/images/units/mig-29.png new file mode 100644 index 00000000..1e16dfa0 Binary files /dev/null and b/client/public/images/units/mig-29.png differ diff --git a/client/public/images/units/mosquito.png b/client/public/images/units/mosquito.png new file mode 100644 index 00000000..eba239e5 Binary files /dev/null and b/client/public/images/units/mosquito.png differ diff --git a/client/public/images/units/oh-58.png b/client/public/images/units/oh-58.png new file mode 100644 index 00000000..e9747103 Binary files /dev/null and b/client/public/images/units/oh-58.png differ diff --git a/client/public/images/units/p-47.png b/client/public/images/units/p-47.png new file mode 100644 index 00000000..72fc236e Binary files /dev/null and b/client/public/images/units/p-47.png differ diff --git a/client/public/images/units/p-51.png b/client/public/images/units/p-51.png new file mode 100644 index 00000000..cc67b897 Binary files /dev/null and b/client/public/images/units/p-51.png differ diff --git a/client/public/images/units/rafale.png b/client/public/images/units/rafale.png new file mode 100644 index 00000000..b2370ad4 Binary files /dev/null and b/client/public/images/units/rafale.png differ diff --git a/client/public/images/units/rq-1.png b/client/public/images/units/rq-1.png new file mode 100644 index 00000000..cf3b0ad4 Binary files /dev/null and b/client/public/images/units/rq-1.png differ diff --git a/client/public/images/units/rq-4.png b/client/public/images/units/rq-4.png new file mode 100644 index 00000000..090074de Binary files /dev/null and b/client/public/images/units/rq-4.png differ diff --git a/client/public/images/units/s-3.png b/client/public/images/units/s-3.png new file mode 100644 index 00000000..ec65bb2e Binary files /dev/null and b/client/public/images/units/s-3.png differ diff --git a/client/public/images/units/sa-342.png b/client/public/images/units/sa-342.png new file mode 100644 index 00000000..fe846183 Binary files /dev/null and b/client/public/images/units/sa-342.png differ diff --git a/client/public/images/units/spitfire.png b/client/public/images/units/spitfire.png new file mode 100644 index 00000000..d6b9d2ab Binary files /dev/null and b/client/public/images/units/spitfire.png differ diff --git a/client/public/images/units/su-17.png b/client/public/images/units/su-17.png new file mode 100644 index 00000000..32d8aa37 Binary files /dev/null and b/client/public/images/units/su-17.png differ diff --git a/client/public/images/units/su-24.png b/client/public/images/units/su-24.png new file mode 100644 index 00000000..d94b7af7 Binary files /dev/null and b/client/public/images/units/su-24.png differ diff --git a/client/public/images/units/su-25.png b/client/public/images/units/su-25.png new file mode 100644 index 00000000..fa85f62f Binary files /dev/null and b/client/public/images/units/su-25.png differ diff --git a/client/public/images/units/su-27.png b/client/public/images/units/su-27.png new file mode 100644 index 00000000..cc2ce07a Binary files /dev/null and b/client/public/images/units/su-27.png differ diff --git a/client/public/images/units/su-34.png b/client/public/images/units/su-34.png new file mode 100644 index 00000000..110a3c60 Binary files /dev/null and b/client/public/images/units/su-34.png differ diff --git a/client/public/images/units/su-57.png b/client/public/images/units/su-57.png new file mode 100644 index 00000000..c4e83c98 Binary files /dev/null and b/client/public/images/units/su-57.png differ diff --git a/client/public/images/units/tornado.png b/client/public/images/units/tornado.png new file mode 100644 index 00000000..c66219ea Binary files /dev/null and b/client/public/images/units/tornado.png differ diff --git a/client/public/images/units/tu-160.png b/client/public/images/units/tu-160.png new file mode 100644 index 00000000..0391ce41 Binary files /dev/null and b/client/public/images/units/tu-160.png differ diff --git a/client/public/images/units/tu-22.png b/client/public/images/units/tu-22.png new file mode 100644 index 00000000..cb43ca76 Binary files /dev/null and b/client/public/images/units/tu-22.png differ diff --git a/client/public/images/units/tu-95.png b/client/public/images/units/tu-95.png new file mode 100644 index 00000000..cfa72a60 Binary files /dev/null and b/client/public/images/units/tu-95.png differ diff --git a/client/public/images/units/u-28.png b/client/public/images/units/u-28.png new file mode 100644 index 00000000..6e194456 Binary files /dev/null and b/client/public/images/units/u-28.png differ diff --git a/client/public/images/units/uh-1.png b/client/public/images/units/uh-1.png new file mode 100644 index 00000000..0d1102a4 Binary files /dev/null and b/client/public/images/units/uh-1.png differ diff --git a/client/public/images/units/uh-60.png b/client/public/images/units/uh-60.png new file mode 100644 index 00000000..145fa141 Binary files /dev/null and b/client/public/images/units/uh-60.png differ diff --git a/client/public/images/units/viggen.png b/client/public/images/units/viggen.png new file mode 100644 index 00000000..76c5eda0 Binary files /dev/null and b/client/public/images/units/viggen.png differ diff --git a/client/public/images/units/yak-40.png b/client/public/images/units/yak-40.png new file mode 100644 index 00000000..42a56792 Binary files /dev/null and b/client/public/images/units/yak-40.png differ diff --git a/client/public/images/units/yak-52.png b/client/public/images/units/yak-52.png new file mode 100644 index 00000000..1201b6d0 Binary files /dev/null and b/client/public/images/units/yak-52.png differ diff --git a/client/public/stylesheets/contextmenu.css b/client/public/stylesheets/contextmenu.css index 762bd936..b1cb6af1 100644 --- a/client/public/stylesheets/contextmenu.css +++ b/client/public/stylesheets/contextmenu.css @@ -2,51 +2,67 @@ position: absolute; } -.content #contextmenu { - position: relative; -} - -#aircraft-spawn-menu { - height: 191px; -} - -.ol-contextmenu { +#contextmenu { display: flex; flex-direction: column; row-gap: 5px; - width: 200px; + width: 230px; height: fit-content; z-index: 1000; } -.ol-contextmenu>div:first-child{ +#aircraft-spawn-menu { + height: fit-content; +} + +#active-coalition-label { + position: absolute; + top: -28px; + border-radius: 999px; + width: fit-content; + height: fit-content; + padding-left: 10px; + padding-right: 10px; + padding-top: 3px; + padding-bottom: 3px; + font-weight: 600; + color: var(--nav-text); + font-size: 12px; +} + +#context-menu-switch { + margin-right: 10px; +} + +#contextmenu>div:nth-child(2){ display: flex; flex-direction: row; justify-content: space-between; align-items: center; + padding-right: 0px; } -.ol-contextmenu>ul{ +#contextmenu>ul{ max-height: 200px; overflow-x: hidden; overflow-y: auto; } -.ol-contextmenu .ol-panel { +#contextmenu .ol-panel { width: 100%; border-radius: var(--border-radius-sm); } -.ol-contextmenu ul { +#contextmenu ul { margin: 0px; } -.ol-contextmenu button { +#contextmenu>div:nth-child(3)>button { width: 100%; text-align: left; } -.ol-contextmenu>div:nth-child(2){ +#contextmenu>div:nth-child(3){ display: flex; flex-direction: column; @@ -55,33 +71,101 @@ row-gap: 5px; } -.ol-contextmenu .ol-select-container{ +#contextmenu .ol-select-container{ width: 100%; flex:0 0 auto; align-self: stretch; } -#deploy-unit-button { +#contextmenu>div:nth-child(3)>button:last-of-type { width: 100%; text-align: center; } #unit-spawn-aircraft { background-image: var( --spawn-aircraft-url ); + background-size: 48px; } #unit-spawn-ground { background-image: var( --spawn-ground-url ); + background-size: 48px; } -#unit-spawn button { +#unit-spawn-smoke { + background-image: var( --spawn-smoke-url ); + background-size: 48px; +} + +.unit-spawn-button { border: none; - height: 32px; - width: 32px; + height: 48px; + width: 48px; + margin-top: -10px; + margin-bottom: -10px; + border-radius: 0px; } -#unit-spawn button:not(:hover){ - background-color: transparent !important; +.unit-spawn-button:last-of-type { + border-top-right-radius: var(--border-radius-sm); + border-bottom-right-radius: var(--border-radius-sm); } +[data-active-coalition=blue].toggle-fill, +[data-active-coalition=blue].unit-spawn-button:hover, +[data-active-coalition=blue].unit-spawn-button.is-open, +[data-active-coalition=blue]#active-coalition-label, +[data-active-coalition=blue]#deploy-unit-button +{ + background-color: var(--primary-blue) +} +[data-active-coalition=red].toggle-fill, +[data-active-coalition=red].unit-spawn-button:hover, +[data-active-coalition=red].unit-spawn-button.is-open, +[data-active-coalition=red]#active-coalition-label, +[data-active-coalition=red]#deploy-unit-button +{ + background-color: var(--primary-red) +} + +[data-active-coalition=blue]#deploy-unit-button:disabled { + background-color: transparent; + border: 1px solid var(--primary-blue); + cursor: default; +} +[data-active-coalition=red]#deploy-unit-button:disabled { + background-color: transparent; + border: 1px solid var(--primary-red); + cursor: default; +} + +[data-active-coalition=blue]#active-coalition-label::after { + content: "Create blue unit"; +} +[data-active-coalition=red]#active-coalition-label::after { + content: "Create red unit"; +} + +#loadout-preview { + display: flex; + flex-direction: row; + align-content: space-between; + align-items: center; + width: 100%; + column-gap: 20px; +} + +#loadout-list { + display: flex; + flex-direction: column; + align-content: center; + height: 100%; +} + +#unit-image { + width: 100px; + filter: invert(100%); + margin-top: 10px; + margin-bottom: 10px; +} \ No newline at end of file diff --git a/client/public/stylesheets/olympus.css b/client/public/stylesheets/olympus.css index 213e2945..5d983a96 100644 --- a/client/public/stylesheets/olympus.css +++ b/client/public/stylesheets/olympus.css @@ -575,8 +575,6 @@ nav.ol-panel> :last-child { width: 15px; } - - #unit-visibility-control { align-items: center; } @@ -671,11 +669,3 @@ body[data-hide-naval] #unit-visibility-control-naval { .toggle-input:checked ~ .toggle-fill::after { transform: translateX(var(--height)); } - -[data-active-coalition="blue"] { - background-color: var(--primary-blue) -} - -[data-active-coalition="red"] { - background-color:var(--primary-red) -} \ No newline at end of file diff --git a/client/public/themes/olympus/images/spawn_aircraft.svg b/client/public/themes/olympus/images/spawn_aircraft.svg index e8793e30..beb45a25 100644 --- a/client/public/themes/olympus/images/spawn_aircraft.svg +++ b/client/public/themes/olympus/images/spawn_aircraft.svg @@ -7,14 +7,14 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - inkscape:version="1.0 (4035a4fb49, 2020-05-01)" - sodipodi:docname="spawn_aircraft.svg" - id="svg8" - version="1.1" - fill="none" - viewBox="0 0 32 32" + width="32" height="32" - width="32"> + viewBox="0 0 32 32" + fill="none" + version="1.1" + id="svg8" + sodipodi:docname="spawn_aircraft.svg" + inkscape:version="1.0 (4035a4fb49, 2020-05-01)"> @@ -23,53 +23,54 @@ image/svg+xml - + + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview10" + showgrid="false" + inkscape:zoom="18.782524" + inkscape:cx="26.073424" + inkscape:cy="15.446316" + inkscape:window-x="1912" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg8" /> + id="rect2" + style="fill:none" /> + id="path4" + style="fill:#ffffff;fill-opacity:1;stroke-width:1.07987" /> + width="31" + height="31" + rx="7.5" + stroke="white" + id="rect6" + style="fill:none;stroke:none" /> diff --git a/client/public/themes/olympus/images/spawn_smoke.svg b/client/public/themes/olympus/images/spawn_smoke.svg new file mode 100644 index 00000000..468c0c95 --- /dev/null +++ b/client/public/themes/olympus/images/spawn_smoke.svg @@ -0,0 +1,76 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/client/public/themes/olympus/olympus.css b/client/public/themes/olympus/olympus.css index 42e78949..cc033bc7 100644 --- a/client/public/themes/olympus/olympus.css +++ b/client/public/themes/olympus/olympus.css @@ -167,5 +167,6 @@ --spawn-aircraft-url: url( "/themes/olympus/images/spawn_aircraft.svg" ); --spawn-ground-url: url( "/themes/olympus/images/spawn_ground.svg" ); + --spawn-smoke-url: url( "/themes/olympus/images/spawn_smoke.svg" ); } \ No newline at end of file diff --git a/client/src/@types/unitdatabase.d.ts b/client/src/@types/unitdatabase.d.ts index 1df4b955..e82536a2 100644 --- a/client/src/@types/unitdatabase.d.ts +++ b/client/src/@types/unitdatabase.d.ts @@ -16,4 +16,5 @@ interface UnitBlueprint { label: string; shortLabel: string; loadouts: LoadoutBlueprint[]; + filename: string; } diff --git a/client/src/controls/contextmenu.ts b/client/src/controls/contextmenu.ts index 0786e0e6..d95f7373 100644 --- a/client/src/controls/contextmenu.ts +++ b/client/src/controls/contextmenu.ts @@ -28,13 +28,17 @@ export class ContextMenu { this.#container = document.getElementById(id); this.#container?.querySelector("#context-menu-switch")?.addEventListener('change', (e) => this.#onSwitch(e)); - this.#aircraftRoleDropdown = new Dropdown("role-options", (role: string) => this.#setAircraftRole(role), aircraftDatabase.getRoles()); + this.#aircraftRoleDropdown = new Dropdown("role-options", (role: string) => this.#setAircraftRole(role)); this.#aircraftTypeDropdown = new Dropdown("aircraft-options", (type: string) => this.#setAircraftType(type)); this.#aircraftLoadoutDropdown = new Dropdown("loadout-options", (loadout: string) => this.#setAircraftLoadout(loadout)); //this.#unitsNumberDropdown = new Dropdown("#units-options", this.#setAircraftType, [""]); document.addEventListener("contextMenuShow", (e: any) => { - this.#container?.querySelector("#aircraft-spawn-menu")?.classList.toggle("hide", e.detail.unitType !== "aircraft"); + this.#container?.querySelector("#aircraft-spawn-menu")?.classList.toggle("hide", e.detail.type !== "aircraft"); + this.#container?.querySelector("#unit-spawn-aircraft")?.classList.toggle("is-open", e.detail.type === "aircraft"); + + this.#resetAircraftRole(); + this.#resetAircraftType(); }) document.addEventListener("contextMenuDeployAircraft", () => { @@ -76,36 +80,69 @@ export class ContextMenu { } } + /********* Aircraft spawn menu *********/ #setAircraftRole(role: string) { if (this.#spawnOptions != null) { this.#spawnOptions.role = role; + this.#resetAircraftRole(); this.#aircraftTypeDropdown.setOptions(aircraftDatabase.getLabelsByRole(role)); + this.#aircraftTypeDropdown.selectValue(0); } } - #setAircraftType(type: string) + #resetAircraftRole() { + (this.#container?.querySelector("#deploy-unit-button")).disabled = true; + (this.#container?.querySelector("#loadout-list")).replaceChildren(); + this.#aircraftTypeDropdown.reset(); + this.#aircraftRoleDropdown.setOptions(aircraftDatabase.getRoles()); + } + + #setAircraftType(label: string) { if (this.#spawnOptions != null) { - this.#spawnOptions.type = type; - this.#aircraftLoadoutDropdown.setOptions(aircraftDatabase.getLoadoutNamesByRole(type, this.#spawnOptions.role)); + this.#resetAircraftType(); + var type = aircraftDatabase.getNameByLabel(label); + if (type != null) + { + this.#spawnOptions.type = type; + this.#aircraftLoadoutDropdown.setOptions(aircraftDatabase.getLoadoutNamesByRole(type, this.#spawnOptions.role)); + this.#aircraftLoadoutDropdown.selectValue(0); + var image = (this.#container?.querySelector("#unit-image")); + image.src = `images/units/${aircraftDatabase.getByLabel(label)?.filename}`; + image.classList.toggle("hide", false); + } } } + #resetAircraftType() { + (this.#container?.querySelector("#deploy-unit-button")).disabled = true; + (this.#container?.querySelector("#loadout-list")).replaceChildren(); + this.#aircraftLoadoutDropdown.reset(); + (this.#container?.querySelector("#unit-image")).classList.toggle("hide", true); + } + #setAircraftLoadout(loadoutName: string) { if (this.#spawnOptions != null) { var loadout = aircraftDatabase.getLoadoutsByName(this.#spawnOptions.type, loadoutName); if (loadout) + { this.#spawnOptions.loadout = loadout.code; + (this.#container?.querySelector("#deploy-unit-button")).disabled = false; + var items = loadout.items.map((item: any) => {return `${item.quantity}x ${item.name}`;}); + items.length == 0? items.push("Empty loadout"): ""; + (this.#container?.querySelector("#loadout-list")).replaceChildren( + ...items.map((item: any) => { + var div = document.createElement('div'); + div.innerText = item; + return div; + }) + ) + } } } - - #setUnitsNumber(unitsNumber: string) - { - - } } \ No newline at end of file diff --git a/client/src/controls/dropdown.ts b/client/src/controls/dropdown.ts index 5861c3e5..52716b01 100644 --- a/client/src/controls/dropdown.ts +++ b/client/src/controls/dropdown.ts @@ -3,21 +3,24 @@ export class Dropdown { #options: HTMLElement; #value: HTMLElement; #callback: CallableFunction; + #defaultValue: string; + #optionsList: string[] = []; constructor(ID: string, callback: CallableFunction, options: string[] | null = null) { this.#element = document.getElementById(ID); - var element = this.#element; this.#options = this.#element.querySelector(".ol-select-options"); this.#value = this.#element.querySelector(".ol-select-value"); + this.#defaultValue = this.#value.innerText; this.#callback = callback; if (options != null) this.setOptions(options); } - setOptions(options: string[]) + setOptions(optionsList: string[]) { - this.#options.replaceChildren(...options.map((option: string) => { + this.#optionsList = optionsList; + this.#options.replaceChildren(...optionsList.map((option: string) => { var div = document.createElement("div"); var button = document.createElement("button"); button.textContent = option; @@ -29,4 +32,19 @@ export class Dropdown { return div; })); } + + selectValue(idx: number) + { + if (idx < this.#optionsList.length) + { + var option = this.#optionsList[idx]; + this.#value.innerText = option; + this.#callback(option); + } + } + + reset() { + this.#options.replaceChildren(); + this.#value.innerText = this.#defaultValue; + } } \ No newline at end of file diff --git a/client/src/other/utils.ts b/client/src/other/utils.ts index 45ad1439..7de8d03c 100644 --- a/client/src/other/utils.ts +++ b/client/src/other/utils.ts @@ -54,12 +54,12 @@ export function rad2deg(rad: number) { } -export function reciprocalHeading( heading:number ): number { - - if ( heading > 180 ) { +export function reciprocalHeading(heading: number): number { + + if (heading > 180) { return heading - 180; } - + return heading + 180; } @@ -80,4 +80,46 @@ export const zeroPad = function (num: number, places: number) { string += "0"; } return string; +} + + +export function similarity(s1: string, s2: string) { + var longer = s1; + var shorter = s2; + if (s1.length < s2.length) { + longer = s2; + shorter = s1; + } + var longerLength = longer.length; + if (longerLength == 0) { + return 1.0; + } + return (longerLength - editDistance(longer, shorter)) / longerLength; +} + +export function editDistance(s1: string, s2: string) { + s1 = s1.toLowerCase(); + s2 = s2.toLowerCase(); + + var costs = new Array(); + for (var i = 0; i <= s1.length; i++) { + var lastValue = i; + for (var j = 0; j <= s2.length; j++) { + if (i == 0) + costs[j] = j; + else { + if (j > 0) { + var newValue = costs[j - 1]; + if (s1.charAt(i - 1) != s2.charAt(j - 1)) + newValue = Math.min(Math.min(newValue, lastValue), + costs[j]) + 1; + costs[j - 1] = lastValue; + lastValue = newValue; + } + } + } + if (i > 0) + costs[s2.length] = lastValue; + } + return costs[s2.length]; } \ No newline at end of file diff --git a/client/src/units/aircraftdatabase.ts b/client/src/units/aircraftdatabase.ts index f4e46bcf..0d7b18e9 100644 --- a/client/src/units/aircraftdatabase.ts +++ b/client/src/units/aircraftdatabase.ts @@ -1,1236 +1,1469 @@ +import { similarity } from "../other/utils"; import { UnitDatabase } from "./unitdatabase" export class AircraftDatabase extends UnitDatabase { constructor() { super(); this.units = { + "A-10C": { - name: "A-10C", - label: "A-10CII", - shortLabel: "10", - loadouts: [ + "name": "A-10C", + "label": "A-10CII", + "shortLabel": "10", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "Mk-84", - quantity: 2 + "name": "Mk-84", + "quantity": 2 }, { - name: "ECM", - quantity: 1 + "name": "ECM", + "quantity": 1 }, { - name: "AIM-9M", - quantity: 2 + "name": "AIM-9M", + "quantity": 2 }, { - name: "Mk-82", - quantity: 6 + "name": "Mk-82", + "quantity": 6 } ], - roles: ["cas"], - code: "Mk-82*6,Mk-84*2,AIM-9*2,ECM", - name: "Heavy / Mk-84 / Short Range", + "roles": [ + "CAS" + ], + "code": "Mk-82*6,Mk-84*2,AIM-9*2,ECM", + "name": "Heavy / Mk-84 / Short Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "a-10.png" + }, "F-5E": { - name: "F-5E", - label: "F-5E", - shortLabel: "5", - loadouts: [ + "name": "F-5E", + "label": "F-5E", + "shortLabel": "5", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "Fuel 275", - quantity: 3 + "name": "Fuel 275", + "quantity": 3 }, { - name: "AIM-9P5", - quantity: 2 + "name": "AIM-9P5", + "quantity": 2 } ], - roles: ["cap"], - code: "AIM-9P5*2, Fuel 275*3", - name: "Light / Fox 2 / Long Range" + "roles": [ + "CAP" + ], + "code": "AIM-9P5*2, Fuel 275*3", + "name": "Light / Fox 2 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "f-5.png" + }, "A-50": { - name: "A-50", - label: "A-50", - shortLabel: "50", - loadouts: [ + "name": "A-50", + "label": "A-50", + "shortLabel": "50", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["awacs"], - code: "", - name: "Default AWACS" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "AWACS" + ], + "code": "", + "name": "Default AWACS" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "a-50.png" + }, "An-26B": { - name: "An-26B", - label: "An-26B", - shortLabel: "26", - loadouts: [ + "name": "An-26B", + "label": "An-26B", + "shortLabel": "26", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["transport"], - code: "", - name: "Default Transport" - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "Transport" + ], + "code": "", + "name": "Default Transport" + } + ], + "filename": "an-26.png" + }, "An-30M": { - name: "An-30M", - label: "An-30M", - shortLabel: "30", - loadouts: [ + "name": "An-30M", + "label": "An-30M", + "shortLabel": "30", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["reconnaissance"], - code: "", - name: "Default Reconnaissance" - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "Reconnaissance" + ], + "code": "", + "name": "Default Reconnaissance" + } + ], + "filename": "a-50.png" + }, "B-1B": { - name: "B-1B", - label: "B-1B", - shortLabel: "1", - loadouts: [ + "name": "B-1B", + "label": "B-1B", + "shortLabel": "1", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "Mk-84", - quantity: 24 + "name": "Mk-84", + "quantity": 24 } ], - roles: ["strike"], - code: "Mk-84*24", - name: "Heavy / Mk-84 / Long Range" + "roles": [ + "Strike" + ], + "code": "Mk-84*24", + "name": "Heavy / Mk-84 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "b-1.png" + }, "B-52H": { - name: "B-52H", - label: "B-52H", - shortLabel: "52", - loadouts: [ + "name": "B-52H", + "label": "B-52H", + "shortLabel": "52", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "Mk-84", - quantity: 18 + "name": "Mk-84", + "quantity": 18 } ], - roles: ["strike"], - code: "Mk-84*18", - name: "Heavy / Mk-84 / Long Range" + "roles": [ + "Strike" + ], + "code": "Mk-84*18", + "name": "Heavy / Mk-84 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "b-52.png" + }, "C-130": { - name: "C-130", - label: "C-130", - shortLabel: "130", - loadouts: [ + "name": "C-130", + "label": "C-130", + "shortLabel": "130", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["transport"], - code: "C-130", - name: "Default Transport" - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "Transport" + ], + "code": "C-130", + "name": "Default Transport" + } + ], + "filename": "c-130.png" + }, "C-17A": { - name: "C-17A", - label: "C-17A", - shortLabel: "C17", - loadouts: [ + "name": "C-17A", + "label": "C-17A", + "shortLabel": "C17", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["transport"], - code: "", - name: "Default Transport" - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "Transport" + ], + "code": "", + "name": "Default Transport" + } + ], + "filename": "c-17.png" + }, "E-3A": { - name: "E-3A", - label: "E-3A", - shortLabel: "3", - loadouts: [ + "name": "E-3A", + "label": "E-3A", + "shortLabel": "3", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["awacs"], - code: "", - name: "Default AWACS" - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "AWACS" + ], + "code": "", + "name": "Default AWACS" + } + ], + "filename": "e-3.png" + }, "F-117A": { - name: "F-117A", - label: "F-117A", - shortLabel: "117", - loadouts: [ + "name": "F-117A", + "label": "F-117A", + "shortLabel": "117", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "GBU-10", - quantity: 2 + "name": "GBU-10", + "quantity": 2 } ], - roles: ["strike"], - code: "GBU-10*2", - name: "Heavy / GBU-10 / Long Range" + "roles": [ + "Strike" + ], + "code": "GBU-10*2", + "name": "Heavy / GBU-10 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "f-117.png" + }, "F-14A": { - name: "F-14A", - label: "F-14A", - shortLabel: "14", - loadouts: [ + "name": "F-14A", + "label": "F-14A", + "shortLabel": "14", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "fuel", - quantity: 2 + "name": "fuel", + "quantity": 2 }, { - name: "AIM-24C", - quantity: 4 + "name": "AIM-24C", + "quantity": 4 }, { - name: "AIM-7", - quantity: 4 + "name": "AIM-7", + "quantity": 4 }, { - name: "AIM-9M", - quantity: 2 + "name": "AIM-9M", + "quantity": 2 } ], - roles: ["cap"], - code: "AIM-54C*4,AIM-9*2,AIM-7*2", - name: "Heavy / Fox 3 / Short Range" + "roles": [ + "CAP" + ], + "code": "AIM-54C*4,AIM-9*2,AIM-7*2", + "name": "Heavy / Fox 3 / Short Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "f-14.png" + }, "F-15C": { - name: "F-15C", - label: "F-15C", - shortLabel: "15", - loadouts: [ + "name": "F-15C", + "label": "F-15C", + "shortLabel": "15", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "fuel", - quantity: 3 + "name": "fuel", + "quantity": 3 }, { - name: "AIM-120B", - quantity: 6 + "name": "AIM-120B", + "quantity": 6 }, { - name: "AIM-9M", - quantity: 2 + "name": "AIM-9M", + "quantity": 2 } ], - roles: ["cap"], - code: "AIM-9*2,AIM-120*6,Fuel*3", - name: "Heavy / Fox 3 / Long Range" + "roles": [ + "CAP" + ], + "code": "AIM-9*2,AIM-120*6,Fuel*3", + "name": "Heavy / Fox 3 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "f-15.png" + }, "F-15E": { - name: "F-15E", - label: "F-15E", - shortLabel: "15", - loadouts: [ + "name": "F-15E", + "label": "F-15E", + "shortLabel": "15", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "fuel", - quantity: 2 + "name": "fuel", + "quantity": 2 }, { - name: "AIM-120B", - quantity: 2 + "name": "AIM-120B", + "quantity": 2 }, { - name: "AIM-9M", - quantity: 2 + "name": "AIM-9M", + "quantity": 2 }, { - name: "Mk-84", - quantity: 8 + "name": "Mk-84", + "quantity": 8 } ], - roles: ["cas"], - code: "AIM-120B*2,AIM-9M*2,FUEL*3,Mk-84*8", - name: "Heavy / Fox 3, Mk-84 / Long Range" + "roles": [ + "CAS" + ], + "code": "AIM-120B*2,AIM-9M*2,FUEL*3,Mk-84*8", + "name": "Heavy / Fox 3, Mk-84 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "f-15.png" + }, "F-16C bl.52d": { - name: "F-16C bl.52d", - label: "F-16C bl.52d", - shortLabel: "16", - loadouts: [ + "name": "F-16C bl.52d", + "label": "F-16C bl.52d", + "shortLabel": "16", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "fuel", - quantity: 2 + "name": "fuel", + "quantity": 2 }, { - name: "AIM-120C", - quantity: 4 + "name": "AIM-120C", + "quantity": 4 }, { - name: "AIM-9M", - quantity: 2 + "name": "AIM-9M", + "quantity": 2 }, { - name: "ECM", - quantity: 1 + "name": "ECM", + "quantity": 1 } ], - roles: ["cap"], - code: "AIM-120C*4,AIM-9M*2,ECM,Fuel*2", - name: "Heavy / Fox 3 / Long Range" + "roles": [ + "CAP" + ], + "code": "AIM-120C*4,AIM-9M*2,ECM,Fuel*2", + "name": "Heavy / Fox 3 / Long Range" }, { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "fuel", - quantity: 2 + "name": "fuel", + "quantity": 2 }, { - name: "AIM-120C", - quantity: 2 + "name": "AIM-120C", + "quantity": 2 }, { - name: "ECM", - quantity: 1 + "name": "ECM", + "quantity": 1 }, { - name: "LIGHTNING", - quantity: 1 + "name": "LIGHTNING", + "quantity": 1 }, { - name: "Mk-84", - quantity: 2 + "name": "Mk-84", + "quantity": 2 } ], - roles: ["strike"], - code: "Mk-84*2,AIM-120*2,ECM,Fuel*2,LIGHTNING", - name: "Heavy / Fox 3, Mk-84 / Long Range" + "roles": [ + "Strike" + ], + "code": "Mk-84*2,AIM-120*2,ECM,Fuel*2,LIGHTNING", + "name": "Heavy / Fox 3, Mk-84 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "f-16c.png" + }, "F-4E": { - name: "F-4E", - label: "F-4E", - shortLabel: "4", - loadouts: [ + "name": "F-4E", + "label": "F-4E", + "shortLabel": "4", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "fuel", - quantity: 2 + "name": "fuel", + "quantity": 2 }, { - name: "AIM-7M", - quantity: 4 + "name": "AIM-7M", + "quantity": 4 }, { - name: "AIM-9M", - quantity: 4 - }, - ], - roles: ["cap"], - code: "AIM-9*4,AIM-7*4,Fuel*2", - name: "Heavy / Fox 1 / Long Range" - }, - { - fuel: 1, - items: [ - { - name: "ECM", - quantity: 1 - }, - { - name: "AIM-7", - quantity: 2 - }, - { - name: "Mk-82", - quantity: 18 + "name": "AIM-9M", + "quantity": 4 } ], - roles: ["cas"], - code: "Mk-82*18,AIM-7*2,ECM", - name: "Heavy / Fox 1, Mk-84 / Long Range" + "roles": [ + "CAP" + ], + "code": "AIM-9*4,AIM-7*4,Fuel*2", + "name": "Heavy / Fox 1 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", + "fuel": 1, + "items": [ + { + "name": "ECM", + "quantity": 1 + }, + { + "name": "AIM-7", + "quantity": 2 + }, + { + "name": "Mk-82", + "quantity": 18 + } + ], + "roles": [ + "CAS" + ], + "code": "Mk-82*18,AIM-7*2,ECM", + "name": "Heavy / Fox 1, Mk-84 / Long Range" }, - ] - }, + { + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "f-4.png" + }, "FA-18C_hornet": { - name: "FA-18C_hornet", - label: "F/A-18C", - shortLabel: "18", - loadouts: [ + "name": "FA-18C_hornet", + "label": "F/A-18C", + "shortLabel": "18", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "fuel", - quantity: 3 + "name": "fuel", + "quantity": 3 }, { - name: "AIM-120C", - quantity: 4 + "name": "AIM-120C", + "quantity": 4 }, { - name: "AIM-9M", - quantity: 2 - }, - ], - roles: ["cap"], - code: "AIM-120*4,AIM-9*2,Fuel*3", - name: "Heavy / Fox 3 / Long Range" - }, - { - fuel: 1, - items: [ - { - name: "fuel", - quantity: 3 - }, - { - name: "GBU-10", - quantity: 2 - }, - { - name: "AIM-9M", - quantity: 2 - }, - { - name: "FLIR Pod", - quantity: 1 - }, - { - name: "AIM-7", - quantity: 1 + "name": "AIM-9M", + "quantity": 2 } ], - roles: ["strike"], - code: "GBU-10*2,AIM-9*2,AIM-7,FLIR Pod,Fuel*3", - name: "Heavy / Fox 1, Mk-84 / Long Range" + "roles": [ + "CAP" + ], + "code": "AIM-120*4,AIM-9*2,Fuel*3", + "name": "Heavy / Fox 3 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", + "fuel": 1, + "items": [ + { + "name": "fuel", + "quantity": 3 + }, + { + "name": "GBU-10", + "quantity": 2 + }, + { + "name": "AIM-9M", + "quantity": 2 + }, + { + "name": "FLIR Pod", + "quantity": 1 + }, + { + "name": "AIM-7", + "quantity": 1 + } + ], + "roles": [ + "Strike" + ], + "code": "GBU-10*2,AIM-9*2,AIM-7,FLIR Pod,Fuel*3", + "name": "Heavy / Fox 1, Mk-84 / Long Range" }, - ] - }, + { + "fuel": 1, + "items": [ + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "fa-18c.png" + }, "IL-76MD": { - name: "IL-76MD", - label: "IL-76MD", - shortLabel: "76", - loadouts: [ + "name": "IL-76MD", + "label": "IL-76MD", + "shortLabel": "76", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["transport"], - code: "", - name: "Default Transport" - }, - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "Transport" + ], + "code": "", + "name": "Default Transport" + } + ], + "filename": "il-76.png" + }, "IL-78M": { - name: "IL-78M", - label: "IL-78M", - shortLabel: "78", - loadouts: [ + "name": "IL-78M", + "label": "IL-78M", + "shortLabel": "78", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["tanker"], - code: "", - name: "Default Tanker" - } - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "Tanker" + ], + "code": "", + "name": "Default Tanker" + } + ], + "filename": "il-76.png" + }, "KC-135": { - name: "KC-135", - label: "KC-135", - shortLabel: "135", - loadouts: [ + "name": "KC-135", + "label": "KC-135", + "shortLabel": "135", + "loadouts": [ { - fuel: 1, - items: [], - roles: ["tanker"], - code: "", - name: "Default Tanker" - } - ] - }, + "fuel": 1, + "items": [ + ], + "roles": [ + "Tanker" + ], + "code": "", + "name": "Default Tanker" + } + ], + "filename": "kc-135.png" + }, "MiG-23MLD": { - name: "MiG-23MLD", - label: "MiG-23MLD", - shortLabel: "23", - loadouts: [ + "name": "MiG-23MLD", + "label": "MiG-23MLD", + "shortLabel": "23", + "loadouts": [ { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "Fuel-800", - quantity: 1 + "name": "Fuel-800", + "quantity": 1 }, { - name: "R-60M", - quantity: 4 + "name": "R-60M", + "quantity": 4 }, { - name: "R-24R", - quantity: 2 - }, - ], - roles: ["cap"], - code: "R-24R*2,R-60M*4,Fuel-800", - name: "Heavy / Fox 1 / Long Range" - }, - { - fuel: 1, - items: [ - { - name: "Fuel-800", - quantity: 1 - }, - { - name: "FAB-500", - quantity: 2 - }, - { - name: "R-60M", - quantity: 2 - }, - ], - roles: ["strike"], - code: "FAB-500*2,R-60M*2,Fuel-800", - name: "Heavy / FAB-500 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "MiG-25RBT": { - name: "MiG-25RBT", - label: "MiG-25RBT", - shortLabel: "25", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-60M", - quantity: 2 - }, - ], - roles: ["cap"], - code: "R-60M*2", - name: "Heavy / Fox 2 / Long Range" - }, - { - fuel: 1, - items: [ - { - name: "FAB-500", - quantity: 2 - }, - { - name: "R-60M", - quantity: 2 - }, - ], - roles: ["strike"], - code: "FAB-500x2_60x2", - name: "Heavy / FAB-500 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "MiG-27K": { - name: "MiG-27K", - label: "MiG-27K", - shortLabel: "27", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "B-8", - quantity: 4 - }, - ], - roles: ["cas"], - code: "B-8*4", - name: "Heavy / B-8 / Short Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "MiG-29S": { - name: "MiG-29S", - label: "MiG-29S", - shortLabel: "29", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-73M", - quantity: 2 - }, - { - name: "R-77", - quantity: 4 - }, - { - name: "Fuel-1500", - quantity: 1 - }, - ], - roles: ["cap"], - code: "R-73*2,R-60M*2,R-27R*2", - name: "Heavy / Fox 3 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "MiG-31": { - name: "MiG-31", - label: "MiG-31", - shortLabel: "31", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-33", - quantity: 4 - }, - { - name: "R-40T", - quantity: 2 + "name": "R-24R", + "quantity": 2 } ], - roles: ["cap"], - code: "R-40T*2,R-33*4", - name: "Heavy / Fox 3 / Short Range" + "roles": [ + "CAP" + ], + "code": "R-24R*2,R-60M*4,Fuel-800", + "name": "Heavy / Fox 1 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Mirage 2000-5": { - name: "Mirage 2000-5", - label: "Mirage 2000-5", - shortLabel: "M2", - loadouts: [ - { - fuel: 1, - items: [ + "fuel": 1, + "items": [ { - name: "R 550", - quantity: 2 + "name": "Fuel-800", + "quantity": 1 }, { - name: "SUPER 530F", - quantity: 2 + "name": "FAB-500", + "quantity": 2 }, { - name: "fuel", - quantity: 1 + "name": "R-60M", + "quantity": 2 } ], - roles: ["cap"], - code: "R 550*2,SUPER 530F*2,Fuel", - name: "Heavy / Fox 1 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "MQ-9 Reaper": { - name: "MQ-9 Reaper", - label: "MQ-9 Reaper", - shortLabel: "9", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "AGM-114K", - quantity: 12 - } + "roles": [ + "Strike" ], - roles: ["drone"], - code: "AGM-114K*12", - name: "Default Drone" + "code": "FAB-500*2,R-60M*2,Fuel-800", + "name": "Heavy / FAB-500 / Long Range" }, { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, + "fuel": 1, + "items": [ - "Su-17M4": { - name: "Su-17M4", - label: "Su-17M4", - shortLabel: "17", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-60M", - quantity: 2 - }, - { - name: "B-8", - quantity: 4 - }, - { - name: "fuel", - quantity: 2 - } ], - roles: ["cas"], - code: "B-8*4,R-60M*2,Fuel*2", - name: "Heavy / B-8 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Su-24M": { - name: "Su-24M", - label: "Su-24M", - shortLabel: "24", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-60M", - quantity: 2 - }, - { - name: "FAB-1500", - quantity: 2 - }, + "roles": [ + "" ], - roles: ["strike"], - code: "FAB-1500*2,R-60M*2", - name: "Heavy / FAB-500 / Short Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Su-25": { - name: "Su-25", - label: "Su-25", - shortLabel: "S25", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-60M", - quantity: 2 - }, - { - name: "UB-13", - quantity: 6 - }, - { - name: "fuel", - quantity: 2 - }, - ], - roles: ["cas"], - code: "UB-13*6,R-60M*2,Fuel*2", - name: "Heavy / Rockets / Short Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Su-27": { - name: "Su-27", - label: "Su-27", - shortLabel: "27", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-73", - quantity: 4 - }, - { - name: "R-27ER", - quantity: 6 - } - ], - roles: ["cap"], - code: "R-73*4,R-27ER*6", - name: "Heavy / Fox 3 / Short Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Su-30": { - name: "Su-30", - label: "Su-30", - shortLabel: "30", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-73", - quantity: 2 - }, - { - name: "R-77", - quantity: 4 - }, - { - name: "R-27ER", - quantity: 2 - } - ], - roles: ["cap"], - code: "R-40T*2,R-33*4", - name: "Heavy / Fox 3 / Short Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Su-33": { - name: "Su-33", - label: "Su-33", - shortLabel: "33", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-73", - quantity: 4 - }, - { - name: "R-27ER", - quantity: 6 - }, - { - name: "R-27R", - quantity: 2 - } - ], - roles: ["cap"], - code: "R-73*4,R-27R*2,R-27ER*6", - name: "Heavy / Fox 3 / Short Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Su-34": { - name: "Su-34", - label: "Su-34", - shortLabel: "34", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "R-73", - quantity: 2 - }, - { - name: "FAB-250", - quantity: 4 - }, - { - name: "UB-13", - quantity: 4 - }, - { - name: "ECM", - quantity: 1 - }, - ], - roles: ["cas"], - code: "UB-13*4,FAB-250*4,R-73*2,ECM", - name: "Heavy / Mixed Ground Ordinance / Short Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Tornado IDS": { - name: "Tornado IDS", - label: "Tornado IDS", - shortLabel: "IDS", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "AIM-9M", - quantity: 2 - }, - { - name: "fuel", - quantity: 2 - }, - { - name: "Mk-82", - quantity: 4 - } - ], - roles: ["cas"], - code: "Mk-82*4,AIM-9*2,Fuel*2", - name: "Heavy / Mk-84 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Tu-142": { - name: "Tu-142", - label: "Tu-142", - shortLabel: "142", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "Kh-35", - quantity: 6 - } - ], - roles: ["strike"], - code: "Kh-35*6", - name: "Heavy / Kh-35 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Tu-160": { - name: "Tu-160", - label: "Tu-160", - shortLabel: "160", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "Kh-65", - quantity: 12 - } - ], - roles: ["strike"], - code: "Kh-65*12", - name: "Heavy / Kh-65 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Tu-22M3": { - name: "Tu-22M3", - label: "Tu-22M3", - shortLabel: "T22", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "Kh-22n", - quantity: 2 - }, - ], - roles: ["strike"], - code: "Kh-22N*2", - name: "Heavy / Kh-22n / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout", - }, - ] - }, - - "Tu-95MS": { - name: "Tu-95MS", - label: "Tu-95MS", - shortLabel: "95", - loadouts: [ - { - fuel: 1, - items: [ - { - name: "Kh-65", - quantity: 6 - }, - ], - roles: ["strike"], - code: "Kh-65*6", - name: "Heavy / Kh-65 / Long Range" - }, - { - fuel: 1, - items: [], - roles: [""], - code: "", - name: "Empty Loadout" + "code": "", + "name": "Empty Loadout" } - ] + ], + "filename": "mig-23.png" }, + "MiG-25RBT": { + "name": "MiG-25RBT", + "label": "MiG-25RBT", + "shortLabel": "25", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-60M", + "quantity": 2 + } + ], + "roles": [ + "CAP" + ], + "code": "R-60M*2", + "name": "Heavy / Fox 2 / Long Range" + }, + { + "fuel": 1, + "items": [ + { + "name": "FAB-500", + "quantity": 2 + }, + { + "name": "R-60M", + "quantity": 2 + } + ], + "roles": [ + "Strike" + ], + "code": "FAB-500x2_60x2", + "name": "Heavy / FAB-500 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "mig-25.png" + }, + "MiG-27K": { + "name": "MiG-27K", + "label": "MiG-27K", + "shortLabel": "27", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "B-8", + "quantity": 4 + } + ], + "roles": [ + "CAS" + ], + "code": "B-8*4", + "name": "Heavy / B-8 / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "mig-29.png" + }, + "MiG-29S": { + "name": "MiG-29S", + "label": "MiG-29S", + "shortLabel": "29", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-73M", + "quantity": 2 + }, + { + "name": "R-77", + "quantity": 4 + }, + { + "name": "Fuel-1500", + "quantity": 1 + } + ], + "roles": [ + "CAP" + ], + "code": "R-73*2,R-60M*2,R-27R*2", + "name": "Heavy / Fox 3 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "mig-29.png" + }, + "MiG-31": { + "name": "MiG-31", + "label": "MiG-31", + "shortLabel": "31", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-33", + "quantity": 4 + }, + { + "name": "R-40T", + "quantity": 2 + } + ], + "roles": [ + "CAP" + ], + "code": "R-40T*2,R-33*4", + "name": "Heavy / Fox 3 / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "mig-23.png" + }, + "Mirage 2000-5": { + "name": "Mirage 2000-5", + "label": "Mirage 2000-5", + "shortLabel": "M2", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R 550", + "quantity": 2 + }, + { + "name": "SUPER 530F", + "quantity": 2 + }, + { + "name": "fuel", + "quantity": 1 + } + ], + "roles": [ + "CAP" + ], + "code": "R 550*2,SUPER 530F*2,Fuel", + "name": "Heavy / Fox 1 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "m2000.png" + }, + "MQ-9 Reaper": { + "name": "MQ-9 Reaper", + "label": "MQ-9 Reaper", + "shortLabel": "9", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "AGM-114K", + "quantity": 12 + } + ], + "roles": [ + "Drone" + ], + "code": "AGM-114K*12", + "name": "Default Drone" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "mig-29.png" + }, + "Su-17M4": { + "name": "Su-17M4", + "label": "Su-17M4", + "shortLabel": "17", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-60M", + "quantity": 2 + }, + { + "name": "B-8", + "quantity": 4 + }, + { + "name": "fuel", + "quantity": 2 + } + ], + "roles": [ + "CAS" + ], + "code": "B-8*4,R-60M*2,Fuel*2", + "name": "Heavy / B-8 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "su-17.png" + }, + "Su-24M": { + "name": "Su-24M", + "label": "Su-24M", + "shortLabel": "24", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-60M", + "quantity": 2 + }, + { + "name": "FAB-1500", + "quantity": 2 + } + ], + "roles": [ + "Strike" + ], + "code": "FAB-1500*2,R-60M*2", + "name": "Heavy / FAB-500 / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "su-24.png" + }, + "Su-25": { + "name": "Su-25", + "label": "Su-25", + "shortLabel": "S25", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-60M", + "quantity": 2 + }, + { + "name": "UB-13", + "quantity": 6 + }, + { + "name": "fuel", + "quantity": 2 + } + ], + "roles": [ + "CAS" + ], + "code": "UB-13*6,R-60M*2,Fuel*2", + "name": "Heavy / Rockets / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "su-25.png" + }, + "Su-27": { + "name": "Su-27", + "label": "Su-27", + "shortLabel": "27", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-73", + "quantity": 4 + }, + { + "name": "R-27ER", + "quantity": 6 + } + ], + "roles": [ + "CAP" + ], + "code": "R-73*4,R-27ER*6", + "name": "Heavy / Fox 3 / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "su-27.png" + }, + "Su-30": { + "name": "Su-30", + "label": "Su-30", + "shortLabel": "30", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-73", + "quantity": 2 + }, + { + "name": "R-77", + "quantity": 4 + }, + { + "name": "R-27ER", + "quantity": 2 + } + ], + "roles": [ + "CAP" + ], + "code": "R-40T*2,R-33*4", + "name": "Heavy / Fox 3 / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "su-34.png" + }, + "Su-33": { + "name": "Su-33", + "label": "Su-33", + "shortLabel": "33", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-73", + "quantity": 4 + }, + { + "name": "R-27ER", + "quantity": 6 + }, + { + "name": "R-27R", + "quantity": 2 + } + ], + "roles": [ + "CAP" + ], + "code": "R-73*4,R-27R*2,R-27ER*6", + "name": "Heavy / Fox 3 / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "su-34.png" + }, + "Su-34": { + "name": "Su-34", + "label": "Su-34", + "shortLabel": "34", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "R-73", + "quantity": 2 + }, + { + "name": "FAB-250", + "quantity": 4 + }, + { + "name": "UB-13", + "quantity": 4 + }, + { + "name": "ECM", + "quantity": 1 + } + ], + "roles": [ + "CAS" + ], + "code": "UB-13*4,FAB-250*4,R-73*2,ECM", + "name": "Heavy / Mixed Ground Ordinance / Short Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "su-34.png" + }, + "Tornado IDS": { + "name": "Tornado IDS", + "label": "Tornado IDS", + "shortLabel": "IDS", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "AIM-9M", + "quantity": 2 + }, + { + "name": "fuel", + "quantity": 2 + }, + { + "name": "Mk-82", + "quantity": 4 + } + ], + "roles": [ + "CAS" + ], + "code": "Mk-82*4,AIM-9*2,Fuel*2", + "name": "Heavy / Mk-84 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "tornado.png" + }, + "Tu-142": { + "name": "Tu-142", + "label": "Tu-142", + "shortLabel": "142", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "Kh-35", + "quantity": 6 + } + ], + "roles": [ + "Strike" + ], + "code": "Kh-35*6", + "name": "Heavy / Kh-35 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "tu-22.png" + }, + "Tu-160": { + "name": "Tu-160", + "label": "Tu-160", + "shortLabel": "160", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "Kh-65", + "quantity": 12 + } + ], + "roles": [ + "Strike" + ], + "code": "Kh-65*12", + "name": "Heavy / Kh-65 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "tu-160.png" + }, + "Tu-22M3": { + "name": "Tu-22M3", + "label": "Tu-22M3", + "shortLabel": "T22", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "Kh-22n", + "quantity": 2 + } + ], + "roles": [ + "Strike" + ], + "code": "Kh-22N*2", + "name": "Heavy / Kh-22n / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "tu-22.png" + }, + "Tu-95MS": { + "name": "Tu-95MS", + "label": "Tu-95MS", + "shortLabel": "95", + "loadouts": [ + { + "fuel": 1, + "items": [ + { + "name": "Kh-65", + "quantity": 6 + } + ], + "roles": [ + "Strike" + ], + "code": "Kh-65*6", + "name": "Heavy / Kh-65 / Long Range" + }, + { + "fuel": 1, + "items": [ + + ], + "roles": [ + "" + ], + "code": "", + "name": "Empty Loadout" + } + ], + "filename": "tu-95.png" + } } } } diff --git a/client/src/units/unitdatabase.ts b/client/src/units/unitdatabase.ts index 97d23035..75c7d563 100644 --- a/client/src/units/unitdatabase.ts +++ b/client/src/units/unitdatabase.ts @@ -6,6 +6,16 @@ export class UnitDatabase { } + getByLabel(label: string) + { + for (let unit in this.units) + { + if (this.units[unit].label === label) + return this.units[unit]; + } + return null; + } + getRoles() { var roles: string[] = []; @@ -15,7 +25,6 @@ export class UnitDatabase { { for (let role of loadout.roles) { - role = role.toUpperCase(); if (role !== "" && !roles.includes(role)) roles.push(role); } @@ -46,7 +55,7 @@ export class UnitDatabase { var loadouts = []; for (let loadout of this.units[unit].loadouts) { - if (loadout.roles.includes(role) || loadout.roles.includes(role.toLowerCase()) || loadout.roles.includes("")) + if (loadout.roles.includes(role) || loadout.roles.includes("")) { loadouts.push(loadout.name) } diff --git a/client/views/contextmenu.ejs b/client/views/contextmenu.ejs index 1482020f..f2d0cd5d 100644 --- a/client/views/contextmenu.ejs +++ b/client/views/contextmenu.ejs @@ -1,16 +1,16 @@ -
+
+
- -
- - -
+ + +
@@ -39,6 +39,11 @@
- +
+ +
+
+
+
\ No newline at end of file diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json new file mode 100644 index 00000000..e8ff2462 --- /dev/null +++ b/src/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "files.associations": { + "*.ejs": "html", + "xstring": "cpp", + "vector": "cpp", + "list": "cpp" + } +} \ No newline at end of file