Slight Adjustments, Added Fuels Output
This commit is contained in:
parent
42628b6a57
commit
f85faeb6ad
3 changed files with 89 additions and 30 deletions
src/lib
|
@ -1,6 +1,7 @@
|
|||
import {Thruster, THRUSTER_LIST} from "$lib/thruster.svelte";
|
||||
import {Thruster, THRUSTER_LIST, THRUSTER_TYPE_LIST} from "$lib/thruster.svelte";
|
||||
import {Grid} from "$lib/grid";
|
||||
import {INVENTORIES, Inventory} from "$lib/containers.svelte";
|
||||
import type {Fuel} from "$lib/fuel";
|
||||
|
||||
export class Ship {
|
||||
thrusters: Array<Thruster> = $state([]);
|
||||
|
@ -91,4 +92,14 @@ export class Ship {
|
|||
});
|
||||
return thrust;
|
||||
}
|
||||
|
||||
getFuelTypes(): Array<Fuel> {
|
||||
let fuels: Array<Fuel> = [];
|
||||
this.thrusters.forEach((thruster) => {
|
||||
if (!fuels.includes(thruster.details.type.details.fuel)) {
|
||||
fuels.push(thruster.details.type.details.fuel)
|
||||
}
|
||||
})
|
||||
return fuels;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue