add heavy missiles to the printShip
This commit is contained in:
parent
44fdad6bff
commit
87b93469b2
@ -0,0 +1,52 @@
|
||||
<div class="heavyMissile">
|
||||
<Arcs selected={arcs} size={40}>
|
||||
<image href="/icons/heavy-missile.svg" width="10" x="16" y="7" />
|
||||
</Arcs>
|
||||
<div>
|
||||
{#if extended}
|
||||
<div>extended range</div>
|
||||
{/if}
|
||||
{#if multiStage}
|
||||
<div>multi-stage</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
import Arcs from "$lib/components/ShipEdit/Weaponry/Weapon/Arcs.svelte";
|
||||
export let arcs = [];
|
||||
export let extended = false;
|
||||
export let multiStage = false;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.torpedo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.weaponClass {
|
||||
text-align: center;
|
||||
background-color: black;
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
width: 20px;
|
||||
}
|
||||
div {
|
||||
margin: 0px 0.5rem;
|
||||
}
|
||||
div :global(path.arc) {
|
||||
fill: none;
|
||||
}
|
||||
div :global(path.active) {
|
||||
fill: black;
|
||||
}
|
||||
div :global(path.active:hover) {
|
||||
fill: black;
|
||||
}
|
||||
text {
|
||||
text-anchor: middle;
|
||||
dominant-baseline: central;
|
||||
font-size: var(--font-scale-10);
|
||||
}
|
||||
</style>
|
@ -0,0 +1,18 @@
|
||||
<div>
|
||||
{#each heavyMissiles as w}
|
||||
<HeavyMissile {...w.specs} />
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
import HeavyMissile from "./HeavyMissile/index.svelte";
|
||||
|
||||
export let heavyMissiles = [];
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.beam-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
@ -5,6 +5,7 @@ import Scattergun from "./Scattergun.svelte";
|
||||
import Needlebeam from "./Needlebeam.svelte";
|
||||
import Graser from "./Graser/index.svelte";
|
||||
import Torpedo from "./Torpedo/index.svelte";
|
||||
import HeavyMissile from "./HeavyMissile/index.svelte";
|
||||
|
||||
export default {
|
||||
torpedo: Torpedo,
|
||||
@ -14,4 +15,5 @@ export default {
|
||||
pds: PDS,
|
||||
scattergun: Scattergun,
|
||||
needle: Needlebeam,
|
||||
heavyMissile: HeavyMissile,
|
||||
};
|
||||
|
@ -5,6 +5,8 @@
|
||||
<div class="print-output">
|
||||
<Identification {...identification} />
|
||||
|
||||
<HeavyMissiles {heavyMissiles} />
|
||||
|
||||
<Beams {beams} />
|
||||
|
||||
<Weapons {weapons} />
|
||||
@ -49,6 +51,7 @@
|
||||
import Cargo from "./Cargo.svelte";
|
||||
import PDS from "./Weapons/PDS.svelte";
|
||||
import Beams from "./Weapons/Beams.svelte";
|
||||
import HeavyMissiles from "./Weapons/HeavyMissiles.svelte";
|
||||
|
||||
export let identification = {};
|
||||
export let propulsion = {};
|
||||
@ -62,7 +65,9 @@
|
||||
$: weapons = weaponry?.weapons ?? [];
|
||||
$: weapons = u.reject(
|
||||
weapons,
|
||||
u.matches({ specs: { type: (t) => ["pds", "beam"].includes(t) } })
|
||||
u.matches({
|
||||
specs: { type: (t) => ["pds", "beam", "heavyMissiles"].includes(t) },
|
||||
})
|
||||
);
|
||||
|
||||
$: pds = (weaponry?.weapons ?? []).filter(
|
||||
@ -71,6 +76,9 @@
|
||||
$: beams = (weaponry?.weapons ?? []).filter(
|
||||
u.matches({ specs: { type: "beam" } })
|
||||
);
|
||||
$: heavyMissiles = (weaponry?.weapons ?? []).filter(
|
||||
u.matches({ specs: { type: "heavyMissiles" } })
|
||||
);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
67
static/icons/heavy-missile.svg
Normal file
67
static/icons/heavy-missile.svg
Normal file
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="140"
|
||||
height="360"
|
||||
viewBox="0 0 37.041667 95.250002"
|
||||
version="1.1"
|
||||
id="svg833"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
||||
sodipodi:docname="heavy-missile.svg">
|
||||
<defs
|
||||
id="defs827" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4"
|
||||
inkscape:cx="86.021962"
|
||||
inkscape:cy="138.16276"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="957"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="34"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata830">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-73.195326,-47.896679)">
|
||||
<polygon
|
||||
transform="matrix(0.26458333,0,0,0.26458333,-35.151785,9.9516529)"
|
||||
points="480,156.4 449.7,204.3 449.7,399.2 419.4,454.1 463.8,454.1 463.8,497.7 496.2,497.7 496.2,454.1 540.6,454.1 510.3,399.2 510.3,204.3 "
|
||||
id="polygon4"
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue
Block a user