2020-07-27 18:14:05 +00:00
|
|
|
<ShipItem {cost} {mass}>
|
|
|
|
<Field label="ADFC">
|
2020-07-28 18:55:08 +00:00
|
|
|
<input type="number" class="short" bind:value={rating} />
|
2020-07-27 18:14:05 +00:00
|
|
|
</Field>
|
|
|
|
</ShipItem>
|
|
|
|
|
|
|
|
|
2020-07-28 18:55:08 +00:00
|
|
|
<script>
|
2021-05-17 13:48:31 +00:00
|
|
|
import get from "lodash/get.js";
|
|
|
|
import ShipItem from "../../ShipItem/index.svelte";
|
|
|
|
import Field from "../../Field/index.svelte";
|
|
|
|
import dux from "../../../dux";
|
2020-07-28 18:55:08 +00:00
|
|
|
|
|
|
|
import { getContext } from "svelte";
|
2020-07-27 18:14:05 +00:00
|
|
|
|
|
|
|
export let rating = 0;
|
|
|
|
export let cost = 0;
|
|
|
|
export let mass = 0;
|
2020-07-28 18:55:08 +00:00
|
|
|
export let ship_change = getContext("ship_change") || (() => {});
|
2020-07-27 18:14:05 +00:00
|
|
|
|
2020-07-28 18:55:08 +00:00
|
|
|
$: ship_change(dux.actions.set_adfc(rating));
|
|
|
|
</script>
|