mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added tanker and off state icons
This commit is contained in:
parent
a038d6e999
commit
ebee6610a3
@ -295,6 +295,16 @@
|
||||
background-image: url("/resources/theme/images/states/no-task.svg");
|
||||
}
|
||||
|
||||
[data-object|="unit"][data-state="off"] .unit-state {
|
||||
background-image: url("/resources/theme/images/states/off.svg");
|
||||
}
|
||||
|
||||
|
||||
[data-object|="unit"][data-state="tanker"] .unit-state {
|
||||
background-image: url("/resources/theme/images/states/tanker.svg");
|
||||
}
|
||||
|
||||
|
||||
/*** Dead unit ***/
|
||||
[data-object|="unit"][data-is-dead] .unit-selected-spotlight,
|
||||
[data-object|="unit"][data-is-dead] .unit-short-label,
|
||||
|
||||
65
client/public/themes/olympus/images/states/off.svg
Normal file
65
client/public/themes/olympus/images/states/off.svg
Normal file
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="19"
|
||||
height="15"
|
||||
viewBox="0 0 19 15"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg6"
|
||||
sodipodi:docname="off.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="defs10" />
|
||||
<sodipodi:namedview
|
||||
id="namedview8"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="19.610428"
|
||||
inkscape:cx="9.9691859"
|
||||
inkscape:cy="8.5413741"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg6" />
|
||||
<path
|
||||
style="fill:none;stroke:#262626;stroke-width:5.24218;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 3.0879876,3.12136 h 3.64493 L 3.0577919,6.6693495 h 3.6373077"
|
||||
id="path2294-5-2-7"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#faffff;stroke-width:1.45616px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="m 3.0879876,3.12136 h 3.64493 L 3.0577919,6.6693495 h 3.6373077"
|
||||
id="path2294-0-0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#262626;stroke-width:5.24218;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 7.8695831,5.8697467 H 11.514514 L 7.8393874,9.4177362 h 3.6373086"
|
||||
id="path2294-5-2"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#faffff;stroke-width:1.45616px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 7.8695831,5.8697467 H 11.514514 L 7.8393874,9.4177362 h 3.6373086"
|
||||
id="path2294-0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#262626;stroke-width:5.24218;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 12.62373,8.6286342 h 3.64493 l -3.675126,3.5479888 h 3.637308"
|
||||
id="path2294-5-2-0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#faffff;stroke-width:1.45616px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="m 12.62373,8.6286342 h 3.64493 l -3.675126,3.5479888 h 3.637308"
|
||||
id="path2294-0-3"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
77
client/public/themes/olympus/images/states/tanker.svg
Normal file
77
client/public/themes/olympus/images/states/tanker.svg
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="19"
|
||||
height="15"
|
||||
viewBox="0 0 19 15"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg6"
|
||||
sodipodi:docname="tanker.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="defs10" />
|
||||
<sodipodi:namedview
|
||||
id="namedview8"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="39.220856"
|
||||
inkscape:cx="9.7269678"
|
||||
inkscape:cy="8.2226661"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg6" />
|
||||
<circle
|
||||
style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:5.6;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
id="path3770-9"
|
||||
cx="9.6203575"
|
||||
cy="12.305709"
|
||||
r="2.7614126"
|
||||
transform="rotate(-15.856279)" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 16.324548,12.175881 15.276455,8.4858326"
|
||||
id="path4303-4" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 13.139727,6.4687226 4.9398446,2.7015716"
|
||||
id="path4305-3"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<circle
|
||||
style="fill:none;stroke:#ffffff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:5.6;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
id="path3770"
|
||||
cx="9.6203575"
|
||||
cy="12.305709"
|
||||
r="2.7614126"
|
||||
transform="rotate(-15.856279)" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 16.324547,12.175881 15.276454,8.4858326"
|
||||
id="path4303" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 13.139727,6.4687226 4.9398446,2.7015716"
|
||||
id="path4305"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 3.1921806,7.8893766 -1.346436,3.4161044 c -1.06976036,3.041593 3.897171,3.083564 2.699761,0 z"
|
||||
id="path4659"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#fffffd;stroke-width:0.998182;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 3.2037126,10.332473 -0.559996,1.42079 c -0.444923,1.265028 1.620872,1.282484 1.122857,0 z"
|
||||
id="path4659-0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@ -1002,14 +1002,26 @@ export class Unit extends CustomMarker {
|
||||
element.querySelector(".unit")?.toggleAttribute("data-is-dead", !this.#alive);
|
||||
|
||||
/* Set current unit state */
|
||||
if (this.#human) // Unit is human
|
||||
if (this.#human) { // Unit is human
|
||||
element.querySelector(".unit")?.setAttribute("data-state", "human");
|
||||
else if (!this.#controlled) // Unit is under DCS control (not Olympus)
|
||||
}
|
||||
else if (!this.#controlled) { // Unit is under DCS control (not Olympus)
|
||||
element.querySelector(".unit")?.setAttribute("data-state", "dcs");
|
||||
else if ((this.getCategory() == "Aircraft" || this.getCategory() == "Helicopter") && !this.#hasTask)
|
||||
}
|
||||
else if ((this.getCategory() == "Aircraft" || this.getCategory() == "Helicopter") && !this.#hasTask){
|
||||
element.querySelector(".unit")?.setAttribute("data-state", "no-task");
|
||||
else // Unit is under Olympus control
|
||||
element.querySelector(".unit")?.setAttribute("data-state", this.#state.toLowerCase());
|
||||
}
|
||||
else { // Unit is under Olympus control
|
||||
if (this.#onOff) {
|
||||
if (this.#isTanker)
|
||||
element.querySelector(".unit")?.setAttribute("data-state", "tanker");
|
||||
else
|
||||
element.querySelector(".unit")?.setAttribute("data-state", this.#state.toLowerCase());
|
||||
}
|
||||
else {
|
||||
element.querySelector(".unit")?.setAttribute("data-state", "off");
|
||||
}
|
||||
}
|
||||
|
||||
/* Set altitude and speed */
|
||||
if (element.querySelector(".unit-altitude"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user