print hull

docks66-json-schema
Yanick Champoux 2023-04-26 09:35:46 -04:00
parent 38e98ec74b
commit 7bc22eade5
3 changed files with 142 additions and 12 deletions

View File

@ -0,0 +1 @@
Yo!

View File

@ -0,0 +1,126 @@
<Hst.Story title="Export/PrintShip">
<PrintShip {...ship} />
</Hst.Story>
<script>
import PrintShip from "./index.svelte";
export let Hst;
const ship = {
schemaVersion: "1",
identification: {
shipType: "Scout",
shipClass: "Bonobo",
isCarrier: false,
reqs: {
mass: 10,
cost: 10,
usedMass: 4,
},
},
structure: {
streamlining: {
type: "none",
reqs: {
cost: 0,
mass: 0,
},
},
cargo: {
space: 0,
reqs: {
cost: 0,
mass: 0,
},
},
hull: {
rating: 0,
min: 1,
max: 10,
reqs: {
cost: 0,
mass: 0,
},
},
screens: {
standard: 0,
advanced: 0,
reqs: {
cost: 0,
mass: 0,
},
},
armor: {
reqs: {
cost: 0,
mass: 0,
},
layers: [],
},
carrier: {
nbrBays: 0,
squadrons: [],
reqs: {
cost: 0,
mass: 0,
},
},
},
propulsion: {
ftl: {
reqs: {
cost: 2,
mass: 1,
},
type: "standard",
},
drive: {
rating: 1,
advanced: false,
reqs: {
cost: 2,
mass: 1,
},
},
},
carrier: {
nbrBays: 0,
squadrons: [],
reqs: {
cost: 0,
mass: 0,
},
},
weaponry: {
adfc: {
rating: 0,
reqs: {
cost: 0,
mass: 0,
},
},
firecons: {
stations: 0,
reqs: {
cost: 0,
mass: 0,
},
},
weapons: [
{
id: 1,
specs: {
type: "beam",
weaponClass: 2,
arcs: ["FS", "F", "FP"],
},
reqs: {
mass: 2,
cost: 6,
},
},
],
},
};
</script>

View File

@ -1,14 +1,17 @@
<div>Printing this page will only prints the ship sheet.</div>
<div class="print-output">
<Identification {...identification} />
Identification {identification} />
<MainSystems {...propulsion} />
<div class="section-2" />
MainSystems {propulsion} />
</div>
<script>
import Identification from "./Identification.svelte";
import MainSystems from "./MainSystems/index.svelte";
//import Identification from "./Identification.svelte";
// import MainSystems from "./MainSystems/index.svelte";
// import Hull from "./Hull.svelte";
export let identification = {};
export let propulsion = {};
@ -22,13 +25,13 @@
padding: 1em;
margin: 0px auto;
}
@media print {
:global(body > *) {
visibility: hidden;
}
/* @media print { */
/* :global(body > *) { */
/* visibility: hidden; */
/* } */
.print-output {
visibility: visible;
}
}
/* .print-output { */
/* visibility: visible; */
/* } */
/* } */
</style>