From 4197f5f2a61bc6f5ad9c10bd3508e09ed38d6284 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Wed, 29 Jul 2020 17:08:52 -0400 Subject: [PATCH] beams --- .../Output/Print/Weapons/Beam/index.svelte | 30 +++++++++++++++++ .../Output/Print/Weapons/index.svelte | 22 +++++++++++++ .../Output/Print/Weapons/stories.js | 33 +++++++++++++++++++ src/components/Output/Print/index.svelte | 3 ++ src/components/Weapon/Arcs/index.svelte | 8 +++-- 5 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 src/components/Output/Print/Weapons/Beam/index.svelte create mode 100644 src/components/Output/Print/Weapons/index.svelte create mode 100644 src/components/Output/Print/Weapons/stories.js diff --git a/src/components/Output/Print/Weapons/Beam/index.svelte b/src/components/Output/Print/Weapons/Beam/index.svelte new file mode 100644 index 0000000..e6df5e8 --- /dev/null +++ b/src/components/Output/Print/Weapons/Beam/index.svelte @@ -0,0 +1,30 @@ +
+ + + {weapon_class} + + +
+ + + + diff --git a/src/components/Output/Print/Weapons/index.svelte b/src/components/Output/Print/Weapons/index.svelte new file mode 100644 index 0000000..28bd225 --- /dev/null +++ b/src/components/Output/Print/Weapons/index.svelte @@ -0,0 +1,22 @@ +
+ +
+ {#each beams as beam} + + {/each} +
+ + +
+ + + + diff --git a/src/components/Output/Print/Weapons/stories.js b/src/components/Output/Print/Weapons/stories.js new file mode 100644 index 0000000..c7778df --- /dev/null +++ b/src/components/Output/Print/Weapons/stories.js @@ -0,0 +1,33 @@ +import Component from '.'; + +export default { + title: "printouts/weapons" +}; + +export const basic = () => ({ + Component, + props: { + "weapons": [ + { + "weapon_type": "submunition", + "arcs": [ + "F" + ], + "mass": 1, + "cost": 3, + "id": 1 + }, + { + "weapon_type": "beam", + "weapon_class": "2", + "arcs": [ + "A", + "AS", + "FS" + ], + "mass": 2, + "cost": 6, + "id": 2 + }, ] + } +}) diff --git a/src/components/Output/Print/index.svelte b/src/components/Output/Print/index.svelte index d017ea6..f0013ed 100644 --- a/src/components/Output/Print/index.svelte +++ b/src/components/Output/Print/index.svelte @@ -1,6 +1,8 @@
+ + diff --git a/src/components/Weapon/Arcs/index.svelte b/src/components/Weapon/Arcs/index.svelte index 870835c..8600deb 100644 --- a/src/components/Weapon/Arcs/index.svelte +++ b/src/components/Weapon/Arcs/index.svelte @@ -1,12 +1,13 @@ - + {#each all_arcs as arc (arc)} - click_arc(arc)} /> {/each} - + +