Added unit country selection

This commit is contained in:
Pax1601 2023-08-27 15:59:50 +02:00
parent eb80c39b98
commit 9d7e61556d
20 changed files with 858 additions and 28826 deletions

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="640"
height="480"
id="svg10"
sodipodi:docname="blue.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="0.88166667"
inkscape:cx="497.3535"
inkscape:cy="301.13421"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg10"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata16">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs14" />
<path
fill="#bc0000"
fill-opacity="1"
d="M 0,0 H 640 V 480 H 0 Z"
id="path2"
style="fill:#0000cd;fill-opacity:1;stroke-width:0.999996" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,81 +1,93 @@
{
"AGGRESSORS": "RED",
"INSURGENTS": "INS",
"ALGERIA": "DZ",
"ARGENTINA": "AR",
"AUSTRALIA": "AU",
"AUSTRIA": "AT",
"BAHRAIN": "BH",
"BELARUS": "BY",
"BELGIUM": "BE",
"BOLIVIA": "BO",
"BRAZIL": "BR",
"BULGARIA": "BG",
"CANADA": "CA",
"CHILE": "CL",
"CHINA": "CN",
"CROATIA": "HR",
"CUBA": "CU",
"CYPRUS": "CY",
"CHEZH_REPUBLIC": "CZ",
"DENMARK": "DK",
"EGYPT": "EG",
"ETHIOPIA": "ET",
"FINLAND": "FI",
"FRANCE": "FR",
"GEORGIA": "GE",
"GERMANY": "DE",
"GHANA": "GH",
"Gibraltar": "GI",
"GREECE": "GR",
"HONDURAS": "HN",
"HUNGARY": "HU",
"INDIA": "IN",
"INDONESIA": "ID",
"IRAN": "IR",
"IRAQ": "IQ",
"ISRAEL": "IL",
"ITALY": "IT",
"JAPAN": "JP",
"JORDAN": "JO",
"KAZAKHSTAN": "KZ",
"SOUTH_KOREA": "KR",
"KUWAIT": "KW",
"LEBANON": "LB",
"LIBYIA": "LY",
"MALAYSIA": "MY",
"MEXICO": "MX",
"MOROCCO": "MA",
"THE_NETHERLANDS": "NL",
"NIGERIA": "NG",
"NORWAY": "NO",
"OMAN": "OM",
"PAKISTAN": "PK",
"PERU": "PE",
"PHILIPPINES": "PH",
"POLAND": "PL",
"PORTUGAL": "PT",
"QATAR": "QA",
"ROMANIA": "RO",
"RUSSIA": "RU",
"SAUDI ARABIA": "SA",
"SERBIA": "RS",
"SLOVAKIA": "SK",
"SLOVENIA": "SI",
"SOUTH AFRICA": "ZA",
"SPAIN": "ES",
"SUDAN": "SD",
"SWEDEN": "SE",
"SWITZERLAND": "CH",
"SYRIA": "SY",
"THAILAND": "TH",
"TUNISIA": "TN",
"TURKEY": "TR",
"UKRAINE": "UA",
"UNITED ARAB EMIRATES": "AE",
"UK": "GB",
"USA": "US",
"VENEZUELA": "VE",
"VIETNAM": "VN",
"YEMEN": "YE"
"AGGRESSORS": { "flagCode": "RED", "liveryCodes": []},
"INSURGENTS": { "flagCode": "UNK", "liveryCodes": []},
"ALGERIA": { "flagCode": "DZ", "liveryCodes": []},
"ARGENTINA": { "flagCode": "AR", "liveryCodes": []},
"AUSTRALIA": { "flagCode": "AU", "liveryCodes": []},
"AUSTRIA": { "flagCode": "AT", "liveryCodes": []},
"BAHRAIN": { "flagCode": "BH", "liveryCodes": []},
"BELARUS": { "flagCode": "BY", "liveryCodes": []},
"BELGIUM": { "flagCode": "BE", "liveryCodes": []},
"BOLIVIA": { "flagCode": "BO", "liveryCodes": []},
"BRAZIL": { "flagCode": "BR", "liveryCodes": []},
"BULGARIA": { "flagCode": "BG", "liveryCodes": []},
"CANADA": { "flagCode": "CA", "liveryCodes": []},
"CHILE": { "flagCode": "CL", "liveryCodes": []},
"CHINA": { "flagCode": "CN", "liveryCodes": []},
"CROATIA": { "flagCode": "HR", "liveryCodes": []},
"CUBA": { "flagCode": "CU", "liveryCodes": []},
"CYPRUS": { "flagCode": "CY", "liveryCodes": []},
"CHEZH_REPUBLIC": { "displayName": "Czech Republic", "flagCode": "CZ", "liveryCodes": []},
"DENMARK": { "flagCode": "DK", "liveryCodes": []},
"EGYPT": { "flagCode": "EG", "liveryCodes": []},
"ETHIOPIA": { "flagCode": "ET", "liveryCodes": []},
"FINLAND": { "flagCode": "FI", "liveryCodes": []},
"FRANCE": { "flagCode": "FR", "liveryCodes": []},
"GEORGIA": { "flagCode": "GE", "liveryCodes": []},
"GERMANY": { "flagCode": "DE", "liveryCodes": []},
"GHANA": { "flagCode": "GH", "liveryCodes": []},
"GREECE": { "flagCode": "GR", "liveryCodes": []},
"HONDURAS": { "flagCode": "HN", "liveryCodes": []},
"HUNGARY": { "flagCode": "HU", "liveryCodes": []},
"INDIA": { "flagCode": "IN", "liveryCodes": []},
"INDONESIA": { "flagCode": "ID", "liveryCodes": []},
"IRAN": { "flagCode": "IR", "liveryCodes": []},
"IRAQ": { "flagCode": "IQ", "liveryCodes": []},
"ISRAEL": { "flagCode": "IL", "liveryCodes": []},
"ITALY": { "flagCode": "IT", "liveryCodes": []},
"JAPAN": { "flagCode": "JP", "liveryCodes": []},
"JORDAN": { "flagCode": "JO", "liveryCodes": []},
"KAZAKHSTAN": { "flagCode": "KZ", "liveryCodes": []},
"SOUTH_KOREA": { "displayName": "South Korea","flagCode": "KR", "liveryCodes": []},
"KUWAIT": { "flagCode": "KW", "liveryCodes": []},
"LEBANON": { "flagCode": "LB", "liveryCodes": []},
"LIBYIA": { "flagCode": "LY", "liveryCodes": []},
"MALAYSIA": { "flagCode": "MY", "liveryCodes": []},
"MEXICO": { "flagCode": "MX", "liveryCodes": []},
"MOROCCO": { "flagCode": "MA", "liveryCodes": []},
"THE_NETHERLANDS": { "displayName": "The Netherlands", "flagCode": "NL", "liveryCodes": []},
"NIGERIA": { "flagCode": "NG", "liveryCodes": []},
"NORWAY": { "flagCode": "NO", "liveryCodes": []},
"OMAN": { "flagCode": "OM", "liveryCodes": []},
"PAKISTAN": { "flagCode": "PK", "liveryCodes": []},
"PERU": { "flagCode": "PE", "liveryCodes": []},
"PHILIPPINES": { "flagCode": "PH", "liveryCodes": []},
"POLAND": { "flagCode": "PL", "liveryCodes": []},
"PORTUGAL": { "flagCode": "PT", "liveryCodes": []},
"QATAR": { "flagCode": "QA", "liveryCodes": []},
"ROMANIA": { "flagCode": "RO", "liveryCodes": []},
"RUSSIA": { "flagCode": "RU", "liveryCodes": []},
"SAUDI_ARABIA": { "displayName": "Saudi Arabia","flagCode": "SA", "liveryCodes": []},
"SERBIA": { "flagCode": "RS", "liveryCodes": []},
"SLOVAKIA": { "flagCode": "SK", "liveryCodes": []},
"SLOVENIA": { "flagCode": "SI", "liveryCodes": []},
"SOUTH_AFRICA": { "displayName": "South Africa", "flagCode": "ZA", "liveryCodes": []},
"SPAIN": { "flagCode": "ES", "liveryCodes": []},
"SUDAN": { "flagCode": "SD", "liveryCodes": []},
"SWEDEN": { "flagCode": "SE", "liveryCodes": []},
"SWITZERLAND": { "flagCode": "CH", "liveryCodes": []},
"SYRIA": { "flagCode": "SY", "liveryCodes": []},
"THAILAND": { "flagCode": "TH", "liveryCodes": []},
"TUNISIA": { "flagCode": "TN", "liveryCodes": []},
"TURKEY": { "flagCode": "TR", "liveryCodes": []},
"UKRAINE": { "flagCode": "UA", "liveryCodes": []},
"UNITED_ARAB_EMIRATES": { "displayName": "United Arab Emirates", "flagCode": "AE", "liveryCodes": []},
"UK": { "displayName": "United Kingdom", "flagCode": "GB", "liveryCodes": []},
"USA": { "displayName": "United States of America", "flagCode": "US", "liveryCodes": []},
"VENEZUELA": { "flagCode": "VE", "liveryCodes": []},
"VIETNAM": { "flagCode": "VN", "liveryCodes": []},
"YEMEN": { "flagCode": "YE", "liveryCodes": []},
"CJTF_BLUE" : { "displayName": "Combined Joint Task Force Blue", "flagCode": "BLUE", "liveryCodes": []},
"SOUTH_OSETIA" : { "displayName": "South Ossetia", "flagCode": "UNK", "liveryCodes": []},
"NORTH_KOREA" : { "displayName": "Democratic People's Republic of Korea", "flagCode": "KP", "liveryCodes": []},
"CJTF_RED" : {"displayName": "Combined Joint Task Force Red", "flagCode": "RED", "liveryCodes": []},
"ABKHAZIA" : { "flagCode": "UNK", "liveryCodes": []},
"ITALIAN_SOCIAL_REPUBLIC" : { "displayName": "Italian Social Republic", "flagCode": "SOCIAL", "liveryCodes": []},
"USSR" : { "displayName": "USSR", "flagCode": "USSR", "liveryCodes": []},
"ECUADOR" : { "flagCode": "EC", "liveryCodes": []},
"LIBYA" : { "flagCode": "LY", "liveryCodes": []},
"UN_PEACEKEEPERS": { "displayName": "United Nations", "flagCode": "UNK", "liveryCodes": []},
"GDR": { "flagCode": "UNK", "liveryCodes": []},
"YUGOSLAVIA": { "flagCode": "YUG", "liveryCodes": []},
"THIRDREICH": { "displayName": "Third Reich", "flagCode": "THIRD", "liveryCodes": []}
}

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="640"
height="480"
id="svg10"
sodipodi:docname="red.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="0.88166667"
inkscape:cx="497.3535"
inkscape:cy="301.13421"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg10"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata16">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs14" />
<path
fill="#bc0000"
fill-opacity="1"
d="M 0,0 H 640 V 480 H 0 Z"
id="path2"
style="fill:#cc0000;fill-opacity:1;stroke-width:0.999996" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.0"
width="640"
height="480"
viewBox="0 0 640 480"
id="svg8"
sodipodi:docname="third.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
width="640px"
inkscape:zoom="1.058"
inkscape:cx="284.97164"
inkscape:cy="274.57467"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<rect
width="640"
height="480"
fill="#dd0000"
id="rect2"
x="0"
y="0"
style="stroke-width:0.999997" />
<circle
cx="320"
cy="240"
r="180"
fill="#ffffff"
id="circle4"
style="stroke-width:1" />
<path
d="M 472.73507,256.97056 387.88225,172.11774 252.11775,307.88225 167.26494,223.02943 M 336.97057,87.264932 252.11775,172.11774 387.88225,307.88225 303.02944,392.73506"
fill="none"
stroke="#000000"
stroke-width="48"
id="path6" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="640"
height="480"
id="svg10"
sodipodi:docname="unk.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="0.88166667"
inkscape:cx="497.3535"
inkscape:cy="300"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg10"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata16">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs14" />
<path
fill="#bc0000"
fill-opacity="1"
d="M 0,0 H 640 V 480 H 0 Z"
id="path2"
style="fill:#ffffff;fill-opacity:1;stroke-width:0.999996" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:549.6px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1"
x="179.23065"
y="424.19662"
id="text2551"><tspan
sodipodi:role="line"
id="tspan2549"
x="179.23065"
y="424.19662"
style="stroke-width:1">?</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="640"
height="480"
id="svg10"
sodipodi:docname="ussr.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.88166667"
inkscape:cx="497.3535"
inkscape:cy="300"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg10" />
<metadata
id="metadata16">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs14" />
<path
fill="#bc0000"
fill-opacity="1"
d="M 0,0 H 639.99998 V 480 H 0 Z"
id="path2"
style="fill:#cc0000;fill-opacity:1;stroke-width:0.999997" />
<path
id="path11728"
d="m 160.0004,30 -6.73546,20.729509 H 131.4688 L 149.10222,63.540898 142.36675,84.2704 160.0004,71.458772 177.63406,84.2704 170.89859,63.540898 188.532,50.729509 h -21.79613 z m 0,10.79999 4.31062,13.266778 h 13.94975 l -11.2856,8.199597 4.31061,13.266777 -11.28538,-8.199363 -11.28538,8.199363 4.31062,-13.266777 -11.28561,-8.199597 h 13.94975 z"
style="fill:#ffd700;fill-opacity:1;stroke:none;stroke-width:0.15px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<g
style="fill:#ffd700;fill-opacity:1;stroke-width:1.25"
id="g2900"
transform="matrix(0.79145503,0,0,0.78939049,3.0638126,3.0127518)">
<path
id="rect4165-6"
d="m 137.43744,171.69421 18.86296,18.9937 17.78834,-17.66589 c 27.05847,29.021 55.43807,56.99501 82.28704,86.12782 4.03444,4.06233 10.59815,4.085 14.66056,0.0506 4.06232,-4.03445 4.08499,-10.59815 0.0506,-14.66056 -28.81871,-27.1901 -57.72545,-54.60143 -86.55328,-81.89095 l 23.96499,-23.80003 -33.34026,-4.61605 z"
style="fill:#ffd700;fill-opacity:1;stroke:none;stroke-width:0.611489;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
id="path4179-3"
d="m 198.2887,110.1955 c 15.51743,8.7394 27.29872,21.28122 34.2484,34.3924 7.04394,13.28902 10.13959,27.16218 10.20325,38.25433 0.13054,22.74374 -18.43771,41.18184 -41.18183,41.18184 -12.13597,0 -23.04607,-5.24868 -30.58302,-13.60085 l -4.16863,3.51033 c -0.70999,-0.27231 -1.46387,-0.41221 -2.22429,-0.41276 -1.82948,1.9e-4 -3.56621,0.80531 -4.74859,2.20136 -2.97368,0.38896 -5.46251,2.44529 -6.40534,5.29224 -3.13486,6.28843 -8.63524,11.21997 -15.29104,13.4776 -0.0637,0.0216 -0.11992,0.05 -0.1758,0.0783 -3.07749,1.12758 -6.16259,3.1643 -8.78919,5.80245 -5.19155,5.23656 -7.72858,11.93658 -6.30024,16.63822 -0.14098,0.40857 -0.21361,0.83759 -0.21498,1.26979 1.5e-4,2.17082 1.75991,3.93058 3.93073,3.93073 0.54341,-0.002 1.08053,-0.11639 1.57745,-0.33632 4.69369,1.05881 11.06885,-1.54582 16.05444,-6.55917 2.82624,-2.85072 4.94356,-6.22349 5.98303,-9.53062 2.31696,-6.62278 7.29699,-12.01856 13.62281,-15.05312 0.15105,-0.0725 0.27303,-0.14714 0.38218,-0.22358 2.12082,-1.01408 3.67251,-2.92895 4.225,-5.2139 9.70222,11.44481 24.25255,18.75299 40.51876,19.13577 29.83352,0.70205 52.13299,-21.25802 53.16414,-52.83642 0.51894,-15.89259 -5.62993,-36.3847 -19.6412,-53.19089 -10.70835,-12.84441 -26.40987,-23.50795 -44.18699,-28.20777 z"
style="fill:#ffd700;fill-opacity:1;stroke:none;stroke-width:0.625044;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 640 480"
version="1.1"
id="svg8"
sodipodi:docname="yug.svg"
width="640"
height="480"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.91840278"
inkscape:cx="253.1569"
inkscape:cy="286.91115"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<path
fill="#dd0000"
d="M 0,320 H 640 V 480 H 0"
id="path2"
style="stroke-width:0.999996" />
<path
fill="#ffffff"
d="M 0,160 H 640 V 320 H 0"
id="path4"
style="stroke-width:0.999996" />
<path
fill="#003893"
d="M 0,0 H 640 V 160 H 0"
id="path6"
style="stroke-width:0.999996" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -319,7 +319,7 @@
width: 16px;
}
.ol-select>.ol-select-options>div button.nation-dropdown-element {
.ol-select>.ol-select-options>div button.country-dropdown-element {
display: flex;
flex-direction: row;
align-content: center;
@ -327,7 +327,7 @@
width: 100%;
}
.nation-dropdown-element img {
.country-dropdown-element img {
height: 20px;
aspect-ratio: initial;
}

View File

@ -40,7 +40,7 @@ export class MapContextMenu extends ContextMenu {
#navyUnitLabelDropdown: Dropdown;
#navyUnitCountDropdown: Dropdown;
#spawnOptions = { role: "", name: "", latlng: new LatLng(0, 0), coalition: "blue", loadout: "", airbaseName: "", liveryID: "", altitude: 0, count: 1, nation: "" };
#spawnOptions = { role: "", name: "", latlng: new LatLng(0, 0), coalition: "blue", loadout: "", airbaseName: "", liveryID: "", altitude: 0, count: 1, country: "" };
#coalitionArea: CoalitionArea | null = null;
#nationCodes: any;
@ -51,8 +51,11 @@ export class MapContextMenu extends ContextMenu {
this.#coalitionSwitch.setValue(false);
this.#coalitionSwitch.getContainer()?.addEventListener("contextmenu", (e) => this.#onSwitchRightClick(e));
var count = [];
for (let i = 1; i < 10; i++) count.push(String(i));
/* Aircraft menu */
this.#aircraftNationDropdown = new Dropdown("aircraft-nation-options", (nation: string) => this.#setAircraftNation(nation));
this.#aircraftNationDropdown = new Dropdown("aircraft-country-options", (country: string) => this.#setAircraftNation(country));
this.#aircraftRoleDropdown = new Dropdown("aircraft-role-options", (role: string) => this.#setAircraftRole(role));
this.#aircraftLabelDropdown = new Dropdown("aircraft-label-options", (type: string) => this.#setAircraftLabel(type));
this.#aircraftCountDropdown = new Dropdown("aircraft-count-options", (count: string) => this.#setAircraftCount(count));
@ -66,7 +69,7 @@ export class MapContextMenu extends ContextMenu {
this.#aircraftSpawnAltitudeSlider.setActive(true);
/* Helicopter menu */
this.#helicopterNationDropdown = new Dropdown("helicopter-nation-options", (nation: string) => this.#setHelicopterNation(nation));
this.#helicopterNationDropdown = new Dropdown("helicopter-country-options", (country: string) => this.#setHelicopterNation(country));
this.#helicopterRoleDropdown = new Dropdown("helicopter-role-options", (role: string) => this.#setHelicopterRole(role));
this.#helicopterLabelDropdown = new Dropdown("helicopter-label-options", (type: string) => this.#setHelicopterLabel(type));
this.#helicopterCountDropdown = new Dropdown("helicopter-count-options", (count: string) => this.#setHelicopterCount(count));
@ -79,9 +82,6 @@ export class MapContextMenu extends ContextMenu {
this.#helicopterSpawnAltitudeSlider.setValue(5000);
this.#helicopterSpawnAltitudeSlider.setActive(true);
var count = [];
for (let i = 1; i < 10; i++) count.push(String(i));
/* Ground unit menu */
this.#groundUnitTypeDropdown = new Dropdown("groundunit-type-options", (type: string) => this.#setGroundUnitType(type));
this.#groundUnitLabelDropdown = new Dropdown("groundunit-label-options", (name: string) => this.#setGroundUnitLabel(name));
@ -111,14 +111,13 @@ export class MapContextMenu extends ContextMenu {
location: this.#spawnOptions.latlng,
altitude: this.#spawnOptions.altitude,
loadout: this.#spawnOptions.loadout,
liveryID: this.#spawnOptions.liveryID,
nation: this.#spawnOptions.nation
liveryID: this.#spawnOptions.liveryID
};
var units = [];
for (let i = 1; i < parseInt(this.#aircraftCountDropdown.getValue()) + 1; i++) {
units.push(unitTable);
}
if (getUnitsManager().spawnUnits("Aircraft", units, getActiveCoalition(), false, this.#spawnOptions.airbaseName)) {
if (getUnitsManager().spawnUnits("Aircraft", units, getActiveCoalition(), false, this.#spawnOptions.airbaseName, this.#spawnOptions.country)) {
getMap().addTemporaryMarker(this.#spawnOptions.latlng, this.#spawnOptions.name, getActiveCoalition());
this.hide();
}
@ -133,14 +132,13 @@ export class MapContextMenu extends ContextMenu {
location: this.#spawnOptions.latlng,
altitude: this.#spawnOptions.altitude,
loadout: this.#spawnOptions.loadout,
liveryID: this.#spawnOptions.liveryID,
nation: this.#spawnOptions.nation
liveryID: this.#spawnOptions.liveryID
};
var units = [];
for (let i = 1; i < parseInt(this.#helicopterCountDropdown.getValue()) + 1; i++) {
units.push(unitTable);
}
if (getUnitsManager().spawnUnits("Helicopter", units, getActiveCoalition(), false, this.#spawnOptions.airbaseName)) {
if (getUnitsManager().spawnUnits("Helicopter", units, getActiveCoalition(), false, this.#spawnOptions.airbaseName, this.#spawnOptions.country)) {
getMap().addTemporaryMarker(this.#spawnOptions.latlng, this.#spawnOptions.name, getActiveCoalition());
this.hide();
}
@ -150,7 +148,11 @@ export class MapContextMenu extends ContextMenu {
document.addEventListener("contextMenuDeployGroundUnits", () => {
this.#spawnOptions.coalition = getActiveCoalition();
if (this.#spawnOptions) {
var unitTable = {unitType: this.#spawnOptions.name, location: this.#spawnOptions.latlng, liveryID: this.#spawnOptions.liveryID};
var unitTable = {
unitType: this.#spawnOptions.name,
location: this.#spawnOptions.latlng,
liveryID: this.#spawnOptions.liveryID
};
var units = [];
for (let i = 1; i < parseInt(this.#groundUnitCountDropdown.getValue()) + 1; i++) {
units.push(JSON.parse(JSON.stringify(unitTable)));
@ -166,7 +168,11 @@ export class MapContextMenu extends ContextMenu {
document.addEventListener("contextMenuDeployNavyUnits", () => {
this.#spawnOptions.coalition = getActiveCoalition();
if (this.#spawnOptions) {
var unitTable = {unitType: this.#spawnOptions.name, location: this.#spawnOptions.latlng, liveryID: this.#spawnOptions.liveryID};
var unitTable = {
unitType: this.#spawnOptions.name,
location: this.#spawnOptions.latlng,
liveryID: this.#spawnOptions.liveryID
};
var units = [];
for (let i = 1; i < parseInt(this.#navyUnitCountDropdown.getValue()) + 1; i++) {
units.push(JSON.parse(JSON.stringify(unitTable)));
@ -209,7 +215,7 @@ export class MapContextMenu extends ContextMenu {
this.clip();
});
/* Load the nation codes from the public folder */
/* Load the country codes from the public folder */
var xhr = new XMLHttpRequest();
xhr.open('GET', 'images/nations/codes.json', true);
xhr.responseType = 'json';
@ -218,7 +224,7 @@ export class MapContextMenu extends ContextMenu {
if (status === 200) {
this.#nationCodes = xhr.response;
} else {
console.error(`Error retrieving nation codes`)
console.error(`Error retrieving country codes`)
}
};
xhr.send();
@ -365,8 +371,8 @@ export class MapContextMenu extends ContextMenu {
#setNations() {
var coalitions = getMissionHandler().getCoalitions();
var nations = coalitions[getActiveCoalition() as keyof typeof coalitions];
this.#aircraftNationDropdown.setOptionsElements(this.#createNationButtons(this.#aircraftNationDropdown, nations, (nation: string) => {this.#spawnOptions.nation = nation;}));
this.#helicopterNationDropdown.setOptionsElements(this.#createNationButtons(this.#helicopterNationDropdown, nations, (nation: string) => {this.#spawnOptions.nation = nation;}));
this.#aircraftNationDropdown.setOptionsElements(this.#createNationButtons(this.#aircraftNationDropdown, nations, (country: string) => {this.#spawnOptions.country = country;}));
this.#helicopterNationDropdown.setOptionsElements(this.#createNationButtons(this.#helicopterNationDropdown, nations, (country: string) => {this.#spawnOptions.country = country;}));
if (nations.length > 0) {
this.#aircraftNationDropdown.forceValue(nations[0]);
@ -375,27 +381,39 @@ export class MapContextMenu extends ContextMenu {
}
#createNationButtons(parent: Dropdown, nations: string[], callback: CallableFunction) {
return Object.values(nations).map((nation: string) => {
return Object.values(nations).map((country: string) => {
var el = document.createElement("div");
var formattedCountry = "";
if (this.#nationCodes[country] !== undefined && this.#nationCodes[country].displayName !== undefined)
formattedCountry = this.#nationCodes[country].displayName;
else
formattedCountry = country.charAt(0).toUpperCase() + country.slice(1).toLowerCase();
var button = document.createElement("button");
button.classList.add("nation-dropdown-element");
button.classList.add("country-dropdown-element");
el.appendChild(button);
button.addEventListener("click", () => {
callback(nation);
parent.forceValue(nation);
callback(country);
parent.forceValue(formattedCountry);
parent.close();
});
var code = this.#nationCodes[nation];
if (code !== undefined) {
var img = document.createElement("img");
img.src = `images/nations/${code.toLowerCase()}.svg`;
button.appendChild(img);
if (this.#nationCodes[country] !== undefined) {
var code = this.#nationCodes[country].flagCode;
if (code !== undefined) {
var img = document.createElement("img");
img.src = `images/nations/${code.toLowerCase()}.svg`;
button.appendChild(img);
}
}
else {
console.log("Unknown country " + country);
}
var text = document.createElement("div");
text.innerText = nation;
text.innerText = formattedCountry;
button.appendChild(text);
return el;
});
@ -515,8 +533,8 @@ export class MapContextMenu extends ContextMenu {
this.clip();
}
#setAircraftNation(nation: string) {
this.#spawnOptions.nation = nation;
#setAircraftNation(country: string) {
this.#spawnOptions.country = country;
}
/********* Helicopter spawn menu *********/
@ -598,8 +616,8 @@ export class MapContextMenu extends ContextMenu {
this.clip();
}
#setHelicopterNation(nation: string) {
this.#spawnOptions.nation = nation;
#setHelicopterNation(country: string) {
this.#spawnOptions.country = country;
}
/********* Groundunit spawn menu *********/

View File

@ -158,14 +158,14 @@ export function spawnExplosion(intensity: number, latlng: LatLng) {
POST(data, () => { });
}
export function spawnAircrafts(units: any, coalition: string, airbaseName: string, immediate: boolean, spawnPoints: number) {
var command = { "units": units, "coalition": coalition, "airbaseName": airbaseName, "immediate": immediate, "spawnPoints": spawnPoints };
export function spawnAircrafts(units: any, coalition: string, airbaseName: string, country: string, immediate: boolean, spawnPoints: number) {
var command = { "units": units, "coalition": coalition, "airbaseName": airbaseName, "country": country, "immediate": immediate, "spawnPoints": spawnPoints };
var data = { "spawnAircrafts": command }
POST(data, () => { });
}
export function spawnHelicopters(units: any, coalition: string, airbaseName: string, immediate: boolean, spawnPoints: number) {
var command = { "units": units, "coalition": coalition, "airbaseName": airbaseName, "immediate": immediate, "spawnPoints": spawnPoints };
export function spawnHelicopters(units: any, coalition: string, airbaseName: string, country: string, immediate: boolean, spawnPoints: number) {
var command = { "units": units, "coalition": coalition, "airbaseName": airbaseName, "country": country, "immediate": immediate, "spawnPoints": spawnPoints };
var data = { "spawnHelicopters": command }
POST(data, () => { });
}

View File

@ -700,7 +700,7 @@ export class UnitsManager {
input.click();
}
spawnUnits(category: string, units: any, coalition: string = "blue", immediate: boolean = true, airbase: string = "") {
spawnUnits(category: string, units: any, coalition: string = "blue", immediate: boolean = true, airbase: string = "", country: string = "") {
var spawnPoints = 0;
if (category === "Aircraft") {
if (airbase == "" && getMissionHandler().getCommandModeOptions().restrictSpawns && getMissionHandler().getRemainingSetupTime() < 0 && getMissionHandler().getCommandModeOptions().commandMode !== GAME_MASTER) {
@ -708,14 +708,14 @@ export class UnitsManager {
return false;
}
spawnPoints = units.reduce((points: number, unit: any) => {return points + aircraftDatabase.getSpawnPointsByName(unit.unitType)}, 0);
spawnAircrafts(units, coalition, airbase, immediate, spawnPoints);
spawnAircrafts(units, coalition, airbase, country, immediate, spawnPoints);
} else if (category === "Helicopter") {
if (airbase == "" && getMissionHandler().getCommandModeOptions().restrictSpawns && getMissionHandler().getRemainingSetupTime() < 0 && getMissionHandler().getCommandModeOptions().commandMode !== GAME_MASTER) {
getInfoPopup().setText("Helicopters can be air spawned during the SETUP phase only");
return false;
}
spawnPoints = units.reduce((points: number, unit: any) => {return points + helicopterDatabase.getSpawnPointsByName(unit.unitType)}, 0);
spawnHelicopters(units, coalition, airbase, immediate, spawnPoints);
spawnHelicopters(units, coalition, airbase, country, immediate, spawnPoints);
} else if (category === "GroundUnit") {
if (getMissionHandler().getCommandModeOptions().restrictSpawns && getMissionHandler().getRemainingSetupTime() < 0 && getMissionHandler().getCommandModeOptions().commandMode !== GAME_MASTER) {
getInfoPopup().setText("Ground units can be spawned during the SETUP phase only");

View File

@ -65,6 +65,15 @@
<hr>
</div>
<div id="aircraft-advanced-options" class="contextmenu-advanced-options hide">
<div class="ol-select-container">
<div id="aircraft-country-options" class="ol-select">
<div class="ol-select-value">Country</div>
<div class="ol-select-options">
<div>Select type first</div>
<!-- This is where all the aircraft country buttons will be shown-->
</div>
</div>
</div>
<div class="ol-select-container">
<div id="aircraft-livery-options" class="ol-select">
<div class="ol-select-value">Livery</div>
@ -74,15 +83,6 @@
</div>
</div>
</div>
<div class="ol-select-container">
<div id="aircraft-nation-options" class="ol-select">
<div class="ol-select-value">Nation</div>
<div class="ol-select-options">
<div>Select type first</div>
<!-- This is where all the aircraft nation buttons will be shown-->
</div>
</div>
</div>
<div id="aircraft-spawn-altitude-slider" class="ol-slider-container flight-control-ol-slider">
<dl class="ol-data-grid">
<dt> Spawn altitude
@ -142,6 +142,15 @@
<hr>
</div>
<div id="helicopter-advanced-options" class="contextmenu-advanced-options hide">
<div class="ol-select-container">
<div id="helicopter-country-options" class="ol-select">
<div class="ol-select-value">Country</div>
<div class="ol-select-options">
<div>Select type first</div>
<!-- This is where all the helicopter country buttons will be shown-->
</div>
</div>
</div>
<div class="ol-select-container">
<div id="helicopter-livery-options" class="ol-select">
<div class="ol-select-value">Livery</div>
@ -151,15 +160,6 @@
</div>
</div>
</div>
<div class="ol-select-container">
<div id="helicopter-nation-options" class="ol-select">
<div class="ol-select-value">Nation</div>
<div class="ol-select-options">
<div>Select type first</div>
<!-- This is where all the helicopter nation buttons will be shown-->
</div>
</div>
</div>
<div id="helicopter-spawn-altitude-slider" class="ol-slider-container flight-control-ol-slider">
<dl class="ol-data-grid">
<dt> Spawn altitude

View File

@ -1,6 +1,6 @@
local version = "v0.4.2-alpha"
local debug = false
local debug = true
Olympus.OlympusDLL = nil
Olympus.DLLsloaded = false
@ -404,7 +404,13 @@ function Olympus.spawnUnits(spawnTable)
Olympus.debug(Olympus.serializeTable(unitTable), 5)
local countryID = Olympus.getCountryIDByCoalition(spawnTable.coalition)
local countryID = 0
if spawnTable.country == nil or spawnTable.country == "" then
countryID = Olympus.getCountryIDByCoalition(spawnTable.coalition)
else
countryID = country.id[spawnTable.country]
end
local vars =
{
units = unitTable,

View File

@ -16,9 +16,6 @@ from dcs.liveries.liveryscanner import LiveryScanner
livery_scanner = LiveryScanner()
livery_scanner.scan_dcs_installation(SEARCH_FOLDER)
#print("Liveries found for units:")
#[print(key) for key in livery_scanner.map.keys()]
# Known id mismatches (because reasons, ask ED)
mismatched_ids = {
"A-10CII": "A-10C_2"
@ -72,7 +69,7 @@ if len(sys.argv) > 1:
database[unit_name]["liveries"] = {}
for livery in liveries:
database[unit_name]["liveries"][livery.id] = livery.name
database[unit_name]["liveries"][livery.id] = livery.name
# Create the loadouts table and add the empty loadout for the default task
database[unit_name]["loadouts"] = []

File diff suppressed because it is too large Load Diff

15
scripts/python/temp.py Normal file
View File

@ -0,0 +1,15 @@
import json
import difflib
countries = ['USA', 'GRG', 'GER', 'DZA', 'FRA', 'CAN', 'AUS', 'UKR', 'ITA', 'GRC', 'SPN', 'RUS', 'NETH', 'DEN', 'TUR', 'UK', 'BEL', 'ISR', 'NOR', 'JPN', 'ARE', 'QAT', 'IND', 'SAU', 'EGY', 'KOR', 'HND', 'CHL', 'BLUE', 'AUSAF', 'RED', 'VNM', 'SVK', 'SDN', 'GDR', 'JOR', 'PER', 'CHN', 'IDN', 'PHL', 'BOL', 'MAR', 'YEM', 'KWT', 'SUI', 'GHA', 'CYP', 'BHR', 'YUG', 'CZE', 'KAZ', 'AUT', 'HUN', 'MYS', 'ROU', 'THA', 'LBN', 'FIN', 'PRT', 'OMN', 'MEX', 'IRQ', 'BRA', 'SWE', 'NZG', 'CUB', 'INS', 'RSO', 'RSA', 'HRV', 'ABH', 'ARG', 'LBY', 'PRK', 'VEN', 'TUN', 'IRN', 'ETH', 'BLR', 'SUN', 'BGR', 'PAK', 'NGA', 'POL', 'SVN', 'SYR', 'SRB', 'UN', 'RSI', 'SPA', 'ECU', '', 'USAF', 'hide', 'EGP', 'LIB']
with open('C:\\Users\\dpass\\Documents\\DCSOlympus\\client\\public\\images\\nations\\codes.json', "r") as f:
codes = json.load(f)
for country in countries:
keys = difflib.get_close_matches(country, codes.keys(), cutoff=.35)
if len(keys) > 0:
codes[keys[0]]["liveryCodes"].append(country)
with open('C:\\Users\\dpass\\Documents\\DCSOlympus\\client\\public\\images\\nations\\codes.json', "w") as f:
json.dump(codes, f)

View File

@ -195,10 +195,11 @@ private:
class SpawnAircrafts : public Command
{
public:
SpawnAircrafts(string coalition, vector<SpawnOptions> spawnOptions, string airbaseName, bool immediate) :
SpawnAircrafts(string coalition, vector<SpawnOptions> spawnOptions, string airbaseName, string country, bool immediate) :
coalition(coalition),
spawnOptions(spawnOptions),
airbaseName(airbaseName),
country(country),
immediate(immediate)
{
priority = immediate ? CommandPriority::IMMEDIATE : CommandPriority::LOW;
@ -210,6 +211,7 @@ private:
const string coalition;
const vector<SpawnOptions> spawnOptions;
const string airbaseName;
const string country;
const bool immediate;
};
@ -218,10 +220,11 @@ private:
class SpawnHelicopters : public Command
{
public:
SpawnHelicopters(string coalition, vector<SpawnOptions> spawnOptions, string airbaseName, bool immediate) :
SpawnHelicopters(string coalition, vector<SpawnOptions> spawnOptions, string airbaseName, string country, bool immediate) :
coalition(coalition),
spawnOptions(spawnOptions),
airbaseName(airbaseName),
country(country),
immediate(immediate)
{
priority = immediate ? CommandPriority::IMMEDIATE : CommandPriority::LOW;
@ -233,6 +236,7 @@ private:
const string coalition;
const vector<SpawnOptions> spawnOptions;
const string airbaseName;
const string country;
const bool immediate;
};

View File

@ -103,6 +103,7 @@ string SpawnAircrafts::getString()
<< "category = " << "\"" << "Aircraft" << "\"" << ", "
<< "coalition = " << "\"" << coalition << "\"" << ", "
<< "airbaseName = \"" << airbaseName << "\", "
<< "country = \"" << country << "\", "
<< "units = " << "{" << unitsSS.str() << "}" << "}";
return commandSS.str();
}
@ -129,6 +130,7 @@ string SpawnHelicopters::getString()
<< "category = " << "\"" << "Helicopter" << "\"" << ", "
<< "coalition = " << "\"" << coalition << "\"" << ", "
<< "airbaseName = \"" << airbaseName << "\", "
<< "country = \"" << country << "\", "
<< "units = " << "{" << unitsSS.str() << "}" << "}";
return commandSS.str();
}

View File

@ -179,6 +179,7 @@ void Scheduler::handleRequest(string key, json::value value, string username)
bool immediate = value[L"immediate"].as_bool();
string coalition = to_string(value[L"coalition"]);
string airbaseName = to_string(value[L"airbaseName"]);
string country = to_string(value[L"country"]);
int spawnPoints = value[L"spawnPoints"].as_number().to_int32();
if (!checkSpawnPoints(spawnPoints, coalition)) return;
@ -197,13 +198,14 @@ void Scheduler::handleRequest(string key, json::value value, string username)
log(username + " spawned a " + coalition + " " + unitType, true);
}
command = dynamic_cast<Command*>(new SpawnAircrafts(coalition, spawnOptions, airbaseName, immediate));
command = dynamic_cast<Command*>(new SpawnAircrafts(coalition, spawnOptions, airbaseName, country, immediate));
}
else if (key.compare("spawnHelicopters") == 0)
{
bool immediate = value[L"immediate"].as_bool();
string coalition = to_string(value[L"coalition"]);
string airbaseName = to_string(value[L"airbaseName"]);
string country = to_string(value[L"country"]);
int spawnPoints = value[L"spawnPoints"].as_number().to_int32();
if (!checkSpawnPoints(spawnPoints, coalition)) return;
@ -222,7 +224,7 @@ void Scheduler::handleRequest(string key, json::value value, string username)
log(username + " spawned a " + coalition + " " + unitType, true);
}
command = dynamic_cast<Command*>(new SpawnHelicopters(coalition, spawnOptions, airbaseName, immediate));
command = dynamic_cast<Command*>(new SpawnHelicopters(coalition, spawnOptions, airbaseName, country, immediate));
}
else if (key.compare("spawnGroundUnits") == 0)
{