This commit is contained in:
Yanick Champoux 2023-03-27 13:19:46 -04:00
parent e36c13bd2d
commit 0098e899c9
10 changed files with 60 additions and 52 deletions

View File

@ -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>

View File

@ -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;

View File

@ -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';

View 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>

View File

@ -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>

View File

@ -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";

View File

@ -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>

View File

@ -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";

View File

@ -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";

View File

@ -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>