-
+
Found a bug? Tell us here!
@@ -188,6 +217,18 @@ const massStatus = ref(stages[0]);
diff --git a/src/components/Ship.vue b/src/components/Ship.vue
index 14075b1..09028cc 100644
--- a/src/components/Ship.vue
+++ b/src/components/Ship.vue
@@ -125,14 +125,18 @@ input {
.ship {
@apply mx-auto my-4 h-min;
- @apply flex flex-col items-center gap-2;
- @apply sm:grid sm:gap-4;
+ @apply flex flex-col items-center;
+ @apply sm:grid sm:gap-4 sm:justify-items-center;
@apply sm:grid-cols-[2rem_1fr] md:grid-cols-[2rem_1fr_1fr_1fr_1fr];
+
+ column-gap: 1rem;
+ row-gap: 0;
+ grid-template-rows: 1fr 0;
}
.handle {
@apply max-sm:hidden; /* Don't show on mobile. */
- @apply h-full w-4 flex flex-col justify-center select-none;
+ @apply h-full w-10 flex flex-col justify-center select-none;
@apply row-span-3 md:row-span-1;
}
diff --git a/src/stores/solver.js b/src/stores/solver.js
index 468bcd5..71fb9d0 100644
--- a/src/stores/solver.js
+++ b/src/stores/solver.js
@@ -1,5 +1,5 @@
import { defineStore } from 'pinia'
-import { ref, computed } from 'vue';
+import { ref, computed, watch } from 'vue';
import { wormholes, stages } from "../wormholes"
@@ -8,6 +8,14 @@ export const useSolverStore = defineStore('solver', () => {
const selectedWH = ref(wormholes[0]);
const selectedStage = ref(stages[0]);
+ const url = computed(() => new URL(window.location));
+ if (url.value.search) {
+ const params = new URLSearchParams(url.value.search);
+ selectedWH.value = wormholes.find((elem) => {
+ return elem.type.toLowerCase() === params.get("sig").toLowerCase()
+ });
+ }
+
const planMassKg = computed(() => ({
med: (selectedStage.value.mass(selectedWH.value.totalMass * 1) - totalPlanMass.value),
min: ((selectedStage.value.mass(selectedWH.value.totalMass) * 0.9) - totalPlanMass.value),
diff --git a/src/style.css b/src/style.css
index 08a7770..61b003b 100644
--- a/src/style.css
+++ b/src/style.css
@@ -45,7 +45,7 @@ h4 {
}
select {
- @apply rounded-lg block w-full p-2.5 bg-gray-700 border-gray-600 placeholder-gray-400 text-white text-xl focus:ring-blue-500 focus:border-blue-500;
+ @apply rounded-lg block w-full p-2.5 mb-4 bg-gray-700 border-gray-600 placeholder-gray-400 text-white text-xl focus:ring-blue-500 focus:border-blue-500;
@apply border border-gray-300 focus:border-blue-500;
}
@@ -61,22 +61,19 @@ button {
}
select {
- @apply col-span-1 bg-gray-700;
+ @apply col-span-1 bg-gray-700 w-fit;
}
footer {
@apply flex flex-row content-center justify-between p-4 text-slate-400;
@apply max-lg:flex-col max-lg:items-center max-lg:text-center;
+ @apply w-full md:w-10/12 md:max-w-full mx-auto;
}
footer a {
@apply text-cyan-400 decoration-solid;
}
-.controls {
- @apply grid grid-cols-2 content-center justify-between gap-2 mt-2;
-}
-
.mass-label {
@apply font-semibold;
}
diff --git a/src/wormholes.js b/src/wormholes.js
index 3371b44..899a4c4 100644
--- a/src/wormholes.js
+++ b/src/wormholes.js
@@ -17,476 +17,571 @@ export const wormholes = [
{
"type": "A009",
"totalMass": 500000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "A239",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "A641",
"totalMass": 2000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["wandering"]
},
{
"type": "A982",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "B041",
"totalMass": 5000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "B274",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "B449",
"totalMass": 2000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["wandering"]
},
{
"type": "B520",
"totalMass": 5000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "B735",
"totalMass": 750000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "C008",
"totalMass": 1000000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "C125",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "C140",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "C247",
"totalMass": 2_000_000_000,
- "jumpMass": 375_000_000
+ "jumpMass": 375_000_000,
+ "link_types": ["static"]
},
{
"type": "C248",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "C391",
"totalMass": 5000000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "C414",
"totalMass": 750000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "D364",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "D382",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "D792",
"totalMass": 3000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["wandering"]
},
{
"type": "D845",
"totalMass": 5000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "E004",
"totalMass": 1000000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "E175",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "E545",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "E587",
"totalMass": 3000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["static"]
},
{
"type": "F135",
"totalMass": 750000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "F353",
"totalMass": 100000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "F355",
"totalMass": 100000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "G008",
"totalMass": 1000000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "G024",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "H121",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "H296",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "H900",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "I182",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "J244",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static"]
},
{
"type": "K329",
"totalMass": 5000000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "K346",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "L005",
"totalMass": 1000000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "L031",
"totalMass": 3000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["wandering"]
},
{
"type": "L477",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "L614",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "M001",
"totalMass": 1000000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "M164",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "M267",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "M555",
"totalMass": 3000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["wandering"]
},
{
"type": "M609",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "N062",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "N110",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static"]
},
{
"type": "N290",
"totalMass": 5000000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "N432",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "N766",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "N770",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "N944",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "N968",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "O128",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "O477",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "O883",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "P060",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static"]
},
{
"type": "Q003",
"totalMass": 1000000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "Q063",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static"]
},
{
"type": "Q317",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static"]
},
{
"type": "R051",
"totalMass": 3000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["wandering"]
},
{
"type": "R259",
"totalMass": 750000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "R474",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "R943",
"totalMass": 750000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "S047",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "S199",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "S804",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "S877",
"totalMass": 750000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "T405",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "T458",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "U210",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "U319",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "U574",
"totalMass": 3000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "V283",
"totalMass": 3000000000,
- "jumpMass": 1000000000
+ "jumpMass": 1000000000,
+ "link_types": ["wandering"]
},
{
"type": "V301",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "V753",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "V898",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static"]
},
{
"type": "V911",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "V928",
"totalMass": 750000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "W237",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "X702",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering"]
},
{
"type": "X877",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "Y683",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "Y790",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static"]
},
{
"type": "Z006",
"totalMass": 1000000000,
- "jumpMass": 5000000
+ "jumpMass": 5000000,
+ "link_types": ["wandering"]
},
{
"type": "Z060",
"totalMass": 1000000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static"]
},
{
"type": "Z142",
"totalMass": 3300000000,
- "jumpMass": 2000000000
+ "jumpMass": 2000000000,
+ "link_types": ["wandering"]
},
{
"type": "Z457",
"totalMass": 2000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "Z647",
"totalMass": 500000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["static", "wandering"]
},
{
"type": "Z971",
"totalMass": 100000000,
- "jumpMass": 62000000
+ "jumpMass": 62000000,
+ "link_types": ["wandering"]
},
{
"type": "U372",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering", "pochven"]
},
{
"type": "F216",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering", "pochven"]
},
{
"type": "C729",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering", "pochven"]
},
{
"type": "R081",
"totalMass": 1000000000,
- "jumpMass": 450000000
+ "jumpMass": 450000000,
+ "link_types": ["wandering", "pochven"]
},
{
"type": "X450",
"totalMass": 1000000000,
- "jumpMass": 375000000
+ "jumpMass": 375000000,
+ "link_types": ["wandering", "pochven"]
}
]
\ No newline at end of file