print graser

This commit is contained in:
Yanick Champoux 2023-05-02 16:27:35 -04:00
parent 8af9ae620e
commit 1c01696a8b
4 changed files with 52 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<div> <div>
<Arcs selected={arcs} size="40"> <Arcs selected={arcs} size={40}>
<text x="50%" y="50%"> <text x="50%" y="50%">
{weaponClass} {weaponClass}
</text> </text>

View File

@ -0,0 +1,9 @@
<Hst.Story title="Export/PrintShip/Weapons/Graser">
<Graser arcs={["F", "FS"]} weaponClass={2} />
</Hst.Story>
<script>
import Graser from "./index.svelte";
export let Hst;
</script>

View File

@ -0,0 +1,35 @@
<div>
<Arcs selected={arcs} size={40}>
<polygon
points="0,30 30,30 15,4"
style="fill:black"
transform="translate(7,2) scale(0.85)"
/>
<text x="50%" y="50%" style="color: white">
{weaponClass}
</text>
</Arcs>
</div>
<script>
import Arcs from "$lib/components/ShipEdit/Weaponry/Weapon/Arcs.svelte";
export let weaponClass = 1;
export let arcs = [];
</script>
<style>
div {
margin: 0px 0.5rem;
}
div :global(path:hover) {
fill: white;
}
div :global(path.active:hover) {
fill: black;
}
text {
text-anchor: middle;
dominant-baseline: central;
font-size: var(--font-scale-10);
}
</style>

View File

@ -3,8 +3,10 @@ import Submunition from "./Submunition.svelte";
import PDS from "./PDS.svelte"; import PDS from "./PDS.svelte";
import Scattergun from "./Scattergun.svelte"; import Scattergun from "./Scattergun.svelte";
import Needlebeam from "./Needlebeam.svelte"; import Needlebeam from "./Needlebeam.svelte";
import Graser from "./Graser/index.svelte";
export default { export default {
graser: Graser,
beam: Beam, beam: Beam,
submunition: Submunition, submunition: Submunition,
pds: PDS, pds: PDS,