2020-07-26 22:22:05 +00:00
|
|
|
<ShipItem {cost} {mass}>
|
|
|
|
<Field label="streamlining">
|
|
|
|
<div>
|
2020-07-28 19:42:20 +00:00
|
|
|
<label>
|
2020-07-26 22:22:05 +00:00
|
|
|
<input type="radio" bind:group={type} value="none" />
|
2020-07-28 19:42:20 +00:00
|
|
|
none</label>
|
|
|
|
<label>
|
|
|
|
|
2020-07-26 22:22:05 +00:00
|
|
|
<input type="radio" bind:group={type} value="partial" />
|
2020-07-28 19:42:20 +00:00
|
|
|
partial</label>
|
|
|
|
<label>
|
2020-07-26 22:22:05 +00:00
|
|
|
<input type="radio" bind:group={type} value="full" />
|
2020-07-28 19:42:20 +00:00
|
|
|
full</label>
|
2020-07-26 22:22:05 +00:00
|
|
|
</div>
|
|
|
|
</Field>
|
|
|
|
</ShipItem>
|
|
|
|
|
|
|
|
<script>
|
2021-05-17 13:48:31 +00:00
|
|
|
import ShipItem from '$lib/components/ShipItem/index.svelte';
|
|
|
|
import Field from '$lib/components/Field/index.svelte';
|
2020-07-26 22:22:05 +00:00
|
|
|
|
|
|
|
import {getContext } from 'svelte';
|
|
|
|
|
|
|
|
export let type = 'none';
|
|
|
|
export let cost = 0;
|
|
|
|
export let mass = 0;
|
2021-06-13 15:36:59 +00:00
|
|
|
export let ship = getContext('ship');
|
2020-07-26 22:22:05 +00:00
|
|
|
|
2021-06-13 15:36:59 +00:00
|
|
|
$: ship?.dispatch_action( 'set_streamlining', type);
|
2020-07-26 22:22:05 +00:00
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
div { display: flex }
|
2020-07-28 19:42:20 +00:00
|
|
|
label {
|
|
|
|
margin-left: 1em;
|
|
|
|
}
|
2020-07-26 22:22:05 +00:00
|
|
|
</style>
|