From 7ad0491b70aa2f2b4ffcd3f2359917e7faeecd78 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Wed, 29 Jul 2020 14:05:55 -0400 Subject: [PATCH] identification --- src/components/Cost.svelte | 9 ++ src/components/Mass.svelte | 14 +++ .../Output/Print/Identification/index.svelte | 44 +++++++ src/components/Output/Print/index.svelte | 18 +++ src/components/Output/Print/sample.js | 114 ++++++++++++++++++ src/components/Output/Print/stories.js | 13 ++ 6 files changed, 212 insertions(+) create mode 100644 src/components/Cost.svelte create mode 100644 src/components/Mass.svelte create mode 100644 src/components/Output/Print/Identification/index.svelte create mode 100644 src/components/Output/Print/index.svelte create mode 100644 src/components/Output/Print/sample.js create mode 100644 src/components/Output/Print/stories.js diff --git a/src/components/Cost.svelte b/src/components/Cost.svelte new file mode 100644 index 0000000..dbdce51 --- /dev/null +++ b/src/components/Cost.svelte @@ -0,0 +1,9 @@ +
{cost}
+ + + + diff --git a/src/components/Mass.svelte b/src/components/Mass.svelte new file mode 100644 index 0000000..f39f7e9 --- /dev/null +++ b/src/components/Mass.svelte @@ -0,0 +1,14 @@ +
{mass}
+ + + + diff --git a/src/components/Output/Print/Identification/index.svelte b/src/components/Output/Print/Identification/index.svelte new file mode 100644 index 0000000..ba3ec5b --- /dev/null +++ b/src/components/Output/Print/Identification/index.svelte @@ -0,0 +1,44 @@ +

ship name:

+ +
+

{ship_class}-class, {ship_type}

+
+ +   + +
+
+ + + + diff --git a/src/components/Output/Print/index.svelte b/src/components/Output/Print/index.svelte new file mode 100644 index 0000000..24cd27e --- /dev/null +++ b/src/components/Output/Print/index.svelte @@ -0,0 +1,18 @@ +
+ +
+ + + + diff --git a/src/components/Output/Print/sample.js b/src/components/Output/Print/sample.js new file mode 100644 index 0000000..9b251dc --- /dev/null +++ b/src/components/Output/Print/sample.js @@ -0,0 +1,114 @@ +export default { + "ftl": { + "mass": 0, + "cost": 0, + "type": "none" + }, + "engine": { + "mass": 40, + "cost": 80, + "rating": 6, + "advanced": false + }, + "general": { + "ship_class": "Deviant", + "name": "", + "ship_type": "Battleship", + "mass": 132, + "used_mass": 131, + "cost": 415 + }, + "weaponry": { + "firecons": { + "nbr": 5, + "mass": 5, + "cost": 20 + }, + "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 + }, + { + "weapon_type": "pds", + "mass": 1, + "cost": 3, + "id": 3 + } + ], + "adfc": { + "rating": 0, + "cost": 0, + "mass": 0 + } + }, + "structure": { + "mass": 0, + "cost": 0, + "hull": { + "rating": 22, + "advanced": false, + "cost": 44, + "mass": 22 + }, + "screens": { + "standard": 5, + "advanced": 0, + "cost": 105, + "mass": 35 + }, + "armour": [ + { + "layer": 1, + "rating": 7, + "cost": 14, + "mass": 14 + }, + { + "layer": 2, + "rating": 2, + "cost": 8, + "mass": 4 + }, + { + "layer": 3, + "rating": 0, + "cost": 0, + "mass": 0 + } + ] + }, + "cargo": { + "space": 7, + "cost": 0, + "mass": 7 + }, + "streamlining": { + "type": "none", + "cost": 0, + "mass": 0 + }, + "carrier": { + "bays": 0, + "cost": 0, + "mass": 0, + "squadrons": [] + } +} diff --git a/src/components/Output/Print/stories.js b/src/components/Output/Print/stories.js new file mode 100644 index 0000000..e494b3b --- /dev/null +++ b/src/components/Output/Print/stories.js @@ -0,0 +1,13 @@ +import Print from './index.svelte'; +import sample from './sample'; + +export default { + title: "printouts" +}; + +export const basic = () => ({ + Component: Print, + props: { + ship: sample + } +});