add the weapons but the beam

This commit is contained in:
Yanick Champoux 2022-03-07 14:53:39 -05:00
parent b3fa0917f3
commit 70a3c76cde
5 changed files with 31 additions and 9 deletions

View File

@ -0,0 +1 @@
<label>point defence system</label>

View File

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

View File

@ -20,16 +20,16 @@
import ShipItem from "$lib/components/ShipItem/index.svelte";
import Field from "$lib/components/Field/index.svelte";
/* import Beam from "./Beam/index.svelte"; */
/* import Submunition from "./Submunition/index.svelte"; */
/* import PointDefenceSystem from "./PointDefenceSystem/index.svelte"; */
/* import Scattergun from "./Scattergun/index.svelte"; */
import Submunition from "./Submunition.svelte";
import PointDefenceSystem from "./PDS.svelte";
import Scattergun from "./Scattergun.svelte";
import Needle from "./Needle.svelte";
const component = {
/* beam: Beam, */
/* submunition: Submunition, */
/* pds: PointDefenceSystem, */
/* scattergun: Scattergun, */
submunition: Submunition,
pds: PointDefenceSystem,
scattergun: Scattergun,
needle: Needle,
};

View File

@ -5,9 +5,11 @@ const reqs = { cost: 0, mass: 0 };
export const weaponTypes = [
{ name: 'beam', type: 'beam', reqs: beam_cost_mass },
{ name: 'submunition pack', type: 'submunition', reqs: { mass:1, cost:3 }},
{ name: 'point defence system', type: 'pds', reqs: {mass:1,cost:3}},
{ name: 'scattergun', type: 'scattergun', reqs: { mass:1,cost:4 }},
{ name: 'submunition pack', type: 'submunition', reqs: { mass:1, cost:3 },
initial: { arc: 'F' }
},
{ 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 },
initial: { arc: 'F' }},
];