add the weapons but the beam
This commit is contained in:
parent
b3fa0917f3
commit
70a3c76cde
1
src/lib/components/ShipEdit/Weaponry/Weapon/PDS.svelte
Normal file
1
src/lib/components/ShipEdit/Weaponry/Weapon/PDS.svelte
Normal file
@ -0,0 +1 @@
|
|||||||
|
<label>point defence system</label>
|
@ -0,0 +1,19 @@
|
|||||||
|
<label>submunition pack</label>
|
||||||
|
|
||||||
|
<Arcs selected={[arc]} on:click_arc={({ detail }) => click_arc(detail)} />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getContext } from "svelte";
|
||||||
|
import Arcs from "./Arcs.svelte";
|
||||||
|
import { createEventDispatcher } from "svelte";
|
||||||
|
|
||||||
|
const all_arcs = ["FS", "F", "FP", "AP", "A", "AS"];
|
||||||
|
|
||||||
|
export let arc = "F";
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
|
const click_arc = (arc) => {
|
||||||
|
dispatch("change",{arc});
|
||||||
|
};
|
||||||
|
</script>
|
@ -20,16 +20,16 @@
|
|||||||
import ShipItem from "$lib/components/ShipItem/index.svelte";
|
import ShipItem from "$lib/components/ShipItem/index.svelte";
|
||||||
import Field from "$lib/components/Field/index.svelte";
|
import Field from "$lib/components/Field/index.svelte";
|
||||||
/* import Beam from "./Beam/index.svelte"; */
|
/* import Beam from "./Beam/index.svelte"; */
|
||||||
/* import Submunition from "./Submunition/index.svelte"; */
|
import Submunition from "./Submunition.svelte";
|
||||||
/* import PointDefenceSystem from "./PointDefenceSystem/index.svelte"; */
|
import PointDefenceSystem from "./PDS.svelte";
|
||||||
/* import Scattergun from "./Scattergun/index.svelte"; */
|
import Scattergun from "./Scattergun.svelte";
|
||||||
import Needle from "./Needle.svelte";
|
import Needle from "./Needle.svelte";
|
||||||
|
|
||||||
const component = {
|
const component = {
|
||||||
/* beam: Beam, */
|
/* beam: Beam, */
|
||||||
/* submunition: Submunition, */
|
submunition: Submunition,
|
||||||
/* pds: PointDefenceSystem, */
|
pds: PointDefenceSystem,
|
||||||
/* scattergun: Scattergun, */
|
scattergun: Scattergun,
|
||||||
needle: Needle,
|
needle: Needle,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,9 +5,11 @@ const reqs = { cost: 0, mass: 0 };
|
|||||||
|
|
||||||
export const weaponTypes = [
|
export const weaponTypes = [
|
||||||
{ name: 'beam', type: 'beam', reqs: beam_cost_mass },
|
{ name: 'beam', type: 'beam', reqs: beam_cost_mass },
|
||||||
{ name: 'submunition pack', type: 'submunition', reqs: { mass:1, cost:3 }},
|
{ name: 'submunition pack', type: 'submunition', reqs: { mass:1, cost:3 },
|
||||||
{ name: 'point defence system', type: 'pds', reqs: {mass:1,cost:3}},
|
initial: { arc: 'F' }
|
||||||
{ name: 'scattergun', type: 'scattergun', reqs: { mass:1,cost:4 }},
|
},
|
||||||
|
{ name: 'point defence system', type: 'pds', reqs: {mass:1,cost:3}, initial: {}},
|
||||||
|
{ name: 'scattergun', type: 'scattergun', reqs: { mass:1,cost:4 }, initial: {}},
|
||||||
{ name: 'needle weapon', type: 'needle', reqs: { mass: 2, cost: 6 },
|
{ name: 'needle weapon', type: 'needle', reqs: { mass: 2, cost: 6 },
|
||||||
initial: { arc: 'F' }},
|
initial: { arc: 'F' }},
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user