aotds-docks/src/lib/components/Hull/Streamlining/index.svelte

42 lines
855 B
Svelte
Raw Normal View History

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