adfc
This commit is contained in:
parent
e36c13bd2d
commit
0098e899c9
@ -2,6 +2,7 @@
|
||||
<Identification {...identification} />
|
||||
<Propulsion {...propulsion} />
|
||||
<Structure {...structure} />
|
||||
<Weaponry {...weaponry} />
|
||||
</main>
|
||||
|
||||
<script>
|
||||
@ -9,10 +10,12 @@
|
||||
import Propulsion from "./ShipEdit/Propulsion.svelte";
|
||||
import shipDux from "$lib/store/ship";
|
||||
import Structure from "./ShipEdit/Structure.svelte";
|
||||
import Weaponry from "./ShipEdit/Weaponry.svelte";
|
||||
|
||||
export let identification = {};
|
||||
export let propulsion = {};
|
||||
export let structure = {};
|
||||
export let weaponry = {};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
<script>
|
||||
import { getContext } from "svelte";
|
||||
import Field from "$lib/components/Field/index.svelte";
|
||||
import ShipItem from "$lib/components/ShipItem/index.svelte";
|
||||
import Field from "$lib/components/Field.svelte";
|
||||
import ShipItem from "$lib/components/ShipItem.svelte";
|
||||
|
||||
export let reqs = {};
|
||||
export let advanced = false;
|
||||
|
@ -7,7 +7,7 @@
|
||||
</Section>
|
||||
|
||||
<script>
|
||||
import Section from "$lib/components/Section/index.svelte";
|
||||
import Section from "$lib/components/Section.svelte";
|
||||
import Hull from './Hull.svelte';
|
||||
import Screens from './Screens.svelte';
|
||||
import Cargo from './Cargo.svelte';
|
||||
|
39
src/lib/components/ShipEdit/Weaponry.svelte
Normal file
39
src/lib/components/ShipEdit/Weaponry.svelte
Normal file
@ -0,0 +1,39 @@
|
||||
<Section label="weaponry">
|
||||
<Firecons {...firecons} />
|
||||
|
||||
<ADFC {...adfc} />
|
||||
<!--
|
||||
|
||||
<AddWeapon />
|
||||
|
||||
{#each weapons as weapon (weapon.id)}
|
||||
<Weapon {weapon} id={weapon.id} />
|
||||
{/each}
|
||||
-->
|
||||
</Section>
|
||||
|
||||
<script>
|
||||
import { getContext } from "svelte";
|
||||
|
||||
import Section from "$lib/components/Section.svelte";
|
||||
|
||||
import ShipItem from "$lib/components/ShipItem.svelte";
|
||||
import Field from "$lib/components/Field.svelte";
|
||||
|
||||
import Firecons from "./Weaponry/Firecons.svelte";
|
||||
import ADFC from "./Weaponry/ADFC.svelte";
|
||||
|
||||
export let firecons = {};
|
||||
export let adfc = {};
|
||||
/*
|
||||
|
||||
import AddWeapon from './AddWeapon.svelte';
|
||||
import Weapon from './Weapon/index.svelte';
|
||||
|
||||
|
||||
export let weapons = [];
|
||||
*/
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
@ -5,14 +5,14 @@
|
||||
</ShipItem>
|
||||
|
||||
<script>
|
||||
import { getContext } from 'svelte';
|
||||
import ShipItem from "$lib/components/ShipItem/index.svelte";
|
||||
import Field from "$lib/components/Field/index.svelte";
|
||||
import { getContext } from "svelte";
|
||||
import ShipItem from "$lib/components/ShipItem.svelte";
|
||||
import Field from "$lib/components/Field.svelte";
|
||||
|
||||
export let rating = 0;
|
||||
export let reqs = {};
|
||||
|
||||
const { dispatch } = getContext('ship');
|
||||
const api = getContext("api");
|
||||
|
||||
$: dispatch.setADFC(rating);
|
||||
$: api?.dispatch?.setADFC?.(rating);
|
||||
</script>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script>
|
||||
import { getContext } from "svelte";
|
||||
import Field from "../../Field/index.svelte";
|
||||
import Field from "../../Field.svelte";
|
||||
|
||||
import { weaponTypes } from "$lib/shipDux/weaponry/weapons";
|
||||
|
||||
|
@ -5,16 +5,16 @@
|
||||
</ShipItem>
|
||||
|
||||
<script>
|
||||
import { getContext } from 'svelte';
|
||||
import ShipItem from "$lib/components/ShipItem/index.svelte";
|
||||
import Field from "$lib/components/Field/index.svelte";
|
||||
import { getContext } from "svelte";
|
||||
import ShipItem from "$lib/components/ShipItem.svelte";
|
||||
import Field from "$lib/components/Field.svelte";
|
||||
|
||||
export let stations = 0;
|
||||
export let reqs = {};
|
||||
|
||||
const { dispatch } = getContext('ship');
|
||||
export let api = getContext("api");
|
||||
|
||||
$: dispatch.setFirecons(stations);
|
||||
$: api?.dispatch?.setFirecons?.(stations);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -23,8 +23,8 @@
|
||||
import { getContext } from "svelte";
|
||||
|
||||
import Arcs from "../Arcs.svelte";
|
||||
import ShipItem from "$lib/components/ShipItem/index.svelte";
|
||||
import Field from "$lib/components/Field/index.svelte";
|
||||
import ShipItem from "$lib/components/ShipItem.svelte";
|
||||
import Field from "$lib/components/Field.svelte";
|
||||
|
||||
import { createEventDispatcher } from "svelte";
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
import { getContext } from "svelte";
|
||||
|
||||
import Arc from "./Arc.svelte";
|
||||
import ShipItem from "$lib/components/ShipItem/index.svelte";
|
||||
import Field from "$lib/components/Field/index.svelte";
|
||||
import ShipItem from "$lib/components/ShipItem.svelte";
|
||||
import Field from "$lib/components/Field.svelte";
|
||||
import Beam from "./Beam/index.svelte";
|
||||
import Submunition from "./Submunition.svelte";
|
||||
import PointDefenceSystem from "./PDS.svelte";
|
||||
|
@ -1,34 +0,0 @@
|
||||
<Section label="weaponry">
|
||||
<Firecons {...firecons} />
|
||||
|
||||
<ADFC {...adfc} />
|
||||
|
||||
<AddWeapon />
|
||||
|
||||
{#each weapons as weapon (weapon.id)}
|
||||
<Weapon {weapon} id={weapon.id} />
|
||||
{/each}
|
||||
|
||||
</Section>
|
||||
|
||||
<script>
|
||||
import { getContext } from 'svelte';
|
||||
|
||||
import Section from "$lib/components/Section/index.svelte";
|
||||
import ShipItem from '$lib/components/ShipItem/index.svelte';
|
||||
import Field from '$lib/components/Field/index.svelte';
|
||||
|
||||
import Firecons from './Firecons.svelte';
|
||||
import ADFC from './ADFC.svelte';
|
||||
import AddWeapon from './AddWeapon.svelte';
|
||||
import Weapon from './Weapon/index.svelte';
|
||||
|
||||
export let firecons = {};
|
||||
export let adfc = {};
|
||||
|
||||
export let weapons = [];
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user