Completed transition to injected svgs
35
client/package-lock.json
generated
@ -14,17 +14,14 @@
|
||||
"debug": "~2.6.9",
|
||||
"ejs": "^3.1.8",
|
||||
"express": "~4.16.1",
|
||||
"geomag": "^1.0.0",
|
||||
"leaflet": "^1.9.3",
|
||||
"leaflet-control-mini-map": "^0.4.0",
|
||||
"leaflet.nauticscale": "^1.1.0",
|
||||
"milsymbol": "^2.0.0",
|
||||
"morgan": "~1.9.1",
|
||||
"save": "^2.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.21.4",
|
||||
"@iconfu/svg-inject": "^1.2.3",
|
||||
"@tanem/svg-injector": "^10.1.55",
|
||||
"@types/gtag.js": "^0.0.12",
|
||||
"@types/node": "^18.16.1",
|
||||
@ -1772,12 +1769,6 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@iconfu/svg-inject": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@iconfu/svg-inject/-/svg-inject-1.2.3.tgz",
|
||||
"integrity": "sha512-3v1MUAJqmJS4jmhHoCkSxt+EdJrjPHlLXrWocCT25kCxnxJto8028Z6CC406EL11KA53SDZgI/QQA5GEJAoiRw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@jridgewell/gen-mapping": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
||||
@ -3454,11 +3445,6 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/geomag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/geomag/-/geomag-1.0.0.tgz",
|
||||
"integrity": "sha512-mEblE1vO7HojL7nk2R2s670s1nc/u0jtQaP/8EvZxPZ7XlfkwEJ+TWpjgkNy2402Yj2/VaxaefGQgIzbUzUwHg=="
|
||||
},
|
||||
"node_modules/get-assigned-identifiers": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz",
|
||||
@ -4161,11 +4147,6 @@
|
||||
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/milsymbol": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/milsymbol/-/milsymbol-2.0.0.tgz",
|
||||
"integrity": "sha512-GcBFrcIUr8jScaZqZb0SI2W6AbnUrPCTHu2kqHxduQjN2DIN8q5pY6ksSWfnJ4HlcIAWQhyotbdPIr1bBxFbwQ=="
|
||||
},
|
||||
"node_modules/mime": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
|
||||
@ -6919,12 +6900,6 @@
|
||||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@iconfu/svg-inject": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@iconfu/svg-inject/-/svg-inject-1.2.3.tgz",
|
||||
"integrity": "sha512-3v1MUAJqmJS4jmhHoCkSxt+EdJrjPHlLXrWocCT25kCxnxJto8028Z6CC406EL11KA53SDZgI/QQA5GEJAoiRw==",
|
||||
"dev": true
|
||||
},
|
||||
"@jridgewell/gen-mapping": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
||||
@ -8320,11 +8295,6 @@
|
||||
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
|
||||
"dev": true
|
||||
},
|
||||
"geomag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/geomag/-/geomag-1.0.0.tgz",
|
||||
"integrity": "sha512-mEblE1vO7HojL7nk2R2s670s1nc/u0jtQaP/8EvZxPZ7XlfkwEJ+TWpjgkNy2402Yj2/VaxaefGQgIzbUzUwHg=="
|
||||
},
|
||||
"get-assigned-identifiers": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz",
|
||||
@ -8856,11 +8826,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"milsymbol": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/milsymbol/-/milsymbol-2.0.0.tgz",
|
||||
"integrity": "sha512-GcBFrcIUr8jScaZqZb0SI2W6AbnUrPCTHu2kqHxduQjN2DIN8q5pY6ksSWfnJ4HlcIAWQhyotbdPIr1bBxFbwQ=="
|
||||
},
|
||||
"mime": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
|
||||
|
||||
@ -205,10 +205,10 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
[data-object|="unit"][data-has-fox-1] .unit-ammo-fox-1,
|
||||
[data-object|="unit"][data-has-fox-2] .unit-ammo-fox-2,
|
||||
[data-object|="unit"][data-has-fox-3] .unit-ammo-fox-3,
|
||||
[data-object|="unit"][data-has-other-ammo] .unit-ammo-other {
|
||||
[data-object|="unit"][data-has-fox-1] .unit-ammo>div:nth-child(1),
|
||||
[data-object|="unit"][data-has-fox-2] .unit-ammo>div:nth-child(2),
|
||||
[data-object|="unit"][data-has-fox-3] .unit-ammo>div:nth-child(3),
|
||||
[data-object|="unit"][data-has-other-ammo] .unit-ammo>div:nth-child(4) {
|
||||
background-color: var(--secondary-gunmetal-grey);
|
||||
}
|
||||
|
||||
@ -217,10 +217,10 @@
|
||||
}
|
||||
|
||||
[data-object|="unit"][data-coalition="blue"] .unit-fuel-level,
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-fox-1] .unit-ammo-fox-1,
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-fox-2] .unit-ammo-fox-2,
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-fox-3] .unit-ammo-fox-3,
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-other-ammo] .unit-ammo-other {
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-fox-1] .unit-ammo>div:nth-child(1),
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-fox-2] .unit-ammo>div:nth-child(2),
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-fox-3] .unit-ammo>div:nth-child(3),
|
||||
[data-object|="unit"][data-coalition="blue"][data-has-other-ammo] .unit-ammo>div:nth-child(4) {
|
||||
background-color: var(--primary-blue);
|
||||
}
|
||||
|
||||
@ -233,10 +233,10 @@
|
||||
}
|
||||
|
||||
[data-object|="unit"][data-coalition="red"] .unit-fuel-level,
|
||||
[data-object|="unit"][data-coalition="red"][data-has-fox-1] .unit-ammo-fox-1,
|
||||
[data-object|="unit"][data-coalition="red"][data-has-fox-2] .unit-ammo-fox-2,
|
||||
[data-object|="unit"][data-coalition="red"][data-has-fox-3] .unit-ammo-fox-3,
|
||||
[data-object|="unit"][data-coalition="red"][data-has-other-ammo] .unit-ammo-other {
|
||||
[data-object|="unit"][data-coalition="red"][data-has-fox-1] .unit-ammo>div:nth-child(1),
|
||||
[data-object|="unit"][data-coalition="red"][data-has-fox-2] .unit-ammo>div:nth-child(2),
|
||||
[data-object|="unit"][data-coalition="red"][data-has-fox-3] .unit-ammo>div:nth-child(3),
|
||||
[data-object|="unit"][data-coalition="red"][data-has-other-ammo] .unit-ammo>div:nth-child(4) {
|
||||
background-color: var(--primary-red);
|
||||
}
|
||||
|
||||
@ -250,6 +250,8 @@
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
[data-object|="unit"][data-state="rtb"] .unit-state {
|
||||
|
||||
@ -307,7 +307,8 @@
|
||||
content: url("/resources/theme/images/icons/echelon-rh.svg");
|
||||
}
|
||||
|
||||
#line-abreast::before {
|
||||
#line-abreast-rh::before,
|
||||
#line-abreast-lh::before {
|
||||
content: url("/resources/theme/images/icons/line-abreast.svg");
|
||||
}
|
||||
|
||||
@ -315,6 +316,10 @@
|
||||
content: url("/resources/theme/images/icons/front.svg");
|
||||
}
|
||||
|
||||
#diamond::before {
|
||||
content: url("/resources/theme/images/icons/diamond.svg");
|
||||
}
|
||||
|
||||
#custom::before {
|
||||
content: url("/resources/theme/images/icons/custom.svg");
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
}
|
||||
|
||||
#mouse-info-panel dt#ref-measure-position::after {
|
||||
background-image: url("/resources/theme/images/pin.png");
|
||||
background-image: url("/resources/theme/images/icons/pin.png");
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 16px 16px;
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M26.7297 13.6516C26.6906 13.5594 26.6 13.5 26.5 13.5C26.4 13.5 26.3094 13.5594 26.2703 13.6516L25.5812 15.2594C25.5281 15.3844 25.5 15.5172 25.5 15.6531V16.8563L23.25 18.1687V17.875C23.25 17.6672 23.0828 17.5 22.875 17.5C22.6672 17.5 22.5 17.6672 22.5 17.875V18.75V19.25V19.625C22.5 19.8328 22.6672 20 22.875 20C23.0828 20 23.25 19.8328 23.25 19.625V19.5H25.5V20.0109L24.5859 20.8125C24.5312 20.8594 24.5 20.9281 24.5 21V21.25C24.5 21.3875 24.6125 21.5 24.75 21.5H26.25V20.5C26.25 20.3625 26.3625 20.25 26.5 20.25C26.6375 20.25 26.75 20.3625 26.75 20.5V21.5H28.25C28.3875 21.5 28.5 21.3875 28.5 21.25V21C28.5 20.9281 28.4688 20.8594 28.4141 20.8125L27.5 20.0109V19.5H29.75V19.625C29.75 19.8328 29.9172 20 30.125 20C30.3328 20 30.5 19.8328 30.5 19.625V19.25V18.75V17.875C30.5 17.6672 30.3328 17.5 30.125 17.5C29.9172 17.5 29.75 17.6672 29.75 17.875V18.1687L27.5 16.8563V15.6531C27.5 15.5172 27.4719 15.3844 27.4187 15.2594L26.7297 13.6516Z" fill="#202831"/>
|
||||
<path d="M9.72969 13.6516C9.69063 13.5594 9.6 13.5 9.5 13.5C9.4 13.5 9.30938 13.5594 9.27031 13.6516L8.58125 15.2594C8.52812 15.3844 8.5 15.5172 8.5 15.6531V16.8563L6.25 18.1687V17.875C6.25 17.6672 6.08281 17.5 5.875 17.5C5.66719 17.5 5.5 17.6672 5.5 17.875V18.75V19.25V19.625C5.5 19.8328 5.66719 20 5.875 20C6.08281 20 6.25 19.8328 6.25 19.625V19.5H8.5V20.0109L7.58594 20.8125C7.53125 20.8594 7.5 20.9281 7.5 21V21.25C7.5 21.3875 7.6125 21.5 7.75 21.5H9.25V20.5C9.25 20.3625 9.3625 20.25 9.5 20.25C9.6375 20.25 9.75 20.3625 9.75 20.5V21.5H11.25C11.3875 21.5 11.5 21.3875 11.5 21.25V21C11.5 20.9281 11.4687 20.8594 11.4141 20.8125L10.5 20.0109V19.5H12.75V19.625C12.75 19.8328 12.9172 20 13.125 20C13.3328 20 13.5 19.8328 13.5 19.625V19.25V18.75V17.875C13.5 17.6672 13.3328 17.5 13.125 17.5C12.9172 17.5 12.75 17.6672 12.75 17.875V18.1687L10.5 16.8563V15.6531C10.5 15.5172 10.4719 15.3844 10.4187 15.2594L9.72969 13.6516Z" fill="#202831"/>
|
||||
<path d="M16 19H20" stroke="#202831" stroke-linecap="round" stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
@ -1,5 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M26.7297 13.6516C26.6906 13.5594 26.6 13.5 26.5 13.5C26.4 13.5 26.3094 13.5594 26.2703 13.6516L25.5812 15.2594C25.5281 15.3844 25.5 15.5172 25.5 15.6531V16.8563L23.25 18.1687V17.875C23.25 17.6672 23.0828 17.5 22.875 17.5C22.6672 17.5 22.5 17.6672 22.5 17.875V18.75V19.25V19.625C22.5 19.8328 22.6672 20 22.875 20C23.0828 20 23.25 19.8328 23.25 19.625V19.5H25.5V20.0109L24.5859 20.8125C24.5312 20.8594 24.5 20.9281 24.5 21V21.25C24.5 21.3875 24.6125 21.5 24.75 21.5H26.25V20.5C26.25 20.3625 26.3625 20.25 26.5 20.25C26.6375 20.25 26.75 20.3625 26.75 20.5V21.5H28.25C28.3875 21.5 28.5 21.3875 28.5 21.25V21C28.5 20.9281 28.4688 20.8594 28.4141 20.8125L27.5 20.0109V19.5H29.75V19.625C29.75 19.8328 29.9172 20 30.125 20C30.3328 20 30.5 19.8328 30.5 19.625V19.25V18.75V17.875C30.5 17.6672 30.3328 17.5 30.125 17.5C29.9172 17.5 29.75 17.6672 29.75 17.875V18.1687L27.5 16.8563V15.6531C27.5 15.5172 27.4719 15.3844 27.4187 15.2594L26.7297 13.6516Z" fill="#5CA7FF"/>
|
||||
<path d="M9.72969 13.6516C9.69063 13.5594 9.6 13.5 9.5 13.5C9.4 13.5 9.30938 13.5594 9.27031 13.6516L8.58125 15.2594C8.52812 15.3844 8.5 15.5172 8.5 15.6531V16.8563L6.25 18.1687V17.875C6.25 17.6672 6.08281 17.5 5.875 17.5C5.66719 17.5 5.5 17.6672 5.5 17.875V18.75V19.25V19.625C5.5 19.8328 5.66719 20 5.875 20C6.08281 20 6.25 19.8328 6.25 19.625V19.5H8.5V20.0109L7.58594 20.8125C7.53125 20.8594 7.5 20.9281 7.5 21V21.25C7.5 21.3875 7.6125 21.5 7.75 21.5H9.25V20.5C9.25 20.3625 9.3625 20.25 9.5 20.25C9.6375 20.25 9.75 20.3625 9.75 20.5V21.5H11.25C11.3875 21.5 11.5 21.3875 11.5 21.25V21C11.5 20.9281 11.4687 20.8594 11.4141 20.8125L10.5 20.0109V19.5H12.75V19.625C12.75 19.8328 12.9172 20 13.125 20C13.3328 20 13.5 19.8328 13.5 19.625V19.25V18.75V17.875C13.5 17.6672 13.3328 17.5 13.125 17.5C12.9172 17.5 12.75 17.6672 12.75 17.875V18.1687L10.5 16.8563V15.6531C10.5 15.5172 10.4719 15.3844 10.4187 15.2594L9.72969 13.6516Z" fill="#5CA7FF"/>
|
||||
<path d="M16 19H20" stroke="#5CA7FF" stroke-linecap="round" stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
@ -1,4 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.2083 7.41405C12.1445 7.26349 11.9965 7.1665 11.8331 7.1665C11.6698 7.1665 11.5218 7.26349 11.458 7.41405L10.3325 10.0402C10.2457 10.2443 10.1998 10.4612 10.1998 10.6833V12.6483L6.5248 14.7921V14.3123C6.5248 13.9729 6.25173 13.6998 5.9123 13.6998C5.57288 13.6998 5.2998 13.9729 5.2998 14.3123V15.7415V16.5582V17.1707C5.2998 17.5101 5.57288 17.7832 5.9123 17.7832C6.25173 17.7832 6.5248 17.5101 6.5248 17.1707V16.9665H10.1998V17.801L8.70684 19.1103C8.61752 19.1868 8.56647 19.2991 8.56647 19.4165V19.8248C8.56647 20.0494 8.75022 20.2332 8.9748 20.2332H11.4248V18.5998C11.4248 18.3753 11.6086 18.1915 11.8331 18.1915C12.0577 18.1915 12.2415 18.3753 12.2415 18.5998V20.2332H14.6915C14.916 20.2332 15.0998 20.0494 15.0998 19.8248V19.4165C15.0998 19.2991 15.0488 19.1868 14.9594 19.1103L13.4665 17.801V16.9665H17.1415V17.1707C17.1415 17.5101 17.4146 17.7832 17.754 17.7832C18.0934 17.7832 18.3665 17.5101 18.3665 17.1707V16.5582V15.7415V14.3123C18.3665 13.9729 18.0934 13.6998 17.754 13.6998C17.4146 13.6998 17.1415 13.9729 17.1415 14.3123V14.7921L13.4665 12.6483V10.6833C13.4665 10.4612 13.4206 10.2443 13.3338 10.0402L12.2083 7.41405Z" fill="#202831"/>
|
||||
<path d="M22.8732 15.8329C22.8097 15.7061 22.6625 15.6245 22.5 15.6245C22.3375 15.6245 22.1903 15.7061 22.1268 15.8329L21.0071 18.0436C20.9207 18.2155 20.875 18.3981 20.875 18.585V20.2393L17.2188 22.044V21.6401C17.2188 21.3544 16.9471 21.1245 16.6094 21.1245C16.2717 21.1245 16 21.3544 16 21.6401V22.8433V23.5307V24.0464C16 24.3321 16.2717 24.562 16.6094 24.562C16.9471 24.562 17.2188 24.3321 17.2188 24.0464V23.8745H20.875V24.577L19.3896 25.6792C19.3008 25.7436 19.25 25.8382 19.25 25.937V26.2807C19.25 26.4698 19.4328 26.6245 19.6563 26.6245H22.0938V25.2495C22.0938 25.0604 22.2765 24.9057 22.5 24.9057C22.7235 24.9057 22.9063 25.0604 22.9063 25.2495V26.6245H25.3438C25.5672 26.6245 25.75 26.4698 25.75 26.2807V25.937C25.75 25.8382 25.6992 25.7436 25.6104 25.6792L24.125 24.577V23.8745H27.7813V24.0464C27.7813 24.3321 28.053 24.562 28.3906 24.562C28.7283 24.562 29 24.3321 29 24.0464V23.5307V22.8433V21.6401C29 21.3544 28.7283 21.1245 28.3906 21.1245C28.053 21.1245 27.7813 21.3544 27.7813 21.6401V22.044L24.125 20.2393V18.585C24.125 18.3981 24.0793 18.2155 23.9929 18.0436L22.8732 15.8329Z" fill="#202831"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
@ -1,4 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.2083 7.41405C12.1445 7.26349 11.9965 7.1665 11.8331 7.1665C11.6698 7.1665 11.5218 7.26349 11.458 7.41405L10.3325 10.0402C10.2457 10.2443 10.1998 10.4612 10.1998 10.6833V12.6483L6.5248 14.7921V14.3123C6.5248 13.9729 6.25173 13.6998 5.9123 13.6998C5.57288 13.6998 5.2998 13.9729 5.2998 14.3123V15.7415V16.5582V17.1707C5.2998 17.5101 5.57288 17.7832 5.9123 17.7832C6.25173 17.7832 6.5248 17.5101 6.5248 17.1707V16.9665H10.1998V17.801L8.70684 19.1103C8.61752 19.1868 8.56647 19.2991 8.56647 19.4165V19.8248C8.56647 20.0494 8.75022 20.2332 8.9748 20.2332H11.4248V18.5998C11.4248 18.3753 11.6086 18.1915 11.8331 18.1915C12.0577 18.1915 12.2415 18.3753 12.2415 18.5998V20.2332H14.6915C14.916 20.2332 15.0998 20.0494 15.0998 19.8248V19.4165C15.0998 19.2991 15.0488 19.1868 14.9594 19.1103L13.4665 17.801V16.9665H17.1415V17.1707C17.1415 17.5101 17.4146 17.7832 17.754 17.7832C18.0934 17.7832 18.3665 17.5101 18.3665 17.1707V16.5582V15.7415V14.3123C18.3665 13.9729 18.0934 13.6998 17.754 13.6998C17.4146 13.6998 17.1415 13.9729 17.1415 14.3123V14.7921L13.4665 12.6483V10.6833C13.4665 10.4612 13.4206 10.2443 13.3338 10.0402L12.2083 7.41405Z" fill="#5CA7FF"/>
|
||||
<path d="M22.8732 15.8329C22.8097 15.7061 22.6625 15.6245 22.5 15.6245C22.3375 15.6245 22.1903 15.7061 22.1268 15.8329L21.0071 18.0436C20.9207 18.2155 20.875 18.3981 20.875 18.585V20.2393L17.2188 22.044V21.6401C17.2188 21.3544 16.9471 21.1245 16.6094 21.1245C16.2717 21.1245 16 21.3544 16 21.6401V22.8433V23.5307V24.0464C16 24.3321 16.2717 24.562 16.6094 24.562C16.9471 24.562 17.2188 24.3321 17.2188 24.0464V23.8745H20.875V24.577L19.3896 25.6792C19.3008 25.7436 19.25 25.8382 19.25 25.937V26.2807C19.25 26.4698 19.4328 26.6245 19.6563 26.6245H22.0938V25.2495C22.0938 25.0604 22.2765 24.9057 22.5 24.9057C22.7235 24.9057 22.9063 25.0604 22.9063 25.2495V26.6245H25.3438C25.5672 26.6245 25.75 26.4698 25.75 26.2807V25.937C25.75 25.8382 25.6992 25.7436 25.6104 25.6792L24.125 24.577V23.8745H27.7813V24.0464C27.7813 24.3321 28.053 24.562 28.3906 24.562C28.7283 24.562 29 24.3321 29 24.0464V23.5307V22.8433V21.6401C29 21.3544 28.7283 21.1245 28.3906 21.1245C28.053 21.1245 27.7813 21.3544 27.7813 21.6401V22.044L24.125 20.2393V18.585C24.125 18.3981 24.0793 18.2155 23.9929 18.0436L22.8732 15.8329Z" fill="#5CA7FF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
@ -1,5 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M23.7297 18.6516C23.6906 18.5594 23.6 18.5 23.5 18.5C23.4 18.5 23.3094 18.5594 23.2703 18.6516L22.5812 20.2594C22.5281 20.3844 22.5 20.5172 22.5 20.6531V21.8563L20.25 23.1687V22.875C20.25 22.6672 20.0828 22.5 19.875 22.5C19.6672 22.5 19.5 22.6672 19.5 22.875V23.75V24.25V24.625C19.5 24.8328 19.6672 25 19.875 25C20.0828 25 20.25 24.8328 20.25 24.625V24.5H22.5V25.0109L21.5859 25.8125C21.5312 25.8594 21.5 25.9281 21.5 26V26.25C21.5 26.3875 21.6125 26.5 21.75 26.5H23.25V25.5C23.25 25.3625 23.3625 25.25 23.5 25.25C23.6375 25.25 23.75 25.3625 23.75 25.5V26.5H25.25C25.3875 26.5 25.5 26.3875 25.5 26.25V26C25.5 25.9281 25.4688 25.8594 25.4141 25.8125L24.5 25.0109V24.5H26.75V24.625C26.75 24.8328 26.9172 25 27.125 25C27.3328 25 27.5 24.8328 27.5 24.625V24.25V23.75V22.875C27.5 22.6672 27.3328 22.5 27.125 22.5C26.9172 22.5 26.75 22.6672 26.75 22.875V23.1687L24.5 21.8563V20.6531C24.5 20.5172 24.4719 20.3844 24.4187 20.2594L23.7297 18.6516Z" fill="#202831"/>
|
||||
<path d="M11.7297 8.65156C11.6906 8.55937 11.6 8.5 11.5 8.5C11.4 8.5 11.3094 8.55937 11.2703 8.65156L10.5813 10.2594C10.5281 10.3844 10.5 10.5172 10.5 10.6531V11.8562L8.25 13.1687V12.875C8.25 12.6672 8.08281 12.5 7.875 12.5C7.66719 12.5 7.5 12.6672 7.5 12.875V13.75V14.25V14.625C7.5 14.8328 7.66719 15 7.875 15C8.08281 15 8.25 14.8328 8.25 14.625V14.5H10.5V15.0109L9.58594 15.8125C9.53125 15.8594 9.5 15.9281 9.5 16V16.25C9.5 16.3875 9.6125 16.5 9.75 16.5H11.25V15.5C11.25 15.3625 11.3625 15.25 11.5 15.25C11.6375 15.25 11.75 15.3625 11.75 15.5V16.5H13.25C13.3875 16.5 13.5 16.3875 13.5 16.25V16C13.5 15.9281 13.4688 15.8594 13.4141 15.8125L12.5 15.0109V14.5H14.75V14.625C14.75 14.8328 14.9172 15 15.125 15C15.3328 15 15.5 14.8328 15.5 14.625V14.25V13.75V12.875C15.5 12.6672 15.3328 12.5 15.125 12.5C14.9172 12.5 14.75 12.6672 14.75 12.875V13.1687L12.5 11.8562V10.6531C12.5 10.5172 12.4719 10.3844 12.4187 10.2594L11.7297 8.65156Z" fill="#202831"/>
|
||||
<path d="M17 17L20 19" stroke="#202831" stroke-linecap="round" stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@ -1,5 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M23.7297 18.6516C23.6906 18.5594 23.6 18.5 23.5 18.5C23.4 18.5 23.3094 18.5594 23.2703 18.6516L22.5812 20.2594C22.5281 20.3844 22.5 20.5172 22.5 20.6531V21.8563L20.25 23.1687V22.875C20.25 22.6672 20.0828 22.5 19.875 22.5C19.6672 22.5 19.5 22.6672 19.5 22.875V23.75V24.25V24.625C19.5 24.8328 19.6672 25 19.875 25C20.0828 25 20.25 24.8328 20.25 24.625V24.5H22.5V25.0109L21.5859 25.8125C21.5312 25.8594 21.5 25.9281 21.5 26V26.25C21.5 26.3875 21.6125 26.5 21.75 26.5H23.25V25.5C23.25 25.3625 23.3625 25.25 23.5 25.25C23.6375 25.25 23.75 25.3625 23.75 25.5V26.5H25.25C25.3875 26.5 25.5 26.3875 25.5 26.25V26C25.5 25.9281 25.4688 25.8594 25.4141 25.8125L24.5 25.0109V24.5H26.75V24.625C26.75 24.8328 26.9172 25 27.125 25C27.3328 25 27.5 24.8328 27.5 24.625V24.25V23.75V22.875C27.5 22.6672 27.3328 22.5 27.125 22.5C26.9172 22.5 26.75 22.6672 26.75 22.875V23.1687L24.5 21.8563V20.6531C24.5 20.5172 24.4719 20.3844 24.4187 20.2594L23.7297 18.6516Z" fill="#5CA7FF"/>
|
||||
<path d="M11.7297 8.65156C11.6906 8.55937 11.6 8.5 11.5 8.5C11.4 8.5 11.3094 8.55937 11.2703 8.65156L10.5813 10.2594C10.5281 10.3844 10.5 10.5172 10.5 10.6531V11.8562L8.25 13.1687V12.875C8.25 12.6672 8.08281 12.5 7.875 12.5C7.66719 12.5 7.5 12.6672 7.5 12.875V13.75V14.25V14.625C7.5 14.8328 7.66719 15 7.875 15C8.08281 15 8.25 14.8328 8.25 14.625V14.5H10.5V15.0109L9.58594 15.8125C9.53125 15.8594 9.5 15.9281 9.5 16V16.25C9.5 16.3875 9.6125 16.5 9.75 16.5H11.25V15.5C11.25 15.3625 11.3625 15.25 11.5 15.25C11.6375 15.25 11.75 15.3625 11.75 15.5V16.5H13.25C13.3875 16.5 13.5 16.3875 13.5 16.25V16C13.5 15.9281 13.4688 15.8594 13.4141 15.8125L12.5 15.0109V14.5H14.75V14.625C14.75 14.8328 14.9172 15 15.125 15C15.3328 15 15.5 14.8328 15.5 14.625V14.25V13.75V12.875C15.5 12.6672 15.3328 12.5 15.125 12.5C14.9172 12.5 14.75 12.6672 14.75 12.875V13.1687L12.5 11.8562V10.6531C12.5 10.5172 12.4719 10.3844 12.4187 10.2594L11.7297 8.65156Z" fill="#5CA7FF"/>
|
||||
<path d="M17 17L20 19" stroke="#5CA7FF" stroke-linecap="round" stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@ -1,5 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.2297 20.1516C18.1906 20.0594 18.1 20 18 20C17.9 20 17.8094 20.0594 17.7703 20.1516L17.0812 21.7594C17.0281 21.8844 17 22.0172 17 22.1531V23.3563L14.75 24.6687V24.375C14.75 24.1672 14.5828 24 14.375 24C14.1672 24 14 24.1672 14 24.375V25.25V25.75V26.125C14 26.3328 14.1672 26.5 14.375 26.5C14.5828 26.5 14.75 26.3328 14.75 26.125V26H17V26.5109L16.0859 27.3125C16.0312 27.3594 16 27.4281 16 27.5V27.75C16 27.8875 16.1125 28 16.25 28H17.75V27C17.75 26.8625 17.8625 26.75 18 26.75C18.1375 26.75 18.25 26.8625 18.25 27V28H19.75C19.8875 28 20 27.8875 20 27.75V27.5C20 27.4281 19.9688 27.3594 19.9141 27.3125L19 26.5109V26H21.25V26.125C21.25 26.3328 21.4172 26.5 21.625 26.5C21.8328 26.5 22 26.3328 22 26.125V25.75V25.25V24.375C22 24.1672 21.8328 24 21.625 24C21.4172 24 21.25 24.1672 21.25 24.375V24.6687L19 23.3563V22.1531C19 22.0172 18.9719 21.8844 18.9187 21.7594L18.2297 20.1516Z" fill="#202831"/>
|
||||
<path d="M18.2297 6.15156C18.1906 6.05937 18.1 6 18 6C17.9 6 17.8094 6.05937 17.7703 6.15156L17.0812 7.75937C17.0281 7.88437 17 8.01719 17 8.15313V9.35625L14.75 10.6687V10.375C14.75 10.1672 14.5828 10 14.375 10C14.1672 10 14 10.1672 14 10.375V11.25V11.75V12.125C14 12.3328 14.1672 12.5 14.375 12.5C14.5828 12.5 14.75 12.3328 14.75 12.125V12H17V12.5109L16.0859 13.3125C16.0312 13.3594 16 13.4281 16 13.5V13.75C16 13.8875 16.1125 14 16.25 14H17.75V13C17.75 12.8625 17.8625 12.75 18 12.75C18.1375 12.75 18.25 12.8625 18.25 13V14H19.75C19.8875 14 20 13.8875 20 13.75V13.5C20 13.4281 19.9688 13.3594 19.9141 13.3125L19 12.5109V12H21.25V12.125C21.25 12.3328 21.4172 12.5 21.625 12.5C21.8328 12.5 22 12.3328 22 12.125V11.75V11.25V10.375C22 10.1672 21.8328 10 21.625 10C21.4172 10 21.25 10.1672 21.25 10.375V10.6687L19 9.35625V8.15313C19 8.01719 18.9719 7.88437 18.9187 7.75937L18.2297 6.15156Z" fill="#202831"/>
|
||||
<path d="M18 15.5L18 18.5" stroke="#202831" stroke-linecap="round" stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
@ -1,5 +0,0 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.2297 20.1516C18.1906 20.0594 18.1 20 18 20C17.9 20 17.8094 20.0594 17.7703 20.1516L17.0812 21.7594C17.0281 21.8844 17 22.0172 17 22.1531V23.3563L14.75 24.6687V24.375C14.75 24.1672 14.5828 24 14.375 24C14.1672 24 14 24.1672 14 24.375V25.25V25.75V26.125C14 26.3328 14.1672 26.5 14.375 26.5C14.5828 26.5 14.75 26.3328 14.75 26.125V26H17V26.5109L16.0859 27.3125C16.0312 27.3594 16 27.4281 16 27.5V27.75C16 27.8875 16.1125 28 16.25 28H17.75V27C17.75 26.8625 17.8625 26.75 18 26.75C18.1375 26.75 18.25 26.8625 18.25 27V28H19.75C19.8875 28 20 27.8875 20 27.75V27.5C20 27.4281 19.9688 27.3594 19.9141 27.3125L19 26.5109V26H21.25V26.125C21.25 26.3328 21.4172 26.5 21.625 26.5C21.8328 26.5 22 26.3328 22 26.125V25.75V25.25V24.375C22 24.1672 21.8328 24 21.625 24C21.4172 24 21.25 24.1672 21.25 24.375V24.6687L19 23.3563V22.1531C19 22.0172 18.9719 21.8844 18.9187 21.7594L18.2297 20.1516Z" fill="#5CA7FF"/>
|
||||
<path d="M18.2297 6.15156C18.1906 6.05937 18.1 6 18 6C17.9 6 17.8094 6.05937 17.7703 6.15156L17.0812 7.75937C17.0281 7.88437 17 8.01719 17 8.15313V9.35625L14.75 10.6687V10.375C14.75 10.1672 14.5828 10 14.375 10C14.1672 10 14 10.1672 14 10.375V11.25V11.75V12.125C14 12.3328 14.1672 12.5 14.375 12.5C14.5828 12.5 14.75 12.3328 14.75 12.125V12H17V12.5109L16.0859 13.3125C16.0312 13.3594 16 13.4281 16 13.5V13.75C16 13.8875 16.1125 14 16.25 14H17.75V13C17.75 12.8625 17.8625 12.75 18 12.75C18.1375 12.75 18.25 12.8625 18.25 13V14H19.75C19.8875 14 20 13.8875 20 13.75V13.5C20 13.4281 19.9688 13.3594 19.9141 13.3125L19 12.5109V12H21.25V12.125C21.25 12.3328 21.4172 12.5 21.625 12.5C21.8328 12.5 22 12.3328 22 12.125V11.75V11.25V10.375C22 10.1672 21.8328 10 21.625 10C21.4172 10 21.25 10.1672 21.25 10.375V10.6687L19 9.35625V8.15313C19 8.01719 18.9719 7.88437 18.9187 7.75937L18.2297 6.15156Z" fill="#5CA7FF"/>
|
||||
<path d="M18 15.5L18 18.5" stroke="#5CA7FF" stroke-linecap="round" stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
73
client/public/themes/olympus/images/icons/diamond.svg
Normal file
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg14"
|
||||
sodipodi:docname="diamond.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/">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<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="defs18" />
|
||||
<sodipodi:namedview
|
||||
inkscape:document-rotation="0"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview16"
|
||||
showgrid="false"
|
||||
inkscape:zoom="34.345186"
|
||||
inkscape:cx="9.7975885"
|
||||
inkscape:cy="6.9150885"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg14"
|
||||
inkscape:pagecheckerboard="0" />
|
||||
<path
|
||||
d="m 7.7738456,0.73991536 c 0.028657,-0.06694 0.095212,-0.11005484 0.1686893,-0.11005484 0.07342,0 0.1399744,0.04312 0.1686901,0.11005484 L 8.6172383,1.907376 c 0.039075,0.09076 0.059684,0.187205 0.059684,0.285915 V 3.066887 L 10.329417,4.01992 V 3.806656 c 0,-0.150915 0.1228,-0.272327 0.275387,-0.272327 0.152644,0 0.275444,0.121412 0.275444,0.272327 V 4.441993 4.805059 5.07733 c 0,0.150916 -0.1228,0.272328 -0.275444,0.272328 -0.152587,0 -0.275387,-0.121412 -0.275387,-0.272328 V 4.98659 H 8.676921 v 0.37097 l 0.6713243,0.582063 c 0.040146,0.03402 0.06312,0.08395 0.06312,0.136109 v 0.181532 c 0,0.09987 -0.082602,0.181532 -0.1836106,0.181532 H 8.1260895 v -0.72613 c 0,-0.09981 -0.0826,-0.181478 -0.1835546,-0.181478 -0.1010109,0 -0.1836102,0.08166 -0.1836102,0.181478 v 0.72613 H 6.657261 c -0.101011,0 -0.1836102,-0.08167 -0.1836102,-0.181532 V 6.075732 c 0,-0.05216 0.022912,-0.102096 0.063058,-0.136109 L 7.2080928,5.35756 V 4.98659 H 5.5555976 v 0.09074 c 0,0.150915 -0.1228013,0.272327 -0.2753877,0.272327 -0.152643,0 -0.2754442,-0.121412 -0.2754442,-0.272327 V 4.805059 4.441993 3.806656 c 0,-0.150915 0.1228012,-0.272327 0.2754442,-0.272327 0.1525864,0 0.2753877,0.121412 0.2753877,0.272327 V 4.01992 L 7.2080933,3.066887 V 2.193291 c 0,-0.09871 0.020665,-0.195155 0.059684,-0.285915 z"
|
||||
fill="#202831"
|
||||
id="path2"
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.559857" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.559857"
|
||||
id="path2-4"
|
||||
fill="#202831"
|
||||
d="m 3.184664,4.4905966 c 0.028657,-0.066941 0.095212,-0.1100552 0.1686901,-0.1100552 0.07342,0 0.1399744,0.043114 0.1686902,0.1100552 L 4.0280567,5.658057 c 0.039075,0.09076 0.059684,0.1872056 0.059684,0.2859155 v 0.8735957 l 1.652495,0.9530334 v -0.213264 c 0,-0.150915 0.1228008,-0.2723265 0.2753878,-0.2723265 0.152643,0 0.2754438,0.1214115 0.2754438,0.2723265 v 0.6353371 0.3630661 0.272271 c 0,0.1509163 -0.1228008,0.2723279 -0.2754438,0.2723279 -0.152587,0 -0.2753878,-0.1214116 -0.2753878,-0.2723279 V 8.7372709 H 4.0877394 V 9.1082413 L 4.759064,9.6903046 c 0.040146,0.03402 0.063115,0.08394 0.063115,0.136109 v 0.1815324 c 0,0.09987 -0.082599,0.181533 -0.1836102,0.181533 H 3.5369055 V 9.4633456 c 0,-0.09981 -0.082599,-0.181477 -0.1835538,-0.181477 -0.101011,0 -0.1836111,0.08166 -0.1836111,0.181477 V 10.189479 H 2.0680777 c -0.101011,0 -0.183611,-0.08166 -0.183611,-0.181533 V 9.8264136 c 0,-0.05216 0.022912,-0.102096 0.063058,-0.136109 L 2.6189119,9.1082413 V 8.7372709 H 0.96641662 v 0.090741 c 0,0.1509163 -0.1228014,0.2723279 -0.2753875,0.2723279 -0.15264324,0 -0.27544391,-0.1214116 -0.27544391,-0.2723279 V 8.5557408 8.1926747 7.5573376 c 0,-0.150915 0.12280067,-0.2723265 0.27544391,-0.2723265 0.1525861,0 0.2753875,0.1214115 0.2753875,0.2723265 v 0.213264 L 2.6189116,6.8175682 V 5.9439725 c 0,-0.09871 0.020665,-0.1951547 0.059684,-0.2859155 z" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.559857"
|
||||
id="path2-4-5"
|
||||
fill="#202831"
|
||||
d="m 12.484629,4.5143881 c 0.02865,-0.066941 0.09521,-0.1100553 0.16869,-0.1100553 0.07342,0 0.139974,0.043114 0.16869,0.1100553 l 0.506012,1.1674604 c 0.03908,0.09076 0.05968,0.1872055 0.05968,0.2859155 v 0.8735956 l 1.652495,0.9530335 V 7.581129 c 0,-0.150915 0.122802,-0.2723265 0.275389,-0.2723265 0.152642,0 0.275444,0.1214115 0.275444,0.2723265 v 0.6353371 0.3630662 0.272271 c 0,0.1509163 -0.122802,0.2723279 -0.275444,0.2723279 -0.152587,0 -0.275389,-0.1214116 -0.275389,-0.2723279 v -0.090741 h -1.652495 v 0.3709703 l 0.671324,0.582064 c 0.04015,0.03402 0.06311,0.08394 0.06311,0.136107 v 0.1815324 c 0,0.09987 -0.0826,0.181533 -0.183611,0.181533 H 12.836865 V 9.4871406 c 0,-0.09981 -0.0826,-0.181478 -0.183554,-0.181478 -0.101011,0 -0.183611,0.08166 -0.183611,0.181478 v 0.7261314 h -1.101658 c -0.101011,0 -0.183611,-0.08166 -0.183611,-0.181533 V 9.8502066 c 0,-0.05216 0.02291,-0.102096 0.06306,-0.136108 l 0.671383,-0.582063 V 8.7610653 h -1.652496 v 0.090741 c 0,0.1509163 -0.122802,0.2723279 -0.2753878,0.2723279 -0.152644,0 -0.275444,-0.1214116 -0.275444,-0.2723279 V 8.5795323 8.2164661 7.581129 c 0,-0.150915 0.1228,-0.2723265 0.275444,-0.2723265 0.1525858,0 0.2753878,0.1214115 0.2753878,0.2723265 V 7.7943931 L 11.918876,6.8413596 V 5.967764 c 0,-0.09871 0.02067,-0.1951547 0.05968,-0.2859155 z" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.559857"
|
||||
id="path2-4-9"
|
||||
fill="#202831"
|
||||
d="m 7.7976374,9.4146894 c 0.028656,-0.06694 0.095212,-0.1100553 0.1686901,-0.1100553 0.07342,0 0.1399744,0.043115 0.1686902,0.1100553 l 0.5060124,1.1674566 c 0.039075,0.09076 0.059684,0.187204 0.059684,0.285914 v 0.873592 l 1.6524959,0.953033 v -0.213264 c 0,-0.150914 0.1228,-0.272326 0.275387,-0.272326 0.152644,0 0.275444,0.121412 0.275444,0.272326 v 0.635337 0.363066 0.272271 c 0,0.150917 -0.1228,0.272329 -0.275444,0.272329 -0.152587,0 -0.275387,-0.121412 -0.275387,-0.272329 v -0.09074 H 8.7007128 v 0.37097 l 0.671325,0.582064 c 0.040146,0.03402 0.06312,0.08394 0.06312,0.136108 v 0.181532 c 0,0.09987 -0.082602,0.181533 -0.1836105,0.181533 H 8.1498788 V 14.38743 c 0,-0.09981 -0.082599,-0.181477 -0.1835537,-0.181477 -0.101011,0 -0.1836111,0.08166 -0.1836111,0.181477 v 0.726132 H 6.6810511 c -0.1010109,0 -0.183611,-0.08166 -0.183611,-0.181533 v -0.181532 c 0,-0.05216 0.022912,-0.102096 0.063059,-0.136108 l 0.6713867,-0.582064 v -0.37097 H 5.5793901 v 0.09074 c 0,0.150916 -0.1228016,0.272328 -0.2753876,0.272328 -0.1526432,0 -0.2754439,-0.121411 -0.2754439,-0.272328 v -0.272271 -0.363066 -0.635337 c 0,-0.150914 0.1228007,-0.272326 0.2754439,-0.272326 0.152586,0 0.2753876,0.121412 0.2753876,0.272326 v 0.213264 L 7.2318853,11.741652 V 10.86806 c 0,-0.09871 0.020665,-0.195154 0.059684,-0.285914 z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.1 KiB |
12
client/src/@types/unit.d.ts
vendored
@ -79,4 +79,16 @@ interface GeneralSettings {
|
||||
prohibitAG: boolean;
|
||||
prohibitAfterburner: boolean;
|
||||
prohibitAirWpn: boolean;
|
||||
}
|
||||
|
||||
interface UnitIconOptions {
|
||||
showState: boolean,
|
||||
showVvi: boolean,
|
||||
showHotgroup: boolean,
|
||||
showUnitIcon: boolean,
|
||||
showShortLabel: boolean,
|
||||
showFuel: boolean,
|
||||
showAmmo: boolean,
|
||||
showSummary: boolean,
|
||||
rotateToHeading: boolean
|
||||
}
|
||||
@ -67,7 +67,10 @@ export class Dropdown {
|
||||
selectValue(idx: number) {
|
||||
if (idx < this.#optionsList.length) {
|
||||
var option = this.#optionsList[idx];
|
||||
this.#value.innerHTML = `<div class = "ol-ellipsed"> ${option} </div>`;
|
||||
var el = document.createElement("div");
|
||||
el.classList.add("ol-ellipsed");
|
||||
el.innerText = option;
|
||||
this.#value.appendChild(el);
|
||||
this.#index = idx;
|
||||
this.#close();
|
||||
this.#callback(option);
|
||||
|
||||
@ -88,7 +88,7 @@ export class Slider {
|
||||
|
||||
#onValue() {
|
||||
if (this.#valueText != null && this.#slider != null)
|
||||
this.#valueText.innerHTML = this.#minValue + Math.round(parseFloat(this.#slider.value) / parseFloat(this.#slider.max) * (this.#maxValue - this.#minValue)) + this.#unit
|
||||
this.#valueText.innerText = this.#minValue + Math.round(parseFloat(this.#slider.value) / parseFloat(this.#slider.max) * (this.#maxValue - this.#minValue)) + this.#unit
|
||||
this.setActive(true);
|
||||
}
|
||||
|
||||
|
||||
@ -40,11 +40,16 @@ export class UnitContextMenu extends ContextMenu {
|
||||
this.#customFormationCallback = callback;
|
||||
}
|
||||
|
||||
setOptions(options: { [key: string]: string }, callback: CallableFunction) {
|
||||
this.getContainer()?.replaceChildren(...Object.keys(options).map((option: string, idx: number) => {
|
||||
setOptions(options: { [key: string]: {text: string, tooltip: string }}, callback: CallableFunction) {
|
||||
this.getContainer()?.replaceChildren(...Object.keys(options).map((key: string, idx: number) => {
|
||||
const option = options[key];
|
||||
var button = document.createElement("button");
|
||||
button.innerHTML = options[option];
|
||||
button.addEventListener("click", () => callback(option));
|
||||
var el = document.createElement("div");
|
||||
el.title = option.tooltip;
|
||||
el.innerText = option.text;
|
||||
el.id = key;
|
||||
button.addEventListener("click", () => callback(key));
|
||||
button.appendChild(el);
|
||||
return (button);
|
||||
}));
|
||||
}
|
||||
|
||||
@ -140,28 +140,14 @@ function setupEvents() {
|
||||
case "Space":
|
||||
setPaused(!getPaused());
|
||||
break;
|
||||
case "KeyW":
|
||||
case "KeyA":
|
||||
case "KeyS":
|
||||
case "KeyD":
|
||||
case "ArrowLeft":
|
||||
case "ArrowRight":
|
||||
case "ArrowUp":
|
||||
case "ArrowDown":
|
||||
case "KeyW": case "KeyA": case "KeyS": case "KeyD":
|
||||
case "ArrowLeft": case "ArrowRight": case "ArrowUp": case "ArrowDown":
|
||||
getMap().handleMapPanning(ev);
|
||||
break;
|
||||
case "Digit1":
|
||||
case "Digit2":
|
||||
case "Digit3":
|
||||
case "Digit4":
|
||||
case "Digit5":
|
||||
case "Digit6":
|
||||
case "Digit7":
|
||||
case "Digit8":
|
||||
case "Digit9":
|
||||
case "Digit1": case "Digit2": case "Digit3": case "Digit4": case "Digit5": case "Digit6": case "Digit7": case "Digit8": case "Digit9":
|
||||
// Using the substring because the key will be invalid when pressing the Shift key
|
||||
if (ev.ctrlKey && ev.shiftKey)
|
||||
getUnitsManager().selectedUnitsAddToHotgroup(parseInt(ev.code.substring(5)));
|
||||
getUnitsManager().selectedUnitsAddToHotgroup(parseInt(ev.code.substring(5)));
|
||||
else if (ev.ctrlKey && !ev.shiftKey)
|
||||
getUnitsManager().selectedUnitsSetHotgroup(parseInt(ev.code.substring(5)));
|
||||
else
|
||||
@ -176,14 +162,7 @@ function setupEvents() {
|
||||
return;
|
||||
}
|
||||
switch (ev.code) {
|
||||
case "KeyW":
|
||||
case "KeyA":
|
||||
case "KeyS":
|
||||
case "KeyD":
|
||||
case "ArrowLeft":
|
||||
case "ArrowRight":
|
||||
case "ArrowUp":
|
||||
case "ArrowDown":
|
||||
case "KeyW": case "KeyA": case "KeyS": case "KeyD": case "ArrowLeft": case "ArrowRight": case "ArrowUp": case "ArrowDown":
|
||||
getMap().handleMapPanning(ev);
|
||||
break;
|
||||
}
|
||||
@ -201,8 +180,8 @@ function setupEvents() {
|
||||
|
||||
document.addEventListener("tryConnection", () => {
|
||||
const form = document.querySelector("#splash-content")?.querySelector("#authentication-form");
|
||||
const username = (<HTMLInputElement> (form?.querySelector("#username"))).value;
|
||||
const password = (<HTMLInputElement> (form?.querySelector("#password"))).value;
|
||||
const username = (<HTMLInputElement>(form?.querySelector("#username"))).value;
|
||||
const password = (<HTMLInputElement>(form?.querySelector("#password"))).value;
|
||||
setCredentials(username, btoa("admin" + ":" + password));
|
||||
|
||||
/* Start periodically requesting updates */
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Map, Marker } from "leaflet";
|
||||
import { DivIcon, Map, Marker } from "leaflet";
|
||||
import { MarkerOptions } from "leaflet";
|
||||
import { LatLngExpression } from "leaflet";
|
||||
|
||||
@ -8,6 +8,7 @@ export class CustomMarker extends Marker {
|
||||
}
|
||||
|
||||
onAdd(map: Map): this {
|
||||
this.setIcon(new DivIcon()); // Default empty icon
|
||||
super.onAdd(map);
|
||||
this.createIcon();
|
||||
return this;
|
||||
|
||||
@ -22,6 +22,7 @@ require("../../public/javascripts/leaflet.nauticscale.js")
|
||||
export const IDLE = "IDLE";
|
||||
export const MOVE_UNIT = "MOVE_UNIT";
|
||||
export const visibilityControls: string[] = ["human", "dcs", "aircraft", "groundunit-sam", "groundunit-other", "navyunit", "airbase"];
|
||||
export const visibilityControlsTootlips: string[] = ["Toggle human players visibility", "Toggle DCS controlled units visibility", "Toggle aircrafts visibility", "Toggle SAM units visibility", "Toggle ground units (not SAM) visibility", "Toggle navy units visibility", "Toggle airbases visibility"];
|
||||
|
||||
export class Map extends L.Map {
|
||||
#state: string;
|
||||
@ -116,7 +117,7 @@ export class Map extends L.Map {
|
||||
|
||||
/* Option buttons */
|
||||
this.#optionButtons["visibility"] = visibilityControls.map((option: string, index: number) => {
|
||||
return this.#createOptionButton(option, `visibility/${option.toLowerCase()}.svg`, "", "toggleUnitVisibility", `{"type": "${option}"}`);
|
||||
return this.#createOptionButton(option, `visibility/${option.toLowerCase()}.svg`, visibilityControlsTootlips[index], "toggleUnitVisibility", `{"type": "${option}"}`);
|
||||
});
|
||||
document.querySelector("#unit-visibility-control")?.append(...this.#optionButtons["visibility"]);
|
||||
}
|
||||
@ -194,7 +195,7 @@ export class Map extends L.Map {
|
||||
})
|
||||
this.#destinationPreviewMarkers = [];
|
||||
|
||||
if (getUnitsManager().getSelectedUnits({ excludeHumans: true }).length < 20) {
|
||||
if (getUnitsManager().getSelectedUnits({ excludeHumans: true }).length > 1 && getUnitsManager().getSelectedUnits({ excludeHumans: true }).length < 20) {
|
||||
/* Create the unit destination preview markers */
|
||||
this.#destinationPreviewMarkers = getUnitsManager().getSelectedUnits({ excludeHumans: true }).map((unit: Unit) => {
|
||||
var marker = new DestinationPreviewMarker(this.getMouseCoordinates());
|
||||
@ -425,6 +426,9 @@ export class Map extends L.Map {
|
||||
getUnitsManager().selectedUnitsClearDestinations();
|
||||
}
|
||||
getUnitsManager().selectedUnitsAddDestination(this.#computeDestinationRotation && this.#destinationRotationCenter != null ? this.#destinationRotationCenter : e.latlng, !e.originalEvent.shiftKey, this.#destinationGroupRotation)
|
||||
this.#destinationGroupRotation = 0;
|
||||
this.#destinationRotationCenter = null;
|
||||
this.#computeDestinationRotation = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -440,18 +444,18 @@ export class Map extends L.Map {
|
||||
#onMouseDown(e: any) {
|
||||
this.hideAllContextMenus();
|
||||
|
||||
if (this.#state == MOVE_UNIT && e.originalEvent.button == 2) {
|
||||
this.#computeDestinationRotation = true;
|
||||
this.#destinationRotationCenter = this.getMouseCoordinates();
|
||||
if (this.#state == MOVE_UNIT) {
|
||||
this.#destinationGroupRotation = 0;
|
||||
this.#destinationRotationCenter = null;
|
||||
this.#computeDestinationRotation = false;
|
||||
if (e.originalEvent.button == 2) {
|
||||
this.#computeDestinationRotation = true;
|
||||
this.#destinationRotationCenter = this.getMouseCoordinates();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#onMouseUp(e: any) {
|
||||
if (this.#state == MOVE_UNIT) {
|
||||
this.#computeDestinationRotation = false;
|
||||
this.#destinationRotationCenter = null;
|
||||
this.#destinationGroupRotation = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#onMouseMove(e: any) {
|
||||
|
||||
@ -18,14 +18,24 @@ export class HotgroupPanel extends Panel {
|
||||
}
|
||||
|
||||
addHotgroup(hotgroup: number) {
|
||||
const hotgroupHtml = `<div class="unit-hotgroup">
|
||||
<div class="unit-hotgroup-id">${hotgroup}</div>
|
||||
</div>
|
||||
x${getUnitsManager().getUnitsByHotgroup(hotgroup).length}`
|
||||
// Hotgroup number
|
||||
var hotgroupDiv = document.createElement("div");
|
||||
hotgroupDiv.classList.add("unit-hotgroup");
|
||||
var idDiv = document.createElement("div");
|
||||
idDiv.classList.add("unit-hotgroup-id");
|
||||
idDiv.innerText = String(hotgroup);
|
||||
hotgroupDiv.appendChild(idDiv);
|
||||
|
||||
// Hotgroup unit count
|
||||
var countDiv = document.createElement("div");
|
||||
countDiv.innerText = `x${getUnitsManager().getUnitsByHotgroup(hotgroup).length}`;
|
||||
|
||||
var el = document.createElement("div");
|
||||
el.appendChild(hotgroupDiv);
|
||||
el.appendChild(countDiv);
|
||||
el.classList.add("hotgroup-selector");
|
||||
el.innerHTML = hotgroupHtml;
|
||||
el.toggleAttribute(`data-hotgroup-${hotgroup}`, true)
|
||||
|
||||
this.getElement().appendChild(el);
|
||||
|
||||
el.addEventListener("click", () => {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { SVGInjector } from "@tanem/svg-injector";
|
||||
import { getUnitsManager } from "..";
|
||||
import { Dropdown } from "../controls/dropdown";
|
||||
import { Slider } from "../controls/slider";
|
||||
@ -346,7 +347,10 @@ export class UnitControlPanel extends Panel {
|
||||
var button = document.createElement("button");
|
||||
button.title = title;
|
||||
button.value = value;
|
||||
button.innerHTML = `<img src="/resources/theme/images/buttons/${url}" />`
|
||||
var img = document.createElement("img");
|
||||
img.src = `/resources/theme/images/buttons/${url}`;
|
||||
img.onload = () => SVGInjector(img);
|
||||
button.appendChild(img);
|
||||
button.addEventListener("click", callback);
|
||||
return button;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import { aircraftDatabase } from './aircraftdatabase';
|
||||
import { groundUnitsDatabase } from './groundunitsdatabase';
|
||||
import { CustomMarker } from '../map/custommarker';
|
||||
import { SVGInjector } from '@tanem/svg-injector';
|
||||
import { UnitDatabase } from './unitdatabase';
|
||||
|
||||
var pathIcon = new Icon({
|
||||
iconUrl: '/resources/theme/images/markers/marker-icon.png',
|
||||
@ -124,17 +125,23 @@ export class Unit extends CustomMarker {
|
||||
return "";
|
||||
}
|
||||
|
||||
getActiveMarkerElements() {
|
||||
// Default values
|
||||
getDatabase(): UnitDatabase | null {
|
||||
// Overloaded by child classes
|
||||
return null;
|
||||
}
|
||||
|
||||
getIconOptions(): UnitIconOptions {
|
||||
// Default values, overloaded by child classes if needed
|
||||
return {
|
||||
state: false,
|
||||
vvi: false,
|
||||
hotgroup: false,
|
||||
unitIcon: true,
|
||||
shortLabel: false,
|
||||
fuel: false,
|
||||
ammo: false,
|
||||
summary: false
|
||||
showState: false,
|
||||
showVvi: false,
|
||||
showHotgroup: false,
|
||||
showUnitIcon: true,
|
||||
showShortLabel: false,
|
||||
showFuel: false,
|
||||
showAmmo: false,
|
||||
showSummary: false,
|
||||
rotateToHeading: false
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,6 +172,7 @@ export class Unit extends CustomMarker {
|
||||
|
||||
setHotgroup(hotgroup: number | null) {
|
||||
this.#hotgroup = hotgroup;
|
||||
this.#updateMarker();
|
||||
}
|
||||
|
||||
getHotgroup() {
|
||||
@ -172,7 +180,7 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
setHighlighted(highlighted: boolean) {
|
||||
if (this.#highlighted != highlighted) {
|
||||
if (this.getSelectable() && this.#highlighted != highlighted) {
|
||||
this.getElement()?.querySelector(`[data-object|="unit"]`)?.toggleAttribute("data-is-highlighted", highlighted);
|
||||
this.#highlighted = highlighted;
|
||||
this.getGroupMembers().forEach((unit: Unit) => unit.setHighlighted(highlighted));
|
||||
@ -297,19 +305,13 @@ export class Unit extends CustomMarker {
|
||||
this.setIcon(icon);
|
||||
|
||||
var el = document.createElement("div");
|
||||
el.classList.add("unit");
|
||||
el.setAttribute("data-object", `unit-${this.getMarkerCategory()}`);
|
||||
el.setAttribute("data-coalition", this.getMissionData().coalition);
|
||||
|
||||
// Generate and append elements depending on active options
|
||||
// State icon
|
||||
if (this.getActiveMarkerElements().state){
|
||||
var state = document.createElement("div");
|
||||
state.classList.add("unit-state");
|
||||
el.appendChild(state);
|
||||
}
|
||||
|
||||
// Generate and append elements depending on active options
|
||||
// Velocity vector
|
||||
if (this.getActiveMarkerElements().vvi) {
|
||||
if (this.getIconOptions().showVvi) {
|
||||
var vvi = document.createElement("div");
|
||||
vvi.classList.add("unit-vvi");
|
||||
vvi.toggleAttribute("data-rotate-to-heading");
|
||||
@ -317,7 +319,7 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
// Hotgroup indicator
|
||||
if (this.getActiveMarkerElements().hotgroup) {
|
||||
if (this.getIconOptions().showHotgroup) {
|
||||
var hotgroup = document.createElement("div");
|
||||
hotgroup.classList.add("unit-hotgroup");
|
||||
var hotgroupId = document.createElement("div");
|
||||
@ -327,26 +329,34 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
// Main icon
|
||||
if (this.getActiveMarkerElements().unitIcon) {
|
||||
if (this.getIconOptions().showUnitIcon) {
|
||||
var unitIcon = document.createElement("div");
|
||||
unitIcon.classList.add("unit-icon");
|
||||
var img = document.createElement("img");
|
||||
img.src = `/resources/theme/images/units/${this.getMarkerCategory()}.svg`;
|
||||
img.onload = () => SVGInjector(img);
|
||||
unitIcon.appendChild(img);
|
||||
unitIcon.toggleAttribute("data-rotate-to-heading", this.getIconOptions().rotateToHeading);
|
||||
el.append(unitIcon);
|
||||
}
|
||||
|
||||
// State icon
|
||||
if (this.getIconOptions().showState){
|
||||
var state = document.createElement("div");
|
||||
state.classList.add("unit-state");
|
||||
el.appendChild(state);
|
||||
}
|
||||
|
||||
// Short label
|
||||
if (this.getActiveMarkerElements().shortLabel) {
|
||||
if (this.getIconOptions().showShortLabel) {
|
||||
var shortLabel = document.createElement("div");
|
||||
shortLabel.classList.add("unit-short-label");
|
||||
shortLabel.innerText = aircraftDatabase.getByName(this.getBaseData().name)?.shortLabel || ""; //TODO: fix, use correct database
|
||||
shortLabel.innerText = this.getDatabase()?.getByName(this.getBaseData().name)?.shortLabel || "";
|
||||
el.append(shortLabel);
|
||||
}
|
||||
|
||||
// Fuel indicator
|
||||
if (this.getActiveMarkerElements().fuel) {
|
||||
if (this.getIconOptions().showFuel) {
|
||||
var fuelIndicator = document.createElement("div");
|
||||
fuelIndicator.classList.add("unit-fuel");
|
||||
var fuelLevel = document.createElement("div");
|
||||
@ -356,7 +366,7 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
// Ammo indicator
|
||||
if (this.getActiveMarkerElements().ammo){
|
||||
if (this.getIconOptions().showAmmo){
|
||||
var ammoIndicator = document.createElement("div");
|
||||
ammoIndicator.classList.add("unit-ammo");
|
||||
for (let i = 0; i <= 3; i++)
|
||||
@ -365,7 +375,7 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
// Unit summary
|
||||
if (this.getActiveMarkerElements().summary) {
|
||||
if (this.getIconOptions().showSummary) {
|
||||
var summary = document.createElement("div");
|
||||
summary.classList.add("unit-summary");
|
||||
var callsign = document.createElement("div");
|
||||
@ -544,18 +554,18 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
#onContextMenu(e: any) {
|
||||
var options: { [key: string]: string } = {};
|
||||
var options: {[key: string]: {text: string, tooltip: string}} = {};
|
||||
|
||||
options["Center"] = `<div id="center-map">Center map</div>`;
|
||||
options["center-map"] = {text: "Center map", tooltip: "Center the map on the unit and follow it"};
|
||||
|
||||
if (getUnitsManager().getSelectedUnits().length > 0 && !(getUnitsManager().getSelectedUnits().length == 1 && (getUnitsManager().getSelectedUnits().includes(this)))) {
|
||||
options['Attack'] = `<div id="attack">Attack</div>`;
|
||||
options["attack"] = {text: "Attack", tooltip: "Attack the unit using A/A or A/G weapons"};
|
||||
if (getUnitsManager().getSelectedUnitsType() === "Aircraft")
|
||||
options['Follow'] = `<div id="follow">Follow</div>`;
|
||||
options["follow"] = {text: "Follow", tooltip: "Follow the unit at a user defined distance and position"};;
|
||||
}
|
||||
else if ((getUnitsManager().getSelectedUnits().length > 0 && (getUnitsManager().getSelectedUnits().includes(this))) || getUnitsManager().getSelectedUnits().length == 0) {
|
||||
if (this.getBaseData().category == "Aircraft") {
|
||||
options["Refuel"] = `<div id="refuel">Refuel</div>`; // TODO Add some way of knowing which aircraft can AAR
|
||||
options["refuel"] = {text: "AAR Refuel", tooltip: "Refuel unit at the nearest AAR Tanker. If no tanker is available the unit will RTB."}; // TODO Add some way of knowing which aircraft can AAR
|
||||
}
|
||||
}
|
||||
|
||||
@ -569,28 +579,28 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
#executeAction(e: any, action: string) {
|
||||
if (action === "Center")
|
||||
if (action === "center-map")
|
||||
getMap().centerOnUnit(this.ID);
|
||||
if (action === "Attack")
|
||||
if (action === "attack")
|
||||
getUnitsManager().selectedUnitsAttackUnit(this.ID);
|
||||
else if (action === "Refuel")
|
||||
else if (action === "refuel")
|
||||
getUnitsManager().selectedUnitsRefuel();
|
||||
else if (action === "Follow")
|
||||
else if (action === "follow")
|
||||
this.#showFollowOptions(e);
|
||||
}
|
||||
|
||||
#showFollowOptions(e: any) {
|
||||
var options: { [key: string]: string } = {};
|
||||
var options: {[key: string]: {text: string, tooltip: string}} = {};
|
||||
|
||||
options = {
|
||||
'Trail': `<div id="trail">Trail</div>`,
|
||||
'Echelon (LH)': `<div id="echelon-lh">Echelon (left)</div>`,
|
||||
'Echelon (RH)': `<div id="echelon-rh">Echelon (right)</div>`,
|
||||
'Line abreast (LH)': `<div id="line-abreast">Line abreast (left)</div>`,
|
||||
'Line abreast (RH)': `<div id="line-abreast">Line abreast (right)</div>`,
|
||||
'Front': `<div id="front">In front</div>`,
|
||||
'Diamond': `<div id="diamond">Diamond</div>`,
|
||||
'Custom': `<div id="custom">Custom</div>`
|
||||
'trail': {text: "Trail", tooltip: "Follow unit in trail formation"},
|
||||
'echelon-lh': {text: "Echelon (LH)", tooltip: "Follow unit in echelon left formation"},
|
||||
'echelon-rh': {text: "Echelon (RH)", tooltip: "Follow unit in echelon right formation"},
|
||||
'line-abreast-lh': {text: "Line abreast (LH)", tooltip: "Follow unit in line abreast left formation"},
|
||||
'line-abreast-rh': {text: "Line abreast (RH)", tooltip: "Follow unit in line abreast right formation"},
|
||||
'front': {text: "Front", tooltip: "Fly in front of unit"},
|
||||
'diamond': {text: "Diamond", tooltip: "Follow unit in diamond formation"},
|
||||
'custom': {text: "Custom", tooltip: "Set a custom formation position"},
|
||||
}
|
||||
|
||||
getMap().getUnitContextMenu().setOptions(options, (option: string) => {
|
||||
@ -601,7 +611,7 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
#applyFollowOptions(action: string) {
|
||||
if (action === "Custom") {
|
||||
if (action === "custom") {
|
||||
document.getElementById("custom-formation-dialog")?.classList.remove("hide");
|
||||
getMap().getUnitContextMenu().setCustomFormationCallback((offset: { x: number, y: number, z: number }) => {
|
||||
getUnitsManager().selectedUnitsFollowUnit(this.ID, offset);
|
||||
@ -657,18 +667,18 @@ export class Unit extends CustomMarker {
|
||||
element.querySelector(".unit")?.toggleAttribute("data-is-dead", !this.getBaseData().alive);
|
||||
|
||||
/* Set current unit state */
|
||||
if (this.getMissionData().flags.Human) // Unit is human
|
||||
if (this.getMissionData().flags.Human) // Unit is human
|
||||
element.querySelector(".unit")?.setAttribute("data-state", "human");
|
||||
else if (!this.getBaseData().AI) // Unit is under DCS control (not Olympus)
|
||||
else if (!this.getBaseData().AI) // Unit is under DCS control (not Olympus)
|
||||
element.querySelector(".unit")?.setAttribute("data-state", "dcs");
|
||||
else // Unit is under Olympus control
|
||||
else // Unit is under Olympus control
|
||||
element.querySelector(".unit")?.setAttribute("data-state", this.getTaskData().currentState.toLowerCase());
|
||||
|
||||
/* Set altitude and speed */
|
||||
if (element.querySelector(".unit-altitude"))
|
||||
(<HTMLElement>element.querySelector(".unit-altitude")).innerText = "FL" + String(Math.floor(this.getFlightData().altitude / 0.3048 / 100));
|
||||
if (element.querySelector(".unit-speed"))
|
||||
(<HTMLElement>element.querySelector(".unit-speed")).innerHTML = String(Math.floor(this.getFlightData().speed * 1.94384));
|
||||
(<HTMLElement>element.querySelector(".unit-speed")).innerText = String(Math.floor(this.getFlightData().speed * 1.94384));
|
||||
|
||||
/* Rotate elements according to heading */
|
||||
element.querySelectorAll("[data-rotate-to-heading]").forEach(el => {
|
||||
@ -791,16 +801,17 @@ export class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
export class AirUnit extends Unit {
|
||||
getActiveMarkerElements() {
|
||||
getIconOptions() {
|
||||
return {
|
||||
state: true,
|
||||
vvi: true,
|
||||
hotgroup: true,
|
||||
unitIcon: true,
|
||||
shortLabel: true,
|
||||
fuel: true,
|
||||
ammo: true,
|
||||
summary: true
|
||||
showState: true,
|
||||
showVvi: true,
|
||||
showHotgroup: true,
|
||||
showUnitIcon: true,
|
||||
showShortLabel: true,
|
||||
showFuel: true,
|
||||
showAmmo: true,
|
||||
showSummary: true,
|
||||
rotateToHeading: false
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -813,6 +824,10 @@ export class Aircraft extends AirUnit {
|
||||
getMarkerCategory() {
|
||||
return "aircraft";
|
||||
}
|
||||
|
||||
getDatabase(): UnitDatabase | null {
|
||||
return aircraftDatabase;
|
||||
}
|
||||
}
|
||||
|
||||
export class Helicopter extends AirUnit {
|
||||
@ -830,16 +845,17 @@ export class GroundUnit extends Unit {
|
||||
super(ID, data);
|
||||
}
|
||||
|
||||
getActiveMarkerElements() {
|
||||
getIconOptions() {
|
||||
return {
|
||||
state: true,
|
||||
vvi: false,
|
||||
hotgroup: true,
|
||||
unitIcon: true,
|
||||
shortLabel: true,
|
||||
fuel: false,
|
||||
ammo: false,
|
||||
summary: false
|
||||
showState: true,
|
||||
showVvi: false,
|
||||
showHotgroup: true,
|
||||
showUnitIcon: true,
|
||||
showShortLabel: true,
|
||||
showFuel: false,
|
||||
showAmmo: false,
|
||||
showSummary: false,
|
||||
rotateToHeading: false
|
||||
};
|
||||
}
|
||||
|
||||
@ -849,6 +865,10 @@ export class GroundUnit extends Unit {
|
||||
var markerCategory = (role === "SAM") ? "groundunit-sam" : "groundunit-other";
|
||||
return markerCategory;
|
||||
}
|
||||
|
||||
getDatabase(): UnitDatabase | null {
|
||||
return groundUnitsDatabase;
|
||||
}
|
||||
}
|
||||
|
||||
export class NavyUnit extends Unit {
|
||||
@ -856,16 +876,17 @@ export class NavyUnit extends Unit {
|
||||
super(ID, data);
|
||||
}
|
||||
|
||||
getActiveMarkerElements() {
|
||||
getIconOptions() {
|
||||
return {
|
||||
state: true,
|
||||
vvi: false,
|
||||
hotgroup: true,
|
||||
unitIcon: true,
|
||||
shortLabel: true,
|
||||
fuel: false,
|
||||
ammo: false,
|
||||
summary: false
|
||||
showState: true,
|
||||
showVvi: false,
|
||||
showHotgroup: true,
|
||||
showUnitIcon: true,
|
||||
showShortLabel: true,
|
||||
showFuel: false,
|
||||
showAmmo: false,
|
||||
showSummary: false,
|
||||
rotateToHeading: false
|
||||
};
|
||||
}
|
||||
|
||||
@ -879,6 +900,20 @@ export class Weapon extends Unit {
|
||||
super(ID, data);
|
||||
this.setSelectable(false);
|
||||
}
|
||||
|
||||
getIconOptions() {
|
||||
return {
|
||||
showState: false,
|
||||
showVvi: false,
|
||||
showHotgroup: false,
|
||||
showUnitIcon: true,
|
||||
showShortLabel: false,
|
||||
showFuel: false,
|
||||
showAmmo: false,
|
||||
showSummary: false,
|
||||
rotateToHeading: true
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class Missile extends Weapon {
|
||||
|
||||
@ -1,21 +1,16 @@
|
||||
export class UnitDatabase {
|
||||
blueprints: {[key: string]: UnitBlueprint} = {};
|
||||
blueprints: { [key: string]: UnitBlueprint } = {};
|
||||
|
||||
constructor()
|
||||
{
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
/* Returns a list of all possible roles in a database */
|
||||
getRoles()
|
||||
{
|
||||
getRoles() {
|
||||
var roles: string[] = [];
|
||||
for (let unit in this.blueprints)
|
||||
{
|
||||
for (let loadout of this.blueprints[unit].loadouts)
|
||||
{
|
||||
for (let role of loadout.roles)
|
||||
{
|
||||
for (let unit in this.blueprints) {
|
||||
for (let loadout of this.blueprints[unit].loadouts) {
|
||||
for (let role of loadout.roles) {
|
||||
if (role !== "" && !roles.includes(role))
|
||||
roles.push(role);
|
||||
}
|
||||
@ -25,18 +20,15 @@ export class UnitDatabase {
|
||||
}
|
||||
|
||||
/* Gets a specific blueprint by name */
|
||||
getByName(name: string)
|
||||
{
|
||||
getByName(name: string) {
|
||||
if (name in this.blueprints)
|
||||
return this.blueprints[name];
|
||||
return null;
|
||||
}
|
||||
|
||||
/* Gets a specific blueprint by label */
|
||||
getByLabel(label: string)
|
||||
{
|
||||
for (let unit in this.blueprints)
|
||||
{
|
||||
getByLabel(label: string) {
|
||||
for (let unit in this.blueprints) {
|
||||
if (this.blueprints[unit].label === label)
|
||||
return this.blueprints[unit];
|
||||
}
|
||||
@ -44,15 +36,11 @@ export class UnitDatabase {
|
||||
}
|
||||
|
||||
/* Get all blueprints by role */
|
||||
getByRole(role: string)
|
||||
{
|
||||
getByRole(role: string) {
|
||||
var units = [];
|
||||
for (let unit in this.blueprints)
|
||||
{
|
||||
for (let loadout of this.blueprints[unit].loadouts)
|
||||
{
|
||||
if (loadout.roles.includes(role) || loadout.roles.includes(role.toLowerCase()))
|
||||
{
|
||||
for (let unit in this.blueprints) {
|
||||
for (let loadout of this.blueprints[unit].loadouts) {
|
||||
if (loadout.roles.includes(role) || loadout.roles.includes(role.toLowerCase())) {
|
||||
units.push(this.blueprints[unit])
|
||||
break;
|
||||
}
|
||||
@ -62,13 +50,10 @@ export class UnitDatabase {
|
||||
}
|
||||
|
||||
/* Get the names of all the loadouts for a specific unit and for a specific role */
|
||||
getLoadoutNamesByRole(name: string, role: string)
|
||||
{
|
||||
getLoadoutNamesByRole(name: string, role: string) {
|
||||
var loadouts = [];
|
||||
for (let loadout of this.blueprints[name].loadouts)
|
||||
{
|
||||
if (loadout.roles.includes(role) || loadout.roles.includes(""))
|
||||
{
|
||||
for (let loadout of this.blueprints[name].loadouts) {
|
||||
if (loadout.roles.includes(role) || loadout.roles.includes("")) {
|
||||
loadouts.push(loadout.name)
|
||||
}
|
||||
}
|
||||
@ -76,10 +61,8 @@ export class UnitDatabase {
|
||||
}
|
||||
|
||||
/* Get the loadout content from the unit name and loadout name */
|
||||
getLoadoutByName(name: string, loadoutName: string)
|
||||
{
|
||||
for (let loadout of this.blueprints[name].loadouts)
|
||||
{
|
||||
getLoadoutByName(name: string, loadoutName: string) {
|
||||
for (let loadout of this.blueprints[name].loadouts) {
|
||||
if (loadout.name === loadoutName)
|
||||
return loadout;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
getUnitsByHotgroup(hotgroup: number) {
|
||||
return Object.values(this.#units).filter((unit: Unit) => {return unit.getBaseData().alive && unit.getHotgroup() == hotgroup});
|
||||
return Object.values(this.#units).filter((unit: Unit) => { return unit.getBaseData().alive && unit.getHotgroup() == hotgroup });
|
||||
}
|
||||
|
||||
addUnit(ID: number, data: UnitData) {
|
||||
@ -88,10 +88,8 @@ export class UnitsManager {
|
||||
});
|
||||
}
|
||||
|
||||
setHiddenType(key: string, value: boolean)
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
setHiddenType(key: string, value: boolean) {
|
||||
if (value) {
|
||||
if (this.#hiddenTypes.includes(key))
|
||||
delete this.#hiddenTypes[this.#hiddenTypes.indexOf(key)];
|
||||
}
|
||||
@ -100,8 +98,7 @@ export class UnitsManager {
|
||||
Object.values(this.getUnits()).forEach((unit: Unit) => unit.updateVisibility());
|
||||
}
|
||||
|
||||
getHiddenTypes()
|
||||
{
|
||||
getHiddenTypes() {
|
||||
return this.#hiddenTypes;
|
||||
}
|
||||
|
||||
@ -123,7 +120,7 @@ export class UnitsManager {
|
||||
}
|
||||
}
|
||||
|
||||
getSelectedUnits(options?: {excludeHumans?: boolean}) {
|
||||
getSelectedUnits(options?: { excludeHumans?: boolean }) {
|
||||
var selectedUnits = [];
|
||||
for (let ID in this.#units) {
|
||||
if (this.#units[ID].getSelected()) {
|
||||
@ -132,7 +129,7 @@ export class UnitsManager {
|
||||
}
|
||||
if (options) {
|
||||
if (options.excludeHumans)
|
||||
selectedUnits = selectedUnits.filter((unit: Unit) => {return !unit.getMissionData().flags.Human});
|
||||
selectedUnits = selectedUnits.filter((unit: Unit) => { return !unit.getMissionData().flags.Human });
|
||||
}
|
||||
return selectedUnits;
|
||||
}
|
||||
@ -190,14 +187,14 @@ export class UnitsManager {
|
||||
|
||||
/*********************** Actions on selected units ************************/
|
||||
selectedUnitsAddDestination(latlng: L.LatLng, mantainRelativePosition: boolean, rotation: number) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
|
||||
/* Compute the destination for each unit. If mantainRelativePosition is true, compute the destination so to hold the relative distances */
|
||||
var unitDestinations: {[key: number]: LatLng} = {};
|
||||
var unitDestinations: { [key: number]: LatLng } = {};
|
||||
if (mantainRelativePosition)
|
||||
unitDestinations = this.selectedUnitsComputeGroupDestination(latlng, rotation);
|
||||
else
|
||||
selectedUnits.forEach((unit: Unit) => {unitDestinations[unit.ID] = latlng});
|
||||
selectedUnits.forEach((unit: Unit) => { unitDestinations[unit.ID] = latlng });
|
||||
|
||||
for (let idx in selectedUnits) {
|
||||
const unit = selectedUnits[idx];
|
||||
@ -206,7 +203,7 @@ export class UnitsManager {
|
||||
const leader = this.getUnitByID(unit.getFormationData().leaderID)
|
||||
if (leader && leader.getSelected())
|
||||
leader.addDestination(latlng);
|
||||
else
|
||||
else
|
||||
unit.addDestination(latlng);
|
||||
}
|
||||
else {
|
||||
@ -219,7 +216,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsClearDestinations() {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
const unit = selectedUnits[idx];
|
||||
if (unit.getTaskData().currentState === "Follow") {
|
||||
@ -235,7 +232,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsLandAt(latlng: LatLng) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].landAt(latlng);
|
||||
}
|
||||
@ -243,21 +240,21 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsChangeSpeed(speedChange: string) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].changeSpeed(speedChange);
|
||||
}
|
||||
}
|
||||
|
||||
selectedUnitsChangeAltitude(altitudeChange: string) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].changeAltitude(altitudeChange);
|
||||
}
|
||||
}
|
||||
|
||||
selectedUnitsSetSpeed(speed: number) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].setSpeed(speed);
|
||||
}
|
||||
@ -265,7 +262,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsSetAltitude(altitude: number) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].setAltitude(altitude);
|
||||
}
|
||||
@ -273,7 +270,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsSetROE(ROE: string) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].setROE(ROE);
|
||||
}
|
||||
@ -281,7 +278,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsSetReactionToThreat(reactionToThreat: string) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].setReactionToThreat(reactionToThreat);
|
||||
}
|
||||
@ -289,7 +286,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsSetEmissionsCountermeasures(emissionCountermeasure: string) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].setEmissionsCountermeasures(emissionCountermeasure);
|
||||
}
|
||||
@ -298,7 +295,7 @@ export class UnitsManager {
|
||||
|
||||
|
||||
selectedUnitsAttackUnit(ID: number) {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].attackUnit(ID);
|
||||
}
|
||||
@ -314,7 +311,7 @@ export class UnitsManager {
|
||||
}
|
||||
|
||||
selectedUnitsRefuel() {
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].refuel();
|
||||
}
|
||||
@ -328,15 +325,15 @@ export class UnitsManager {
|
||||
// Y: top-bottom, positive top
|
||||
// Z: left-right, positive right
|
||||
offset = { "x": 0, "y": 0, "z": 0 };
|
||||
if (formation === "Trail") { offset.x = -50; offset.y = -30; offset.z = 0; }
|
||||
else if (formation === "Echelon (LH)") { offset.x = -50; offset.y = -10; offset.z = -50; }
|
||||
else if (formation === "Echelon (RH)") { offset.x = -50; offset.y = -10; offset.z = 50; }
|
||||
else if (formation === "Line abreast (RH)") { offset.x = 0; offset.y = 0; offset.z = 50; }
|
||||
else if (formation === "Line abreast (LH)") { offset.x = 0; offset.y = 0; offset.z = -50; }
|
||||
else if (formation === "Front") { offset.x = 100; offset.y = 0; offset.z = 0; }
|
||||
if (formation === "trail") { offset.x = -50; offset.y = -30; offset.z = 0; }
|
||||
else if (formation === "echelon-lh") { offset.x = -50; offset.y = -10; offset.z = -50; }
|
||||
else if (formation === "echelon-rh") { offset.x = -50; offset.y = -10; offset.z = 50; }
|
||||
else if (formation === "line-abreast-rh") { offset.x = 0; offset.y = 0; offset.z = 50; }
|
||||
else if (formation === "line-abreast-lh") { offset.x = 0; offset.y = 0; offset.z = -50; }
|
||||
else if (formation === "front") { offset.x = 100; offset.y = 0; offset.z = 0; }
|
||||
else offset = undefined;
|
||||
}
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
var count = 1;
|
||||
var xr = 0; var yr = 1; var zr = -1;
|
||||
var layer = 1;
|
||||
@ -347,7 +344,7 @@ export class UnitsManager {
|
||||
unit.followUnit(ID, { "x": offset.x * count, "y": offset.y * count, "z": offset.z * count });
|
||||
else {
|
||||
/* More complex formations with variable offsets */
|
||||
if (formation === "Diamond") {
|
||||
if (formation === "diamond") {
|
||||
var xl = xr * Math.cos(Math.PI / 4) - yr * Math.sin(Math.PI / 4);
|
||||
var yl = xr * Math.sin(Math.PI / 4) + yr * Math.cos(Math.PI / 4);
|
||||
unit.followUnit(ID, { "x": -yl * 50, "y": zr * 10, "z": xl * 50 });
|
||||
@ -364,14 +361,12 @@ export class UnitsManager {
|
||||
this.#showActionMessage(selectedUnits, `following unit ${this.getUnitByID(ID)?.getBaseData().unitName}`);
|
||||
}
|
||||
|
||||
selectedUnitsSetHotgroup(hotgroup: number)
|
||||
{
|
||||
selectedUnitsSetHotgroup(hotgroup: number) {
|
||||
this.getUnitsByHotgroup(hotgroup).forEach((unit: Unit) => unit.setHotgroup(null));
|
||||
this.selectedUnitsAddToHotgroup(hotgroup);
|
||||
}
|
||||
|
||||
selectedUnitsAddToHotgroup(hotgroup: number)
|
||||
{
|
||||
selectedUnitsAddToHotgroup(hotgroup: number) {
|
||||
var selectedUnits = this.getSelectedUnits();
|
||||
for (let idx in selectedUnits) {
|
||||
selectedUnits[idx].setHotgroup(hotgroup);
|
||||
@ -380,11 +375,10 @@ export class UnitsManager {
|
||||
getHotgroupPanel().refreshHotgroups();
|
||||
}
|
||||
|
||||
selectedUnitsComputeGroupDestination(latlng: LatLng, rotation: number)
|
||||
{
|
||||
var selectedUnits = this.getSelectedUnits({excludeHumans: true});
|
||||
selectedUnitsComputeGroupDestination(latlng: LatLng, rotation: number) {
|
||||
var selectedUnits = this.getSelectedUnits({ excludeHumans: true });
|
||||
/* Compute the center of the group */
|
||||
var center = {x: 0, y: 0};
|
||||
var center = { x: 0, y: 0 };
|
||||
selectedUnits.forEach((unit: Unit) => {
|
||||
var mercator = latLngToMercator(unit.getFlightData().latitude, unit.getFlightData().longitude);
|
||||
center.x += mercator.x / selectedUnits.length;
|
||||
@ -392,20 +386,19 @@ export class UnitsManager {
|
||||
});
|
||||
|
||||
/* Compute the distances from the center of the group */
|
||||
|
||||
var unitDestinations: {[key: number]: LatLng} = {};
|
||||
var unitDestinations: { [key: number]: LatLng } = {};
|
||||
selectedUnits.forEach((unit: Unit) => {
|
||||
var mercator = latLngToMercator(unit.getFlightData().latitude, unit.getFlightData().longitude);
|
||||
var distancesFromCenter = {dx: mercator.x - center.x, dy: mercator.y - center.y};
|
||||
var distancesFromCenter = { dx: mercator.x - center.x, dy: mercator.y - center.y };
|
||||
|
||||
/* Rotate the distance according to the group rotation */
|
||||
var rotatedDistancesFromCenter: {dx: number, dy: number} = {dx: 0, dy: 0};
|
||||
var rotatedDistancesFromCenter: { dx: number, dy: number } = { dx: 0, dy: 0 };
|
||||
rotatedDistancesFromCenter.dx = distancesFromCenter.dx * Math.cos(deg2rad(rotation)) - distancesFromCenter.dy * Math.sin(deg2rad(rotation));
|
||||
rotatedDistancesFromCenter.dy = distancesFromCenter.dx * Math.sin(deg2rad(rotation)) + distancesFromCenter.dy * Math.cos(deg2rad(rotation));
|
||||
|
||||
/* Compute the final position of the unit */
|
||||
var destMercator = latLngToMercator(latlng.lat, latlng.lng); // Convert destination point to mercator
|
||||
var unitMercator = {x: destMercator.x + rotatedDistancesFromCenter.dx, y: destMercator.y + rotatedDistancesFromCenter.dy}; // Compute final position of this unit in mercator coordinates
|
||||
var unitMercator = { x: destMercator.x + rotatedDistancesFromCenter.dx, y: destMercator.y + rotatedDistancesFromCenter.dy }; // Compute final position of this unit in mercator coordinates
|
||||
var unitLatLng = mercatorToLatLng(unitMercator.x, unitMercator.y);
|
||||
unitDestinations[unit.ID] = new LatLng(unitLatLng.lat, unitLatLng.lng);
|
||||
});
|
||||
|
||||
@ -524,6 +524,7 @@ function Olympus.setMissionData(arg, time)
|
||||
bullseyes[i] = {}
|
||||
bullseyes[i]["latitude"] = bullseyeLatitude
|
||||
bullseyes[i]["longitude"] = bullseyeLongitude
|
||||
bullseyes[i]["coalition"] = Olympus.getCoalitionByCoalitionID(i)
|
||||
end
|
||||
|
||||
-- Units tactical data
|
||||
@ -589,14 +590,7 @@ function Olympus.setMissionData(arg, time)
|
||||
local info = {}
|
||||
local latitude, longitude, altitude = coord.LOtoLL(Airbase.getPoint(base[i]))
|
||||
info["callsign"] = Airbase.getCallsign(base[i])
|
||||
local coalitionID = Airbase.getCoalition(base[i])
|
||||
if coalitionID == 0 then
|
||||
info["coalition"] = "neutral"
|
||||
elseif coalitionID == 1 then
|
||||
info["coalition"] = "red"
|
||||
else
|
||||
info["coalition"] = "blue"
|
||||
end
|
||||
info["coalition"] = Olympus.getCoalitionByCoalitionID(Airbase.getCoalition(base[i]))
|
||||
info["latitude"] = latitude
|
||||
info["longitude"] = longitude
|
||||
if Airbase.getUnit(base[i]) then
|
||||
|
||||