aotds-docks/src/components/Hull/Armour/Layer/index.svelte

25 lines
434 B
Svelte
Raw Normal View History

2020-07-26 21:55:51 +00:00
<Field label={ `layer ${layer}` }>
<input type="number" min="0" bind:value={rating} />
</Field>
<script>
2021-06-13 15:36:59 +00:00
import { getContext} from 'svelte';
2020-07-26 21:55:51 +00:00
2021-05-17 13:48:31 +00:00
import Field from '$lib/components/Field/index.svelte';
2020-07-26 21:55:51 +00:00
export let layer = 1;
export let rating = 0;
2021-06-13 15:36:59 +00:00
const ship = getContext('ship');
2020-07-26 21:55:51 +00:00
2021-06-13 15:36:59 +00:00
$: ship?.dispatch_action( 'set_armour_layer', {layer,rating} );
2020-07-26 21:55:51 +00:00
</script>
2020-07-28 18:55:08 +00:00
<style>
input {
width: 5em;
}
</style>